- {% set section = get_section(path="_index.md") %}
- {% for p in section.subsections %}
+ {% set section_ = get_section(path="_index.md") %}
+ {% for p in section_.subsections %}
{% set subsection = get_section(path=p) %}
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 5/6] 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 %}
+
+
+
From 28715201119188c396eb64291965c5b030604790 Mon Sep 17 00:00:00 2001
From: Che <43485962+c-git@users.noreply.github.com>
Date: Wed, 1 Jun 2022 23:18:32 -0400
Subject: [PATCH 6/6] Support either full URL or file from static folder
- ASSUMES: A full URL will start with http
---
templates/index.html | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/templates/index.html b/templates/index.html
index 5f439d6..32c157f 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -4,7 +4,11 @@
{% if config.extra.favicon %}
-
+ {% set _favicon = config.extra.favicon %}
+ {% if (_favicon is starting_with("http")) == false %}
+ {% set _favicon = get_url(path=config.extra.favicon) %}
+ {% endif %}
+
{% endif %}
{% block title %}{{ config.title }}{% endblock title %}
@@ -30,11 +34,14 @@