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.
26 lines
861 B
HTML
26 lines
861 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{ title }} | {{ config.title }}</title>
|
|
<link rel="canonical" href="{{ config.base_url | trim_end_matches(pat='/') }}{{ page_path }}">
|
|
<link rel="alternate" type="application/atom+xml" title="Atom Feed" href="{{ config.base_url | trim_end_matches(pat='/') }}/feed.xml">
|
|
<link rel="stylesheet" href="{{ prefix }}/style.css">
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="{{ prefix }}/index.html">{{ config.title }}</a>
|
|
{% for item in nav %}
|
|
<a href="{{ prefix }}{{ item.path }}">{{ item.label }}</a>
|
|
{% endfor %}
|
|
</nav>
|
|
<main>
|
|
{% block content %}{% endblock content %}
|
|
</main>
|
|
<footer>
|
|
<p>© {{ config.author }}</p>
|
|
</footer>
|
|
</body>
|
|
</html>
|