From 8e4b42511ae662ae3e2fcd024c5d09e561ce0dfa Mon Sep 17 00:00:00 2001 From: Che <43485962+c-git@users.noreply.github.com> Date: Sun, 29 May 2022 05:02:38 -0400 Subject: [PATCH] Add default section template - Prevent "Welcome to Zola!" message if user manually navigates to section page (Navigate to a page then remove last part of url) - Implementation shows the pages in this section if the section content has no words. --- templates/section.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 templates/section.html diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..abbf1a2 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,23 @@ +{% extends "index.html" %} + +{% block title %} {{ config.title }} | {{ section.title }} {% endblock title %} + + +{% block content %} + {% if section.word_count > 0 %} + {{ section.content }} + {% else %} +

+ {{ section.title }} +

+ Pages: + + {% endif %} +{% endblock content %} + + +