Lay groundwork for user-editable templates by adding Tera as a runtime template engine alongside the existing maud templates. Changes: - Add tera dependency - Create TemplateEngine struct with render methods - Add TemplateLoad/TemplateRender error variants - Add section_type/template fields to Frontmatter - Create templates/ directory with base, page, section, and content templates Dead code warnings are expected; TemplateEngine will be wired in to replace maud in subsequent commits.
15 lines
381 B
HTML
15 lines
381 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h1>{{ section.title }}</h1>
|
|
<ul class="item-list">
|
|
{% for item in items %}
|
|
<li>
|
|
<a href="./{{ item.slug }}.html">{{ item.frontmatter.title }}</a>
|
|
{% if item.frontmatter.description %}
|
|
<p>{{ item.frontmatter.description }}</p>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock content %} |