From 7f9be0a4ca1b972ec9bb182961f8365a50d13659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Mon, 20 Mar 2023 11:46:19 +0200 Subject: [PATCH] =?UTF-8?q?Sis=C3=A4llysluettelo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Haluaisin saada tasoasetukset sivukohtaisiksi (eikä config.toml:ssa), muttei se näytä toimivan. https://gohugo.io/getting-started/configuration-markup/#table-of-contents --- config.toml | 5 +++++ content/eduskunta2023.md | 7 +++++++ layouts/shortcodes/toc.html | 4 ++++ 3 files changed, 16 insertions(+) create mode 100644 layouts/shortcodes/toc.html diff --git a/config.toml b/config.toml index ccfce12..799a1d9 100644 --- a/config.toml +++ b/config.toml @@ -46,6 +46,11 @@ math = false # enable KaTeX (https://katex.org/) globally [markup.goldmark.renderer] unsafe = true # allow raw HTML in markdown files +[markup] + [markup.tableOfContents] + endLevel = 4 + ordered = false + startLevel = 3 [languages] [languages.fi] diff --git a/content/eduskunta2023.md b/content/eduskunta2023.md index 993ec2f..e94b523 100644 --- a/content/eduskunta2023.md +++ b/content/eduskunta2023.md @@ -1,6 +1,11 @@ +++ title = "Marek Nečada eduskuntaan" date = "2023-03-20" +[markup] + [markup.tableOfContents] + endLevel = 4 + ordered = false + startLevel = 3 +++ # Eduskuntavaalit 2023 @@ -36,6 +41,8 @@ luovuttamista ulkomaalaisille tahoille. ## Vaaliprioriteettini +{{< toc >}} + ### Suurpääoma kuriin #### Reilumpi verotus & kilpailukykyinen Suomi diff --git a/layouts/shortcodes/toc.html b/layouts/shortcodes/toc.html new file mode 100644 index 0000000..bf68ebb --- /dev/null +++ b/layouts/shortcodes/toc.html @@ -0,0 +1,4 @@ +
+ {{ .Page.TableOfContents }} +
+