docs: fix further code formatting #788

This commit is contained in:
Sören Weber 2024-03-02 14:19:46 +01:00
parent d42fa7023e
commit cb7fdcef9f
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
7 changed files with 27 additions and 29 deletions

View file

@ -174,12 +174,12 @@ You can you use this mechanism in your own shortcodes. Say you want to add a sho
1. Add the following snippet to your `hugo.toml` 1. Add the following snippet to your `hugo.toml`
````go {{< multiconfig file=hugo >}}
[params.relearn.dependencies] [params.relearn.dependencies]
[params.relearn.dependencies.myshortcode] [params.relearn.dependencies.myshortcode]
name = "MyShortcode" name = "MyShortcode"
location = "footer" location = "footer"
```` {{< /multiconfig >}}
1. Add the dependency loader file `layouts/partials/dependencies/myshortcode.html`. The loader file will be appended to your header or footer, dependend on the `location` setting in your `hugo.toml`. 1. Add the dependency loader file `layouts/partials/dependencies/myshortcode.html`. The loader file will be appended to your header or footer, dependend on the `location` setting in your `hugo.toml`.

View file

@ -74,17 +74,17 @@ This document shows you what's new in the latest release and flags it with one o
Change your previous setting from Change your previous setting from
````toml {{< multiconfig file=hugo >}}
[params] [params]
author = "Hugo" author = "Hugo"
```` {{< /multiconfig >}}
to to
````toml {{< multiconfig file=hugo >}}
[params] [params]
author.name = "Hugo" 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`. - {{% 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`.
@ -287,8 +287,8 @@ This document shows you what's new in the latest release and flags it with one o
So how to adjust the position of tags starting from the theme's default where tags are only shown above the title? So how to adjust the position of tags starting from the theme's default where tags are only shown above the title?
1. Hide tags above title: Overwrite `content-header.html` with an empty file. 1. Hide tags above title: Overwrite `content-header.html` with an empty file.
2. Show tags between title and content: Overwrite `heading-post.html` and add `{{- partial "tags.html" . }}` to it. 2. Show tags between title and content: Overwrite `heading-post.html` and add `{{ partial "tags.html" . }}` to it.
3. Show tags below content: Overwrite `content-footer.html` and add `{{- partial "tags.html" . }}` to it. 3. Show tags below content: Overwrite `content-footer.html` and add `{{ partial "tags.html" . }}` to it.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The new parameter `breadcrumbSeparator` is now available in your `hugo.toml` to change the - well - separator of the breadcrumb items. An appropriate default is in place if you do not configure anything. - {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The new parameter `breadcrumbSeparator` is now available in your `hugo.toml` to change the - well - separator of the breadcrumb items. An appropriate default is in place if you do not configure anything.
@ -310,7 +310,7 @@ This document shows you what's new in the latest release and flags it with one o
The theme provides Front Matter snippets for its shortcodes. Currently only English and German is supported. Put a reference into your `frontmatter.json` like this The theme provides Front Matter snippets for its shortcodes. Currently only English and German is supported. Put a reference into your `frontmatter.json` like this
````json ````json {title="frontmatter.json"}
{ {
... ...
"frontMatter.extends": [ "frontMatter.extends": [
@ -332,7 +332,7 @@ This document shows you what's new in the latest release and flags it with one o
In case you made changes to the theme that are dependend on this library you can place a copy of jQuery into your `static/js` directory and load it from your own `layouts/partials/custom-header.html` like this: In case you made changes to the theme that are dependend on this library you can place a copy of jQuery into your `static/js` directory and load it from your own `layouts/partials/custom-header.html` like this:
````html ````html {title="layouts/partials/custom-header.html"}
<script src="{{"js/jquery.min.js"| relURL}}" defer></script> <script src="{{"js/jquery.min.js"| relURL}}" defer></script>
```` ````
@ -378,29 +378,28 @@ This document shows you what's new in the latest release and flags it with one o
1. Make the page file a [headless branch bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) (contained in its own subdirectory and called `_index.md`) and add the following frontmatter configuration to the file (see exampleSite's `content/showcase/_index.en.md`). This causes its content to **not** be ontained in the sitemap. 1. Make the page file a [headless branch bundle](https://gohugo.io/content-management/page-bundles/#headless-bundle) (contained in its own subdirectory and called `_index.md`) and add the following frontmatter configuration to the file (see exampleSite's `content/showcase/_index.en.md`). This causes its content to **not** be ontained in the sitemap.
````toml {{< multiconfig fm=true >}}
title = "Showcase" title = "Showcase"
[_build] [_build]
render = "always" render = "always"
list = "never" list = "never"
publishResources = true publishResources = true
```` {{< /multiconfig >}}
2. Store the page file for below a parent headless branch bundle and add the following frontmatter to he **parent** (see exampleSite's `content/more/_index.en.md`). 2. Store the page file for below a parent headless branch bundle and add the following frontmatter to he **parent** (see exampleSite's `content/more/_index.en.md`). **Don't give this page a `title`** as this will cause it to be shown in the breadcrumbs - a thing you most likely don't want.
````toml {{< multiconfig fm=true >}}
# title = "More" ### ATTENTION: Don't give this page a title as this will cause it to be in the breadcrumbs - a thing you most likely don't want
[_build] [_build]
render = "never" render = "never"
list = "never" list = "never"
publishResources = false publishResources = false
```` {{< /multiconfig >}}
In this case, the file itself can be a branch bundle, leaf bundle or simple page (see exampleSite's `content/more/credits.en.md`). This causes its content to be contained in the sitemap. In this case, the file itself can be a branch bundle, leaf bundle or simple page (see exampleSite's `content/more/credits.en.md`). This causes its content to be contained in the sitemap.
````toml {{< multiconfig fm=true >}}
title = "Credits" title = "Credits"
```` {{< /multiconfig >}}
- {{% badge style="note" title=" " %}}Change{{% /badge %}} The required folder name for the [`attachments` shortcode](shortcodes/attachments) was changed for leaf bundles. - {{% badge style="note" title=" " %}}Change{{% /badge %}} The required folder name for the [`attachments` shortcode](shortcodes/attachments) was changed for leaf bundles.
@ -516,7 +515,7 @@ This document shows you what's new in the latest release and flags it with one o
You can revert this behavior by overwriting the `print` output format setting in your `hugo.toml`to: You can revert this behavior by overwriting the `print` output format setting in your `hugo.toml`to:
````toml {{< multiconfig file=hugo >}}
[outputFormats] [outputFormats]
[outputFormats.print] [outputFormats.print]
name= "print" name= "print"
@ -525,7 +524,7 @@ This document shows you what's new in the latest release and flags it with one o
isHTML = true isHTML = true
mediaType = 'text/html' mediaType = 'text/html'
permalinkable = false permalinkable = false
```` {{< /multiconfig >}}
--- ---

View file

@ -49,8 +49,8 @@ The below example sets an explicit value for the `onempty` parameter, overriding
````go ````go
{{ partial "topbar/button/more.html" (dict {{ partial "topbar/button/more.html" (dict
"page" . "page" .
"onempty" "disable" "onempty" "disable"
)}} )}}
```` ````

View file

@ -97,6 +97,5 @@ Just set `disableLanguageSwitchingButton=true` in your `hugo.toml`
{{< multiconfig file=hugo >}} {{< multiconfig file=hugo >}}
[params] [params]
# When using multilingual website, disable the switch language button.
disableLanguageSwitchingButton = true disableLanguageSwitchingButton = true
{{< /multiconfig >}} {{< /multiconfig >}}

View file

@ -145,7 +145,7 @@ If you have shortcuts to pages inside of your project and you don't want them to
publishResources = true publishResources = true
{{< /multiconfig >}} {{< /multiconfig >}}
2. Store the page file for the shortcut below a parent headless branch bundle and add the following frontmatter to he **parent** (see exampleSite's `content/more/_index.en.md`). _Don't give this page a `title` as this will cause it to be in the breadcrumbs - a thing you most likely don't want. 2. Store the page file for the shortcut below a parent headless branch bundle and add the following frontmatter to he **parent** (see exampleSite's `content/more/_index.en.md`). **Don't give this page a `title`** as this will cause it to be shown in the breadcrumbs - a thing you most likely don't want.
{{< multiconfig fm=true >}} {{< multiconfig fm=true >}}
[_build] [_build]

View file

@ -43,8 +43,8 @@ url = "/categories"
If you define [custom taxonomies](https://gohugo.io/content-management/taxonomies/#configure-taxonomies) and want to display a list of them somewhere on your page (often in the `layouts/partials/content-footer.html`) you can call a partial that does the job for you: If you define [custom taxonomies](https://gohugo.io/content-management/taxonomies/#configure-taxonomies) and want to display a list of them somewhere on your page (often in the `layouts/partials/content-footer.html`) you can call a partial that does the job for you:
````md ````go
{{- partial "term-list.html" (dict {{ partial "term-list.html" (dict
"page" . "page" .
"taxonomy" "categories" "taxonomy" "categories"
"icon" "layer-group" "icon" "layer-group"

View file

@ -58,15 +58,15 @@ To use formatted parameter, add this in your `hugo.toml`:
{{< multiconfig file=hugo >}} {{< multiconfig file=hugo >}}
[markup.goldmark.renderer] [markup.goldmark.renderer]
unsafe = true unsafe = true
{{< /multiconfig >}} {{< /multiconfig >}}
Now values containing Markdown will be formatted correctly. Now values containing Markdown will be formatted correctly.
{{< multiconfig file=hugo >}} {{< multiconfig file=hugo >}}
[params] [params]
[params.siteparam.test] [params.siteparam.test]
text = "A **nested** parameter <b>with</b> formatting" text = "A **nested** parameter <b>with</b> formatting"
{{< /multiconfig >}} {{< /multiconfig >}}
```go ```go