docs: document all theme front matter below [params] #1064

This commit is contained in:
Sören Weber 2025-03-21 12:27:29 +01:00
parent 7701bac055
commit e2a1704c3c
No known key found for this signature in database
GPG Key ID: BEC6D55545451B6D
34 changed files with 196 additions and 252 deletions

View File

@ -9,33 +9,24 @@
# Hugo
# These options usually apply to other themes as well.
# The title to be used for links to the main page
# Default: not set
# This name will be used for the link to the main page in the upper section
# of the menu. If not set, `title` from the Hugo settings will be used.
linkTitle = 'Relearn'
# The author of your site.
# Default: not set
# This will be used in HTML meta tags, the open graph protocol and twitter
# cards.
# You can also set `author.email` if you want to publish this information.
author.name = 'Sören Weber'
# The author's email address of your site.
# Default: not set
# This will be used in HTML meta tags, the open graph protocol and twitter
# cards.
author.emailname = ''
# The social media image of your site.
# Default: not set
# This is used for generating social media meta information for the opengraph
# protocol and twitter cards.
# This can be overridden in the page's frontmatter.
images = [ 'images/hero.png' ]
# Admin options for social media.
# Default: not set
# Configuration for the Open Graph protocol and Twitter Cards adhere to Hugo's
# implementation. See the Hugo docs for possible values.
social.facebook_admin = ''
social.twitter = ''
###############################################################################
# Relearn Theme
# These options are specific to the Relearn theme.
@ -44,6 +35,12 @@ social.twitter = ''
# Branding
# These options set your overall visual appearance.
# The title to be used for links to the main page
# Default: not set
# This name will be used for the link to the main page in the upper section
# of the menu. If not set, `title` from the Hugo settings will be used.
linkTitle = 'Relearn'
# Used color variants.
# Default: 'auto'
# This sets one or more color variants, available to your readers to choose

View File

@ -15,7 +15,7 @@ To set default values for all links, use [link effects](authoring/linking/linkef
For example, this will open links in the same tab
{{< multiconfig >}}
{{< multiconfig section=params >}}
externalLinkTarget = '_self'
{{< /multiconfig >}}
@ -29,7 +29,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 >}}
{{< multiconfig section=params >}}
link.errorlevel = 'warning'
image.errorlevel = 'warning'
{{< /multiconfig >}}
@ -38,6 +38,6 @@ image.errorlevel = 'warning'
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} In case you want to use link warnings but are bothered by false negatives, you can configure an ignore list of regular expressions. The referenced address will be checked against all regexes of this list. If the address matches at least one regex, no output will be written to the console. The check uses [Hugo's `findRE` function](https://gohugo.io/functions/strings/findre/).
{{< multiconfig >}}
{{< multiconfig section=params >}}
errorignore = [ '^/authoring/', '^/configuration/' ]
{{< /multiconfig >}}

View File

@ -14,8 +14,8 @@ Throughout the documentation, theme-specific front matter is marked with a {{% b
Add theme front matter directly to the root of your page's front matter. For example:
{{< multiconfig fm=true >}}
math = true
{{< multiconfig fm=true section=params >}}
math = true
{{< /multiconfig >}}
## Index
@ -26,7 +26,7 @@ Add theme front matter directly to the root of your page's front matter. For exa
Here's a list of all available front matter with example values. Default values are described in the [annotated example](#annotated-front-matter) below or in each front matter's documentation.
{{< multiconfig fm=true >}}
{{< multiconfig fm=true section=params >}}
{{% include "frontmatter.toml" %}}
{{< /multiconfig >}}
@ -34,5 +34,6 @@ Here's a list of all available front matter with example values. Default values
````toml {title="toml"}
+++
[params]
{{% include "frontmatter.toml" %}}+++
````

View File

@ -10,12 +10,12 @@
# This is used for generating social media meta information for the opengraph
# protocol and twitter cards.
# If not set, the set value of your site's hugo.toml is used.
images = [ 'images/hero.png' ]
# images = [ 'images/hero.png' ]
# The title of your page.
# Default: not set
# A page without a title is treated as a hidden page.
title = 'Example Page'
# title = 'Example Page'
# The description of your page.
# Default: not set
@ -24,13 +24,13 @@ title = 'Example Page'
# If not set, the set value of your site's hugo.toml is used for the html
# meta tag, social media meta information for the opengraph protocol and
# twitter cards.
description = ''
# description = ''
# The page design to be used
# Default: not set
# This decides the layout of your page. The theme ships 'home', 'chapter' and
# 'default'. If not set, 'default' is taken.
type = ''
# type = ''
###############################################################################
# Relearn Theme

View File

@ -32,20 +32,18 @@ If an effect accepts boolean values, only setting the parameter name without a v
Without any settings in your `hugo.toml` `imageEffects` defaults to
{{< multiconfig >}}
[imageEffects]
border = false
dataurl = false
inlinecontent = false
lazy = true
lightbox = true
shadow = false
imageEffects.border = false
imageEffects.dataurl = false
imageEffects.inlinecontent = false
imageEffects.lazy = true
imageEffects.lightbox = true
imageEffects.shadow = false
{{< /multiconfig >}}
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} This can be overridden in a pages front matter for example by
{{< multiconfig fm=true >}}
[imageEffects]
lazy = false
{{< multiconfig fm=true section=params >}}
imageEffects.lazy = false
{{< /multiconfig >}}
Or by explicitly override settings by URL query parameter
@ -57,10 +55,10 @@ Or by explicitly override settings by URL query parameter
The settings applied to the above image would be
{{< multiconfig >}}
border = true
dataurl = false
inlinecontent = false
lazy = true
lightbox = false
shadow = false
imageEffects.border = true
imageEffects.dataurl = false
imageEffects.inlinecontent = false
imageEffects.lazy = true
imageEffects.lightbox = false
imageEffects.shadow = false
{{< /multiconfig >}}

View File

@ -28,16 +28,14 @@ If an effect accepts boolean values, only setting the parameter name without a v
Without any settings in your `hugo.toml` `linkEffects` defaults to
{{< multiconfig >}}
[linkEffects]
download = false
target = false
linkEffects.download = false
linkEffects.target = false
{{< /multiconfig >}}
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} This can be overridden in a pages front matter for example by
{{< multiconfig fm=true >}}
[linkEffects]
target = '_blank'
{{< multiconfig fm=true section=params >}}
linkEffects.target = '_blank'
{{< /multiconfig >}}
Or by explicitly override settings by URL query parameter
@ -49,6 +47,6 @@ Or by explicitly override settings by URL query parameter
The settings applied to the above link would be
{{< multiconfig >}}
download = false
target = '_self'
linkEffects.download = false
linkEffects.target = '_self'
{{< /multiconfig >}}

View File

@ -42,7 +42,7 @@ images = [ 'images/hero.png' ]
[See how you can further configure visibility](configuration/content/hidden) throughout your site.
{{< multiconfig fm=true >}}
{{< multiconfig fm=true section=params >}}
hidden = true
{{< /multiconfig >}}
@ -52,7 +52,7 @@ hidden = true
You also may want to [apply further CSS](configuration/customization/extending#adding-javascript-or-stylesheets-to-all-pages) in this case.
{{< multiconfig fm=true >}}
{{< multiconfig fm=true section=params >}}
headingPre = '<i class="fab fa-github"></i> '
{{< /multiconfig >}}
@ -66,7 +66,7 @@ headingPre = '<i class="fab fa-github"></i> '
See how to further [configure this information](configuration/content/meta) on a site-wide basis.
{{< multiconfig fm=true >}}
{{< multiconfig fm=true section=params >}}
LastModifierDisplayName = 'Santa Claus'
LastModifierEmail = 'santa@example.com'
date = 2000-12-24T00:00:00-12:00

View File

@ -43,9 +43,8 @@ The theme offers the recommended [advanced configuration mode](#theme-variant-ad
Set `themeVariant` to your theme CSS file name:
{{< multiconfig file=hugo >}}
[params]
themeVariant = 'relearn-light'
{{< multiconfig file=hugo section=params >}}
themeVariant = 'relearn-light'
{{< /multiconfig >}}
Place your theme file in `assets/css` or `themes/hugo-theme-relearn/assets/css`. Name it `theme-*.css`.
@ -56,9 +55,8 @@ In the above example, the path of your theme file must be `assets/css/theme-rele
To let the reader choose between multiple variants by displaying a variant switcher, set `themeVariant` like this:
{{< multiconfig file=hugo >}}
[params]
themeVariant = [ 'relearn-light', 'relearn-dark' ]
{{< multiconfig file=hugo section=params >}}
themeVariant = [ 'relearn-light', 'relearn-dark' ]
{{< /multiconfig >}}
The first variant is the default, and a selector will appear if there's more than one.
@ -69,9 +67,8 @@ If you want to have more control, where the variant switcher is positioned or yo
Use the `auto` value to match OS light/dark settings. Usually it makes sense to set it in the first position and make it the default.
{{< multiconfig file=hugo >}}
[params]
themeVariant = [ 'auto', 'red' ]
{{< multiconfig file=hugo section=params >}}
themeVariant = [ 'auto', 'red' ]
{{< /multiconfig >}}
If you don't configure anything else, the theme will default to use `relearn-light` for light mode and `relearn-dark` for dark mode.
@ -80,9 +77,8 @@ Default is `relearn-light` for light and `relearn-dark` for dark mode. These def
You can override the default with `themeVariantAuto`:
{{< multiconfig file=hugo >}}
[params]
themeVariantAuto = [ 'learn', 'neon' ]
{{< multiconfig file=hugo section=params >}}
themeVariantAuto = [ 'learn', 'neon' ]
{{< /multiconfig >}}
### Advanced {#theme-variant-advanced}
@ -93,19 +89,17 @@ Like with the [multiple variants](#multiple-variants) option, you are defining y
Again, in this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer if the array contains more than one entry.
{{< multiconfig file=hugo >}}
[params]
themeVariant = [ 'relearn-light', 'relearn-dark' ]
{{< multiconfig file=hugo section=params >}}
themeVariant = [ 'relearn-light', 'relearn-dark' ]
{{< /multiconfig >}}
you now write it that way:
{{< multiconfig file=hugo >}}
[params]
[[params.themeVariant]]
identifier = 'relearn-light'
[[params.themeVariant]]
identifier = 'relearn-dark'
{{< multiconfig file=hugo section=params >}}
themeVariant = [
{identifier = 'relearn-light'},
{identifier = 'relearn-dark'}
]
{{< /multiconfig >}}
The `identifier` option is mandatory and equivalent to the string in the first example. Further options can be configured, see the table below.
@ -120,8 +114,7 @@ The `identifier` option is mandatory and equivalent to the string in the first e
#### Example Configuration
{{< multiconfig file=hugo >}}
[params]
{{< multiconfig file=hugo section=params >}}
themeVariant = [
{ identifier = 'relearn-auto', name = 'Relearn Light/Dark', auto = [] },
{ identifier = 'relearn-light' },
@ -164,9 +157,8 @@ In case you like a shipped variant but only want to tweak some aspects, you have
Afterwards, put this in your `hugo.toml` to use your new variant:
{{< multiconfig file=hugo >}}
[params]
themeVariant = 'my-branding'
{{< multiconfig file=hugo section=params >}}
themeVariant = 'my-branding'
{{< /multiconfig >}}
In comparison to _copy and change_, this has the advantage that you profit from any adjustments to the `relearn-light` variant while keeping your modifications.

View File

@ -14,16 +14,14 @@ You can change what happens when you click the anchor icon in your `hugo.toml` f
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Set `disableAnchorCopy=true` to prevent copying the anchor link when you click the icon.
{{< multiconfig file=hugo >}}
[params]
disableAnchorCopy = true
{{< multiconfig file=hugo section=params >}}
disableAnchorCopy = true
{{< /multiconfig >}}
## Scroll to Heading
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Set `disableAnchorScrolling=true` to stop the page from scrolling to the heading when you click the anchor icon.
{{< multiconfig file=hugo >}}
[params]
disableAnchorScrolling = true
{{< multiconfig file=hugo section=params >}}
disableAnchorScrolling = true
{{< /multiconfig >}}

View File

@ -20,25 +20,22 @@ By default, hidden pages are only hidden from human visitors. Search engines can
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} To remove hidden pages from search results, use `disableSearchHiddenPages=true`.
{{< multiconfig file=hugo >}}
[params]
disableSearchHiddenPages = true
{{< multiconfig file=hugo section=params >}}
disableSearchHiddenPages = true
{{< /multiconfig >}}
## Hide from Search Engines
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} To hide pages from search engines by removing them from the sitemap, RSS feed and [make them `nofollow`](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#directives), use `disableSeoHiddenPages=true`.
{{< multiconfig file=hugo >}}
[params]
disableSeoHiddenPages = true
{{< multiconfig file=hugo section=params >}}
disableSeoHiddenPages = true
{{< /multiconfig >}}
## Hide from Taxonomies
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} To prevent hidden pages from appearing on taxonomy and term pages, use `disableTagHiddenPages=true`. If this makes a term's count zero, an empty term page will still be created but not linked.
{{< multiconfig file=hugo >}}
[params]
disableTagHiddenPages = true
{{< multiconfig file=hugo section=params >}}
disableTagHiddenPages = true
{{< /multiconfig >}}

View File

@ -16,9 +16,8 @@ If you're only using a web server scenario and dislike this, you can reset to Hu
For the file system scenario, you are not allowed to change this value.
{{< multiconfig file=hugo >}}
[params]
disableExplicitIndexURLs = true
{{< multiconfig file=hugo section=params >}}
disableExplicitIndexURLs = true
{{< /multiconfig >}}
## Legacy Cross-Language Links
@ -37,7 +36,6 @@ In configurations using a **baseURL** with a **subdirectory** and having **relat
To work around this, you can activate a patched version of the shortcode by setting `disableDefaultRelref=true`.
{{< multiconfig file=hugo >}}
[params]
disableDefaultRelref = true
{{< multiconfig file=hugo section=params >}}
disableDefaultRelref = true
{{< /multiconfig >}}

View File

@ -16,34 +16,30 @@ In cases where Git information is not available, the theme falls back to `LastMo
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can disable the output of an author's name and its according email address by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorName = true
{{< multiconfig file=hugo section=params >}}
hideAuthorName = true
{{< /multiconfig >}}
## Disable Display of Author's Email
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} The author's email, when displayed, is presented as a clickable mailto link, providing a convenient way for readers to reach out. You can disable the output of an author's email address by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorEmail = true
{{< multiconfig file=hugo section=params >}}
hideAuthorEmail = true
{{< /multiconfig >}}
## Disable Display of Authoring Date
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} # If the standard content-footer finds an authoring date, you can disable its output by setting this parameter to `true`.
{{< multiconfig file=hugo >}}
[params]
hideAuthorDate = true
{{< multiconfig file=hugo section=params >}}
hideAuthorDate = true
{{< /multiconfig >}}
## Adjust the Timestamp Format
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can overwrite the default date format used when displaying a pages meta information. See [the Hugo docs](https://gohugo.io/functions/time/format/#localization) for possible values.
{{< multiconfig file=hugo >}}
[params]
dateFormat = ':date_medium'
{{< multiconfig file=hugo section=params >}}
dateFormat = ':date_medium'
{{< /multiconfig >}}

View File

@ -16,18 +16,16 @@ Learn how to turn off the breadcrumbs completely and further [configure the topb
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} By default the term pages of a taxonomy will display the breadcrumb for each page. Set `disableTermBreadcrumbs=true` to remove the breadcrumb if the term pages look to cluttered.
{{< multiconfig file=hugo >}}
[params]
disableRootBreadcrumb = true
breadcrumbSeparator = '/'
disableTermBreadcrumbs = true
{{< multiconfig file=hugo section=params >}}
disableRootBreadcrumb = true
breadcrumbSeparator = '/'
disableTermBreadcrumbs = true
{{< /multiconfig >}}
## Titles
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can override the default title separator by using `titleSeparator='|'`.
{{< multiconfig file=hugo >}}
[params]
titleSeparator = '|'
{{< multiconfig file=hugo section=params >}}
titleSeparator = '|'
{{< /multiconfig >}}

View File

@ -40,9 +40,9 @@ For example, to create a shortcode called `myshortcode` that needs the `jquery`
2. {{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Add this to your `hugo.toml`:
{{< multiconfig file=hugo >}}
[params.relearn.dependencies]
[params.relearn.dependencies.myshortcode]
{{< multiconfig file=hugo section=params >}}
[relearn.dependencies]
[relearn.dependencies.myshortcode]
name = 'MyShortcode'
{{< /multiconfig >}}

View File

@ -15,38 +15,34 @@ If you don't configure anything in your `hugo.toml`, the image effects default t
## Default Values
{{< multiconfig >}}
[imageEffects]
border = false
dataurl = false
inlinecontent = false
lazy = true
lightbox = true
shadow = false
imageEffects.border = false
imageEffects.dataurl = false
imageEffects.inlinecontent = false
imageEffects.lazy = true
imageEffects.lightbox = true
imageEffects.shadow = false
{{< /multiconfig >}}
## Configuration
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can change these settings in your `hugo.toml` and add arbitrary custom effects as boolean values (like `bg-white` in the below snippet).
{{< multiconfig file=hugo >}}
[params]
[params.imageEffects]
bg-white = true
border = true
lazy = false
{{< multiconfig file=hugo section=params >}}
imageEffects.bg-white = true
imageEffects.border = true
imageEffects.lazy = false
{{< /multiconfig >}}
This would result in
{{< multiconfig >}}
[imageEffects]
bg-white = true
border = true
dataurl = false
inlinecontent = false
lazy = false
lightbox = true
shadow = false
imageEffects.bg-white = true
imageEffects.border = true
imageEffects.dataurl = false
imageEffects.inlinecontent = false
imageEffects.lazy = false
imageEffects.lightbox = true
imageEffects.shadow = false
{{< /multiconfig >}}
### Example

View File

@ -15,29 +15,26 @@ If you don't configure anything in your `hugo.toml`, the link effects default to
## Default Values
{{< multiconfig >}}
[linkEffects]
download = false
target = false
linkEffects.download = false
linkEffects.target = false
{{< /multiconfig >}}
## Configuration
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can change these settings in your `hugo.toml` and add arbitrary custom effects as boolean values (like `bg-white` in the below snippet).
{{< multiconfig file=hugo >}}
[params]
[params.linkEffects]
bg-white = true
target = '_blank'
{{< multiconfig file=hugo section=params >}}
linkEffects.bg-white = true
linkEffects.target = '_blank'
{{< /multiconfig >}}
This would result in
{{< multiconfig >}}
[linkEffects]
bg-white = true
download = false
target = '_blank'
linkEffects.bg-white = true
linkEffects.download = false
linkEffects.target = '_blank'
{{< /multiconfig >}}
### Example

View File

@ -13,9 +13,8 @@ Throughout the documentation, theme-specific options are marked with a {{% badge
Add theme options to the `params` section of your `hugo.toml`. For example:
{{< multiconfig file=hugo >}}
[params]
math = true
{{< multiconfig file=hugo section=params >}}
math = true
{{< /multiconfig >}}
## Index

View File

@ -10,9 +10,8 @@ weight = 2
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} With the [default partials](configuration/branding/logo#change-the-logo) for the logo, The site title will also be used for the text at the top of the sidebar. If you want to show a different text in the sidebar, you can overwrite `linkTitle`.
{{< multiconfig file=hugo >}}
[params]
linkTitle = 'Relearn'
{{< multiconfig file=hugo section=params >}}
linkTitle = 'Relearn'
{{< /multiconfig >}}
## Home Button Configuration
@ -23,9 +22,8 @@ By default, the theme displays a home button between search form and navigation
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} To hide the Home button on the left menu, set `disableLandingPageButton=true`.
{{< multiconfig file=hugo >}}
[params]
disableLandingPageButton = true
{{< multiconfig file=hugo section=params >}}
disableLandingPageButton = true
{{< /multiconfig >}}
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} To change its icon or text, configure the `landingPageName` for your defined languages.
@ -43,9 +41,8 @@ By default, the theme displays a home button between search form and navigation
If this option isn't set for a specific language, it will use these default values
{{< multiconfig file=hugo >}}
[params]
landingPageName = '<i class="fa-fw fas fa-home"></i> Home'
{{< multiconfig file=hugo section=params >}}
landingPageName = '<i class="fa-fw fas fa-home"></i> Home'
{{< /multiconfig >}}
For a free configuration of the header menus, see [configuration of the sidebar menus](/configuration/sidebar/menus#defining-sidebar-menus).
@ -58,9 +55,8 @@ If you want to have more control, where the history clearer is positioned or you
Note that checkmarks will disappear if you rebuild your site, as the page IDs may change.
{{< multiconfig file=hugo >}}
[params]
showVisitedLinks = true
{{< multiconfig file=hugo section=params >}}
showVisitedLinks = true
{{< /multiconfig >}}
## Footer

View File

@ -36,7 +36,7 @@ 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 >}}
{{< multiconfig section=params >}}
alwaysopen = false
{{< /multiconfig >}}
@ -46,7 +46,7 @@ alwaysopen = false
{{% badge color="blueviolet" icon="bars" title=" " %}}Menu{{% /badge %}} For Hugo menus, you have to set `params.collapsibleMenu=true` instead.
{{< multiconfig >}}
{{< multiconfig section=params >}}
collapsibleMenu = true
{{< /multiconfig >}}
@ -67,7 +67,7 @@ collapsibleMenu = true
Hugo menus can only be sorted using the weight method.
{{< multiconfig>}}
{{< multiconfig >}}
weight = 5
{{< /multiconfig >}}
@ -77,7 +77,7 @@ Using the `weight` for sorting can get cumbersome if you, for example, just want
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Use `ordersectionsby` to sort by other aspects. See the [children shortcode](shortcodes/children#parameter) for a complete list.
{{< multiconfig >}}
{{< multiconfig section=params >}}
ordersectionsby = 'linktitle'
{{< /multiconfig >}}
@ -106,7 +106,8 @@ The example below uses the GitHub icon for an entry of a page menu.
{{< multiconfig fm=true >}}
title = 'GitHub Repo'
menuPre = '<i class="fab fa-github"></i> '
[params]
menuPre = '<i class="fab fa-github"></i> '
{{< /multiconfig >}}
## Disable Menu Entries
@ -169,9 +170,8 @@ By default, the theme supports one additional Hugo menu below the page menu in t
You can disable this title with `disableShortcutsTitle=true`.
{{< multiconfig file=hugo >}}
[params]
disableShortcutsTitle = true
{{< multiconfig file=hugo section=params >}}
disableShortcutsTitle = true
{{< /multiconfig >}}
To change the title, override your translation file.
@ -240,7 +240,7 @@ If you don't set these options in your `hugo.toml`, the theme defaults as follow
However, if you decide to overwrite these options, the configuration for those features will not be taken into account anymore. For example, if you want to reorder the `sidebarfootermenus` by setting
{{< multiconfig >}}
{{< multiconfig section=params >}}
sidebarfootermenus = [
{ type = 'divider' },
{ type = 'custom', elements = [ { type = 'historyclearer' }, { type = 'variantswitcher' }, { type = 'languageswitcher' } ] }
@ -303,7 +303,7 @@ A horizontal ruler
The following example configures the language switcher and history clearer into the menu header, only shows the the page menu in the main sidebar section and keeps the menu footer empty:
{{< multiconfig >}}
{{< multiconfig section=params >}}
sidebarheadermenus = [
{ type = 'custom', elements = [
{ type = 'languageswitcher' },
@ -390,7 +390,8 @@ For that create a new page with the following front matter
{{< multiconfig fm=true file="content/crows-nest-incident.md" >}}
title = "The Crow's Nest Incident"
menuPageRef = '/log/third-day'
[params]
menuPageRef = '/log/third-day'
{{< /multiconfig >}}
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} If you want to link to an external page instead, you can use `menuUrl` instead of `menuPageRef`.

View File

@ -22,11 +22,10 @@ Each level requires the previous one to be enabled. If no search is configured,
- Search popup: `disableSearchIndex=true`
- Dedicated search page: `disableSearchPage=true`
{{< multiconfig file=hugo >}}
[params]
disableSearch = true
disableSearchIndex = true
disableSearchPage = true
{{< multiconfig file=hugo section=params >}}
disableSearch = true
disableSearchIndex = true
disableSearchPage = true
{{< /multiconfig >}}
{{%badge style="cyan" icon="gears" title=" "%}}Option{{%/badge%}} Default URLs can be changed with the following parameter
@ -34,10 +33,9 @@ Each level requires the previous one to be enabled. If no search is configured,
- Search popup: `searchindex.js` set by `searchIndexURL`
- Dedicated search page: `search/index.html` set by `searchPageURL`
{{< multiconfig file=hugo >}}
[params]
searchIndexURL = 'omnisearchindex.js'
searchPageURL = 'omnisearch'
{{< multiconfig file=hugo section=params >}}
searchIndexURL = 'omnisearchindex.js'
searchPageURL = 'omnisearch'
{{< /multiconfig >}}
{{% notice note %}}
@ -61,9 +59,8 @@ The [Lunr](https://lunrjs.com) search library doesn't support all languages of t
{{%badge style="cyan" icon="gears" title=" "%}}Option{{%/badge%}} In case your page's content contains text in multiple languages (for example, you are writing a Piratish documentation for your English API), you can set those languages in `additionalContentLanguage` to broaden the search.
{{< multiconfig file=hugo >}}
[params]
additionalContentLanguage = [ "en" ]
{{< multiconfig file=hugo section=params >}}
additionalContentLanguage = [ "en" ]
{{< /multiconfig >}}
You can add multiple languages to this array.

View File

@ -11,11 +11,10 @@ weight = 4
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} The theme uses author details in various parts of your site, like RSS feeds and meta tags.
{{< multiconfig file=hugo >}}
[params]
[params.author]
name = 'Santa Claus'
email = 'santa@example.com'
{{< multiconfig file=hugo section=params >}}
[author]
name = 'Santa Claus'
email = 'santa@example.com'
{{< /multiconfig >}}
## Site Title

View File

@ -152,7 +152,6 @@ If you want to have more control, where the language switcher is positioned or y
To disable the language switcher set `disableLanguageSwitchingButton=true`
{{< multiconfig file=hugo >}}
[params]
disableLanguageSwitchingButton = true
{{< multiconfig file=hugo section=params >}}
disableLanguageSwitchingButton = true
{{< /multiconfig >}}

View File

@ -14,9 +14,8 @@ This isn't a security risk and helps us support you better.
To turn this off, set `disableGeneratorVersion=true`.
{{< multiconfig file=hugo >}}
[params]
disableGeneratorVersion = true
{{< multiconfig file=hugo section=params >}}
disableGeneratorVersion = true
{{< /multiconfig >}}
If you also want to turn off [Hugo's version meta tag](https://gohugo.io/getting-started/configuration/#disablehugogeneratorinject), use `disableHugoGeneratorInject=true`.
@ -29,9 +28,8 @@ This is good for production sites but can be problematic during development. It
To disable this, set `disableAssetsBusting=true`.
{{< multiconfig file=hugo >}}
[params]
disableAssetsBusting = true
{{< multiconfig file=hugo section=params >}}
disableAssetsBusting = true
{{< /multiconfig >}}
## Disabling IDs for Interactive HTML Elements
@ -42,16 +40,14 @@ This is necessary for the theme to work properly, but it can make comparing outp
To turn this off, set `disableRandomIds=true`. Note, that this will result in a non-functional site!.
{{< multiconfig file=hugo >}}
[params]
disableRandomIds = true
{{< multiconfig file=hugo section=params >}}
disableRandomIds = true
{{< /multiconfig >}}
## Disabling Assets Minification
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} If `minify=true`, further theme assets will be minified during build. If no value is set, the theme will avoid minification if you have started with `hugo server` and otherwise will minify.
{{< multiconfig file=hugo >}}
[params]
minify = false
{{< multiconfig file=hugo section=params >}}
minify = false
{{< /multiconfig >}}

View File

@ -162,18 +162,16 @@ To stay with the above example, here's the configuration for your current versio
You can disable it be setting the `disableVersionWarning` option to `true` in your `hugo.toml`.
{{< multiconfig file=hugo >}}
[params]
disableVersionWarning = true
{{< multiconfig file=hugo section=params >}}
disableVersionWarning = true
{{< /multiconfig >}}
## Change URL of the Version Index
{{%badge style="cyan" icon="gears" title=" "%}}Option{{%/badge%}} The default URL for the version index can be changed with the `versionIndexURL` parameter
{{< multiconfig file=hugo >}}
[params]
versionIndexURL = 'myversionindex.js'
{{< multiconfig file=hugo section=params >}}
versionIndexURL = 'myversionindex.js'
{{< /multiconfig >}}
{{% notice note %}}

View File

@ -16,16 +16,14 @@ weight = -23
Change your previous setting from
{{< multiconfig file=hugo >}}
[params]
author = 'Hugo'
{{< multiconfig file=hugo section=params >}}
author = 'Hugo'
{{< /multiconfig >}}
to
{{< multiconfig file=hugo >}}
[params]
author.name = 'Hugo'
{{< multiconfig file=hugo section=params >}}
author.name = 'Hugo'
{{< /multiconfig >}}
- {{% badge style="note" title=" " %}}Change{{% /badge %}} Taxonomy [term pages](https://gohugo.io/content-management/taxonomies#add-custom-metadata-to-a-taxonomy-or-term) now add the breadcrumb for each listed page. If this gets too crowded for you, you can turn the breadcrumbs off in your `hugo.toml` by adding `disableTermBreadcrumbs=true`.

View File

@ -28,9 +28,8 @@ weight = -1
The shortcode is deactivated by default and can be activated by setting
{{< multiconfig file=hugo >}}
[params]
disableDefaultRelref = true
{{< multiconfig file=hugo section=params >}}
disableDefaultRelref = true
{{< /multiconfig >}}
in your `hugo.toml`. Only do this if your site fulfills **all of the above assumptions**.

View File

@ -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 >}}
{{< multiconfig section=params >}}
highlightWrap=false
{{< /multiconfig >}}
@ -121,9 +121,8 @@ highlightWrap=false
If you want to disable this feature, set `disableInlineCopyToClipBoard=true`.
{{< multiconfig file=hugo >}}
[params]
disableInlineCopyToClipBoard = true
{{< multiconfig file=hugo section=params >}}
disableInlineCopyToClipBoard = true
{{< /multiconfig >}}
### Copy to Clipboard for Block Code
@ -132,9 +131,8 @@ If you want to disable this feature, set `disableInlineCopyToClipBoard=true`.
Set `disableHoverBlockCopyToClipBoard=true` to disable the hover effect and always show the button.
{{< multiconfig file=hugo >}}
[params]
disableHoverBlockCopyToClipBoard = true
{{< multiconfig file=hugo section=params >}}
disableHoverBlockCopyToClipBoard = true
{{< /multiconfig >}}
### Setting a Specific Color Scheme

View File

@ -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 >}}
{{< multiconfig section=params >}}
include.errorlevel = 'warning'
{{< /multiconfig >}}

View File

@ -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 >}}
{{< multiconfig section=params >}}
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 >}}
{{< multiconfig section=params >}}
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 >}}
{{< multiconfig section=params >}}
math = true
{{< /multiconfig >}}

View File

@ -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 >}}
{{< multiconfig section=params >}}
mermaidZoom = true
{{< /multiconfig >}}
@ -91,7 +91,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 >}}
{{< multiconfig section=params >}}
mermaidInitialize = '{ "securityLevel": "loose" }'
{{< /multiconfig >}}
@ -101,7 +101,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 >}}
{{< multiconfig section=params >}}
customMermaidURL = 'https://unpkg.com/mermaid/dist/mermaid.min.js'
{{< /multiconfig >}}
@ -111,7 +111,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 >}}
{{< multiconfig section=params >}}
mermaid.force = true
{{< /multiconfig >}}

View File

@ -77,8 +77,7 @@ If you want to display a transparent expandable box without any border, you can
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Besides the predefined `style` values [from above](#parameter), you are able to define your own.
{{< multiconfig file=hugo >}}
[params]
{{< multiconfig file=hugo section=params >}}
boxStyle = [
{ identifier = 'magic', i18n = '', title = 'Magic', icon = 'rainbow', color = 'gold' }
]

View File

@ -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 >}}
{{< multiconfig section=params >}}
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 >}}
{{< multiconfig section=params >}}
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 >}}
{{< multiconfig section=params >}}
openapi.force = true
{{< /multiconfig >}}

View File

@ -62,10 +62,9 @@ To use formatted parameter, add this in your `hugo.toml`:
Now values containing Markdown will be formatted correctly.
{{< multiconfig file=hugo >}}
[params]
[params.siteparam.test]
text = 'A **nested** parameter <b>with</b> formatting'
{{< multiconfig file=hugo section=params >}}
[siteparam.test]
text = 'A **nested** parameter <b>with</b> formatting'
{{< /multiconfig >}}
```go

View File

@ -1 +1 @@
7.5.0+b825463f1897e63b27191f125fcfafd92a0a627a
7.5.0+7701bac055f1c664e3e449c82bf08a8aae677e9d