Skip to content
Snippets Groups Projects
Commit c5caa6db authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

[feat] add toc for external content

other option is to add [toc] tag directly inside content
parent 62068f40
No related branches found
No related tags found
No related merge requests found
Pipeline #9979 passed
...@@ -3,4 +3,5 @@ title = "Documentation pour Duniter 1.9" ...@@ -3,4 +3,5 @@ title = "Documentation pour Duniter 1.9"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/index.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/index.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "Advanced commands" ...@@ -3,4 +3,5 @@ title = "Advanced commands"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/advanced-commands.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/advanced-commands.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "Configure" ...@@ -3,4 +3,5 @@ title = "Configure"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/configure.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/configure.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "Docker" ...@@ -3,4 +3,5 @@ title = "Docker"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/docker.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/docker.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "Install" ...@@ -3,4 +3,5 @@ title = "Install"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/install.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/install.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "Manual compilation" ...@@ -3,4 +3,5 @@ title = "Manual compilation"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/manual_compilation.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/manual_compilation.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -3,4 +3,5 @@ title = "WS2P preferred and privileged nodes" ...@@ -3,4 +3,5 @@ title = "WS2P preferred and privileged nodes"
[extra] [extra]
EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/ws2p_preferred_privileged.md" EXTERNAL_CONTENT = "https://git.duniter.org/nodes/typescript/duniter/-/raw/dev/doc/use/ws2p_preferred_privileged.md"
auto_toc = true
+++ +++
\ No newline at end of file
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
<div class="breadcrumb">{{ macros::breadcrumb(path=page.components | safe) }}<a class="w3-text-light-blue" href="https://git.42l.fr/HugoTrentesaux/zola-duniter/src/branch/master/content/{{ page.components | join(sep='/') }}.md">.md</a></div> <div class="breadcrumb">{{ macros::breadcrumb(path=page.components | safe) }}<a class="w3-text-light-blue" href="https://git.42l.fr/HugoTrentesaux/zola-duniter/src/branch/master/content/{{ page.components | join(sep='/') }}.md">.md</a></div>
{{ macros::taxonomies(taxonomies=page.taxonomies) }} {{ macros::taxonomies(taxonomies=page.taxonomies) }}
{% if page.extra.auto_toc %}{{ macros::toc(toc=page.toc, level=1, depth=page.extra.toc_depth | default(value=6)) }}{% endif %}
{{ macros::replace_toc(resource=page) | safe }} {{ macros::replace_toc(resource=page) | safe }}
</main> </main>
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
{#{ macros::taxonomies(taxonomies=section.taxonomies) }#} {#{ macros::taxonomies(taxonomies=section.taxonomies) }#}
{% if section.extra.auto_toc %}{{ macros::toc(toc=section.toc, level=1, depth=section.extra.toc_depth | default(value=6)) }}{% endif %}
{{ macros::replace_toc(resource=section) | safe }} {{ macros::replace_toc(resource=section) | safe }}
</main> </main>
{% endblock content %} {% endblock content %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment