From b42b67b5212af1ade107662caf509cf6bb97e7f9 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Fri, 11 Dec 2020 16:35:55 +0100 Subject: [PATCH] Use different template for section This is useful for pages that are not articles, such as 'about'. Creating a new section with only '_index.md' creates a new plain page. --- content/about/_index.md | 5 +++++ templates/section.html | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 content/about/_index.md create mode 100644 templates/section.html diff --git a/content/about/_index.md b/content/about/_index.md new file mode 100644 index 0000000..e6ee84b --- /dev/null +++ b/content/about/_index.md @@ -0,0 +1,5 @@ ++++ +title = "About" +template = "section.html" ++++ + diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..10a741c --- /dev/null +++ b/templates/section.html @@ -0,0 +1,10 @@ +{% extends "index.html" %} + +{% block title %} + {{ section.title }} – {{ config.title }} +{% endblock title %} + +{% block content %} +

{{ section.title | safe }}

+ {{ section.content | safe }} +{% endblock content %}