From 454b69356bcebf72469a6eb73e8d5ad81f6770c8 Mon Sep 17 00:00:00 2001 From: Valentin Gagarin Date: Sat, 13 Apr 2024 01:31:14 +0200 Subject: [PATCH] set section identification "dynamically" otherwise it's impossible to add navigation entries in a sane way by moving pages. although likely I just don't understand something about this template setup, which appears much more complicated than what's needed here. --- content/docs/contributing/how-to-contribute.md | 2 +- content/docs/help/faq.md | 2 +- content/docs/overview/index.md | 2 +- content/docs/thevision/index.md | 3 +++ themes/adidoks/templates/docs/page.html | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/content/docs/contributing/how-to-contribute.md b/content/docs/contributing/how-to-contribute.md index 9e17eb8..6954d84 100644 --- a/content/docs/contributing/how-to-contribute.md +++ b/content/docs/contributing/how-to-contribute.md @@ -11,7 +11,7 @@ template = "docs/page.html" [extra] lead = "Contribute to cLAN, improve documentation, or submit to showcase." toc = true -top = false +section = "docs" +++ ## Contribute to the code diff --git a/content/docs/help/faq.md b/content/docs/help/faq.md index 55ac747..33962a6 100644 --- a/content/docs/help/faq.md +++ b/content/docs/help/faq.md @@ -11,7 +11,7 @@ template = "docs/page.html" [extra] lead = "Answers to frequently asked questions." toc = true -top = false +section = "docs" +++ ## Keyboard shortcuts for search? diff --git a/content/docs/overview/index.md b/content/docs/overview/index.md index ad61c37..e42a540 100644 --- a/content/docs/overview/index.md +++ b/content/docs/overview/index.md @@ -11,7 +11,7 @@ template = "docs/page.html" [extra] lead = "Overview of cLAN's architecture, components and security" toc = true -top = false +section = "docs" +++ diff --git a/content/docs/thevision/index.md b/content/docs/thevision/index.md index d8ff12a..2130019 100644 --- a/content/docs/thevision/index.md +++ b/content/docs/thevision/index.md @@ -8,6 +8,9 @@ weight = 30 sort_by = "weight" paginator.next = "docs/overview/index.md" template = "docs/page.html" + +[extra] +section = "docs" +++ diff --git a/themes/adidoks/templates/docs/page.html b/themes/adidoks/templates/docs/page.html index d215d83..3aaed6f 100644 --- a/themes/adidoks/templates/docs/page.html +++ b/themes/adidoks/templates/docs/page.html @@ -6,7 +6,7 @@ {% block header %} {# This value is matched by the config.extra.menu.main~url #} - {% set current_section = "docs" %} + {% set current_section = page.extra.section %} {{ macros_header::header(current_section=current_section)}} {% endblock header %}