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.
25 lines
676 B
HTML
25 lines
676 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<article class="post">
|
|
<header>
|
|
<h1>{{ page.title }}</h1>
|
|
{% if page.date %}
|
|
<time class="date">{{ page.date }}</time>
|
|
{% endif %}
|
|
{% if page.description %}
|
|
<p class="description">{{ page.description }}</p>
|
|
{% endif %}
|
|
{% if page.tags %}
|
|
<ul class="tags">
|
|
{% for tag in page.tags %}
|
|
<li><a href="{{ prefix }}/tags/{{ tag }}.html">{{ tag }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</header>
|
|
<section class="content">
|
|
{{ content | safe }}
|
|
</section>
|
|
</article>
|
|
{% endblock content %} |