set section identification "dynamically"
All checks were successful
check / test (pull_request) Successful in 18s

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.
This commit is contained in:
Valentin Gagarin 2024-04-13 01:31:14 +02:00
parent eea9953bdf
commit 454b69356b
5 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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?

View File

@ -11,7 +11,7 @@ template = "docs/page.html"
[extra]
lead = "Overview of cLAN's architecture, components and security"
toc = true
top = false
section = "docs"
+++

View File

@ -8,6 +8,9 @@ weight = 30
sort_by = "weight"
paginator.next = "docs/overview/index.md"
template = "docs/page.html"
[extra]
section = "docs"
+++

View File

@ -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 %}