From 6b275f6d281b5d8653562dc9bb84b6d4681a1153 Mon Sep 17 00:00:00 2001 From: jakeg Date: Fri, 28 Apr 2023 19:41:47 +0000 Subject: Update 'theme.toml' Fix Link. --- theme.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme.toml') diff --git a/theme.toml b/theme.toml index ed137c8..f2475d6 100644 --- a/theme.toml +++ b/theme.toml @@ -1,7 +1,7 @@ name = "Bear" description = "Bear blog theme" license = "MIT" -homepage = "https://codeberg.org/alanpearce/zola/bearblog" +homepage = "https://codeberg.org/alanpearce/zola-bearblog" # The minimum version of Zola required min_version = "0.4.0" # An optional live demo URL -- cgit 1.4.1 From 0800ba2afe4e733796c7c3a177ffbbf458f78eca Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 2 Sep 2023 18:55:59 +0200 Subject: Update demo URL --- theme.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'theme.toml') diff --git a/theme.toml b/theme.toml index f2475d6..1bba50d 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ homepage = "https://codeberg.org/alanpearce/zola-bearblog" # The minimum version of Zola required min_version = "0.4.0" # An optional live demo URL -demo = "https://alanpearce.codeberg.page/zola-bearblog" +demo = "https://zola-bearblog.netlify.app/" # Any variable there can be overridden in the end user `config.toml` # You don't need to prefix variables by the theme name but as this will -- cgit 1.4.1 From f51202d961e6d2337a96ef3552c4efced1fe2beb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 9 Sep 2023 19:10:40 +0200 Subject: Allow end-user to disable CSP header meta tags without editing theme --- config.toml | 1 + templates/base.html | 8 ++++++-- theme.toml | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'theme.toml') diff --git a/config.toml b/config.toml index d2a8833..78e9f9a 100644 --- a/config.toml +++ b/config.toml @@ -20,6 +20,7 @@ highlight_code = true [extra] date_format="%d %b, %Y" +webserver_sends_csp_headers=true [[extra.main_menu]] name = "Bear" diff --git a/templates/base.html b/templates/base.html index 02fdfe6..ee206b3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,7 +1,9 @@ - {% include "security_tags.html" ignore missing %} + {%- if config.webserver_sends_csp_headers %} + {%- include "security_tags.html" ignore missing %} + {%- endif %} {% include "favicon.html" ignore missing -%} @@ -13,7 +15,9 @@ {%- endblock -%} {%- endif %} - {% include "style.html" ignore missing -%} + {% include "custom_head.html" ignore missing -%} diff --git a/theme.toml b/theme.toml index 1bba50d..902c8ec 100644 --- a/theme.toml +++ b/theme.toml @@ -13,6 +13,7 @@ demo = "https://zola-bearblog.netlify.app/" # Use snake_casing to be consistent with the rest of Zola [extra] date_format="%d %b, %Y" +webserver_sends_csp_headers=false [author] name = "Alan Pearce" -- cgit 1.4.1 From baabcb634bdffb8623eacc410e8707a3b4afe2b5 Mon Sep 17 00:00:00 2001 From: Emilio Ziniades Date: Sun, 12 May 2024 15:54:40 +0200 Subject: feat(table of contents): Add table of contents This feature is disabled by default, but can be enabled/disabled globally or per-page. Zola already provides `page.toc`, this PR simply adds a macro to recursively render that data in nested `ul`s. It also establishes some configuration options to display it and set a maximum headers level. --- README.md | 23 +++++++++++++++++++++++ config.toml | 6 +++++- content/zola.md | 1 + templates/macros.html | 12 ++++++++++++ templates/page.html | 7 +++++++ theme.toml | 5 +++++ 6 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 templates/macros.html (limited to 'theme.toml') diff --git a/README.md b/README.md index 7ebe80b..5152949 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,29 @@ The contents of the `index`-page may be changed by editing your `content/_index. Add a `custom_head.html`-file to your `templates/`-directory. In there you may add a `