From a68b5ec4d1b9a246993bb82840cdaeeeb44ff109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 13 Oct 2024 15:01:50 +0200 Subject: [PATCH] docs: add ambiguity to examples combining front matter and options #567 --- .../content/authoring/frontmatter/linking/index.en.md | 4 ++-- .../authoring/frontmatter/navigationmenu/_index.en.md | 8 ++++++-- .../content/authoring/frontmatter/topbar/_index.en.md | 8 ++++---- exampleSite/content/shortcodes/highlight.en.md | 2 +- exampleSite/content/shortcodes/include/index.en.md | 2 +- exampleSite/content/shortcodes/math.en.md | 6 +++--- exampleSite/content/shortcodes/mermaid.en.md | 8 ++++---- exampleSite/content/shortcodes/openapi/_index.en.md | 6 +++--- layouts/partials/version.txt | 2 +- 9 files changed, 25 insertions(+), 21 deletions(-) diff --git a/exampleSite/content/authoring/frontmatter/linking/index.en.md b/exampleSite/content/authoring/frontmatter/linking/index.en.md index ca2bac92d5..f9cb4a5b33 100644 --- a/exampleSite/content/authoring/frontmatter/linking/index.en.md +++ b/exampleSite/content/authoring/frontmatter/linking/index.en.md @@ -13,7 +13,7 @@ weight = 3 For example, this will open links in the same tab -{{< multiconfig fm=true >}} +{{< multiconfig >}} externalLinkTarget = '_self' {{< /multiconfig >}} @@ -27,7 +27,7 @@ Please note that this can not resolve files inside of your `static` directory. T Link warnings are also available for the [include](shortcodes/include#enabling-link-warnings) and [openapi](shortcodes/openapi#enabling-link-warnings) shortcodes. -{{< multiconfig fm=true >}} +{{< multiconfig >}} link.errorlevel = 'warning' image.errorlevel = 'warning' {{< /multiconfig >}} diff --git a/exampleSite/content/authoring/frontmatter/navigationmenu/_index.en.md b/exampleSite/content/authoring/frontmatter/navigationmenu/_index.en.md index 65a609b8a0..3c5ca3a40c 100644 --- a/exampleSite/content/authoring/frontmatter/navigationmenu/_index.en.md +++ b/exampleSite/content/authoring/frontmatter/navigationmenu/_index.en.md @@ -26,11 +26,15 @@ The theme generates the expand state based on the following rules: - all [visible](authoring/meta#hidden) entries show their immediate child entries if `alwaysopen=true`; this proceeds recursively - all remaining entries are not shown +{{< multiconfig >}} +alwaysopen = false +{{< /multiconfig >}} + ## Expander for Nested Sections {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Set `collapsibleMenu=true` to add an expander for submenus. This shows submenus as collapsible trees with a clickable expander. -{{< multiconfig fm=true >}} +{{< multiconfig >}} collapsibleMenu = true {{< /multiconfig >}} @@ -56,7 +60,7 @@ weight = 5 {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Using the `weight` for sorting can get cumbersome if you, for example, just want to sort alphabetically. Each time you add a new page in the set of pages, you may have to renumber some or all of them to make space for the new page. -{{< multiconfig fm=true >}} +{{< multiconfig >}} ordersectionsby = 'linktitle' {{< /multiconfig >}} diff --git a/exampleSite/content/authoring/frontmatter/topbar/_index.en.md b/exampleSite/content/authoring/frontmatter/topbar/_index.en.md index 32a7ef9919..3830bc043a 100644 --- a/exampleSite/content/authoring/frontmatter/topbar/_index.en.md +++ b/exampleSite/content/authoring/frontmatter/topbar/_index.en.md @@ -24,7 +24,7 @@ Your topbar contains the following elements. Some of them are configuarable: {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Set `disableToc=true` to hide the TOC button on all pages. If the button is hidden, also the keyboard shortcut is disabled. This can be overridden in a page's front matter. -{{< multiconfig fm=true >}} +{{< multiconfig >}} disableToc = true {{< /multiconfig >}} @@ -34,7 +34,7 @@ disableToc = true Further breadcrumbs settings can be found in the [content configuration section](configuration/content/titles). -{{< multiconfig fm=true >}} +{{< multiconfig >}} disableBreadcrumb = true {{< /multiconfig >}} @@ -44,7 +44,7 @@ disableBreadcrumb = true The value can contain the macro `${FilePath}` which will be replaced by the file path of your displayed page. If no `${FilePath}` is given in the value, the value is treated as if the `${FilePath}` was appended at the end of the value. This can be overridden in the pages front matter. -{{< multiconfig fm=true >}} +{{< multiconfig >}} editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}' {{< /multiconfig >}} @@ -52,6 +52,6 @@ editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/ {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide the previous/next buttons by setting `disableNextPrev=true`. If the buttons are hidden, also the keyboard shortcuts are disabled. -{{< multiconfig fm=true >}} +{{< multiconfig >}} disableNextPrev = true {{< /multiconfig >}} diff --git a/exampleSite/content/shortcodes/highlight.en.md b/exampleSite/content/shortcodes/highlight.en.md index ccb58caa44..254e2feafa 100644 --- a/exampleSite/content/shortcodes/highlight.en.md +++ b/exampleSite/content/shortcodes/highlight.en.md @@ -111,7 +111,7 @@ If used together with wrapping of long lines, use this recommended settings. Oth You can disable wrapping by setting `highlightWrap=false` or by setting the [`wrap` parameter](#parameter) individually for each code block. -{{< multiconfig fm=true >}} +{{< multiconfig >}} highlightWrap=false {{< /multiconfig >}} diff --git a/exampleSite/content/shortcodes/include/index.en.md b/exampleSite/content/shortcodes/include/index.en.md index e42e639d5a..5494227a96 100644 --- a/exampleSite/content/shortcodes/include/index.en.md +++ b/exampleSite/content/shortcodes/include/index.en.md @@ -58,7 +58,7 @@ Please note that this can not resolve files inside of your `static` directory. T Link warnings are also available for [images & links](authoring/frontmatter/linking#enabling-link-and-image-link-warnings) and the [openapi](shortcodes/openapi#enabling-link-warnings) shortcode. -{{< multiconfig fm=true >}} +{{< multiconfig >}} include.errorlevel = 'warning' {{< /multiconfig >}} diff --git a/exampleSite/content/shortcodes/math.en.md b/exampleSite/content/shortcodes/math.en.md index f002c5c8d7..a41fa3c6f5 100644 --- a/exampleSite/content/shortcodes/math.en.md +++ b/exampleSite/content/shortcodes/math.en.md @@ -74,7 +74,7 @@ You can overwrite the settings by providing a JSON object in `mathJaxInitialize` Keep in mind that initialization settings of your pages front matter overwrite all settings of your configuration options. -{{< multiconfig fm=true >}} +{{< multiconfig >}} mathJaxInitialize = '{ "chtml": { "displayAlign": "left" }, { "tex": { "inlineMath": [["\(", "\)"], ["@", "@"]], displayMath: [["\[", "\]"], ["@@", "@@"]] }, "options": { "enableMenu": false }' {{< /multiconfig >}} @@ -84,7 +84,7 @@ mathJaxInitialize = '{ "chtml": { "displayAlign": "left" }, { "tex": { "inlineMa In case you want do use a different version of the MathJax library but don't want to override the shipped version, you can set `customMathJaxURL` to the URL of the external MathJax library. -{{< multiconfig fm=true >}} +{{< multiconfig >}} customMathJaxURL = 'https://unpkg.com/mathjax/es5/tex-mml-chtml.js' {{< /multiconfig >}} @@ -96,7 +96,7 @@ You can force loading the MathJax library if no shortcode or codefence was used Instead of `math=true` you can also use the alias `math.force=true`. -{{< multiconfig fm=true >}} +{{< multiconfig >}} math = true {{< /multiconfig >}} diff --git a/exampleSite/content/shortcodes/mermaid.en.md b/exampleSite/content/shortcodes/mermaid.en.md index 038f574452..b491c0411f 100644 --- a/exampleSite/content/shortcodes/mermaid.en.md +++ b/exampleSite/content/shortcodes/mermaid.en.md @@ -74,7 +74,7 @@ By default this is disabled. Set `mermaidZoom=true` to enable it. Individual settings of a graphs [`zoom` parameter](#parameter) have precedence over the page's front matter and configuration options in that order. -{{< multiconfig fm=true >}} +{{< multiconfig >}} mermaidZoom = true {{< /multiconfig >}} @@ -88,7 +88,7 @@ Keep in mind that initialization settings of your pages front matter overwrite a In addition, you can merge settings for each individual graph through [diagram directives](https://mermaid-js.github.io/mermaid/#/directives?id=directives) on top of the settings of your page's front matter or configuration options. -{{< multiconfig fm=true >}} +{{< multiconfig >}} mermaidInitialize = '{ "securityLevel": "loose" }' {{< /multiconfig >}} @@ -98,7 +98,7 @@ mermaidInitialize = '{ "securityLevel": "loose" }' In case you want do use a different version of the Mermaid library but don't want to override the shipped version, you can set `customMermaidURL` to the URL of the external Mermaid library. -{{< multiconfig fm=true >}} +{{< multiconfig >}} customMermaidURL = 'https://unpkg.com/mermaid/dist/mermaid.min.js' {{< /multiconfig >}} @@ -108,7 +108,7 @@ customMermaidURL = 'https://unpkg.com/mermaid/dist/mermaid.min.js' You can force loading the Mermaid library if no shortcode or codefence was used by setting `mermaid.force=true`. If a shortcode or codefence was found, this option has no effect. This comes handy in case you are using scripting to render a graph. -{{< multiconfig fm=true >}} +{{< multiconfig >}} mermaid.force = true {{< /multiconfig >}} diff --git a/exampleSite/content/shortcodes/openapi/_index.en.md b/exampleSite/content/shortcodes/openapi/_index.en.md index 31ca6d5ee6..1ccdbeb633 100644 --- a/exampleSite/content/shortcodes/openapi/_index.en.md +++ b/exampleSite/content/shortcodes/openapi/_index.en.md @@ -53,7 +53,7 @@ Please note that this can not resolve files inside of your `static` directory. T Link warnings are also available for [images & links](authoring/frontmatter/linking#enabling-link-and-image-link-warnings) and the [include](shortcodes/include#enabling-link-warnings) shortcode. -{{< multiconfig fm=true >}} +{{< multiconfig >}} openapi.errorlevel = 'warning' {{< /multiconfig >}} @@ -63,7 +63,7 @@ openapi.errorlevel = 'warning' In case you want do use a different version of the Swagger UI library but don't want to override the shipped version, you can set `customOpenapiURL` to the URL of the external Swagger UI library. -{{< multiconfig fm=true >}} +{{< multiconfig >}} customOpenapiURL = 'https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js' {{< /multiconfig >}} @@ -73,7 +73,7 @@ customOpenapiURL = 'https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js' You can force loading the Swagger UI library if no shortcode or codefence was used by setting `openapi.force=true`. If a shortcode or codefence was found, the option has no effect. This comes handy in case you are using scripting to render a spec. -{{< multiconfig fm=true >}} +{{< multiconfig >}} openapi.force = true {{< /multiconfig >}} diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index 6fbf7c5329..88758be42a 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -6.4.0+11bc52f2df72bf90413142902cd9fe98c7374cc6 \ No newline at end of file +6.4.0+c71bc520d76cddfc7f09bd4294fef8c4270bab16 \ No newline at end of file