From 7b32562f9e1454821b26103bd3f904362ad2c013 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 17 May 2025 10:23:45 -0700 Subject: [PATCH] add config & extensions for header and body --- config.toml | 6 ++++++ templates/base.html | 5 +++++ templates/partials/header.html | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/config.toml b/config.toml index cedb2f1..5ce543a 100644 --- a/config.toml +++ b/config.toml @@ -253,6 +253,12 @@ invert_title_order = false # Full path after the base URL required. So if you were to place it in "static" it would be "/favicon.png" favicon = "img/seedling.png" +# Optionally extend the header by supplying an `extend_header.html` template +extend_header = false + +# Optionally extend the body by supplying an `extend_body.html` template +extend_body = false + # Add an emoji here to use it as favicon. # Compatibility: https://caniuse.com/link-icon-svg favicon_emoji = "🌱" diff --git a/templates/base.html b/templates/base.html index 20eafa7..4e76bb6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -43,6 +43,11 @@ This variable will hold all the text strings for the language #} {% endblock main_content %} {% include "partials/footer.html" %} + + {# Optional extended body content #} + {%- if config.extra.extend_body -%} + {% include "extend_body.html" %} + {%- endif -%} diff --git a/templates/partials/header.html b/templates/partials/header.html index 049450e..5b659c9 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -177,4 +177,8 @@ {%- endif -%} {%- endif -%} + {# Optional extended header content #} + {%- if config.extra.extend_header -%} + {% include "extend_header.html" %} + {%- endif -%}