Skip to content

Commit

Permalink
Updates for v0.123.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Feb 5, 2024
1 parent f37ee37 commit 6d55bbb
Show file tree
Hide file tree
Showing 40 changed files with 1,250 additions and 638 deletions.
42 changes: 24 additions & 18 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,60 +15,66 @@ name = 'Getting started'
weight = 30
identifier = 'getting-started'
pageRef = '/getting-started/'

[[docs]]
name = 'Quick reference'
weight = 40
identifier = 'quick-reference'
pageRef = '/quick-reference/'
post = 'break'

[[docs]]
name = 'Content management'
weight = 40
weight = 50
identifier = 'content-management'
post = 'expanded'
pageRef = '/content-management/'

[[docs]]
name = 'Templates'
weight = 50
weight = 60
identifier = 'templates'
pageRef = '/templates/'

[[docs]]
name = 'Functions'
weight = 60
weight = 70
identifier = 'functions'
pageRef = '/functions/'

[[docs]]
name = 'Methods'
weight = 70
weight = 80
identifier = 'methods'
pageRef = '/methods/'

[[docs]]
name = 'Quick reference'
weight = 80
identifier = 'quick-reference'
pageRef = '/quick-reference/'

[[docs]]
name = 'Variables'
weight = 85
weight = 90
identifier = 'variables'
pageRef = '/variables/'

[[docs]]
name = 'Render hooks'
weight = 100
identifier = 'render-hooks'
pageRef = '/render-hooks/'

[[docs]]
name = 'Hugo Modules'
weight = 90
weight = 110
identifier = 'modules'
pageRef = '/hugo-modules/'

[[docs]]
name = 'Hugo Pipes'
weight = 100
weight = 120
identifier = 'hugo-pipes'
pageRef = '/hugo-pipes/'

[[docs]]
name = 'CLI'
weight = 110
weight = 130
post = 'break'
identifier = 'commands'
pageRef = '/commands/'
Expand All @@ -77,25 +83,25 @@ pageRef = '/commands/'

[[docs]]
name = 'Troubleshooting'
weight = 120
weight = 140
identifier = 'troubleshooting'
pageRef = '/troubleshooting/'

[[docs]]
name = 'Developer tools'
weight = 130
weight = 150
identifier = 'developer-tools'
pageRef = '/tools/'

[[docs]]
name = 'Hosting and deployment'
weight = 140
weight = 160
identifier = 'hosting-and-deployment'
pageRef = '/hosting-and-deployment/'

[[docs]]
name = 'Contribute'
weight = 150
weight = 170
post = 'break'
identifier = 'contribute'
pageRef = '/contribute/'
Expand Down
16 changes: 8 additions & 8 deletions content/en/content-management/build-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ toc: true
aliases: [/content/build-options/]
---

Build options are stored in a reserved front matter object named `_build` with these defaults:
Build options are stored in a reserved front matter object named `build` with these defaults:

{{< code-toggle file=content/example/index.md fm=true >}}
[_build]
[build]
list = 'always'
publishResources = true
render = 'always'
Expand Down Expand Up @@ -85,7 +85,7 @@ Set the build options in front matter:

{{< code-toggle file=content/headless/index.md fm=true >}}
title = 'Headless page'
[_build]
[build]
list = 'never'
publishResources = false
render = 'never'
Expand Down Expand Up @@ -143,7 +143,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
{{< code-toggle file=content/headless/_index.md fm=true >}}
title = 'Headless section'
[[cascade]]
[cascade._build]
[cascade.build]
list = 'local'
publishResources = false
render = 'never'
Expand Down Expand Up @@ -201,10 +201,10 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"

{{< code-toggle file=content/glossary/_index.md fm=true >}}
title = 'Glossary'
[_build]
[build]
render = 'always'
[[cascade]]
[cascade._build]
[cascade.build]
list = 'local'
publishResources = false
render = 'never'
Expand Down Expand Up @@ -247,7 +247,7 @@ Set the build options in front matter:

{{< code-toggle file=content/books/_index.md >}}
title = 'Books'
[_build]
[build]
render = 'never'
list = 'never'
{{< /code-toggle >}}
Expand Down Expand Up @@ -294,7 +294,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
{{< code-toggle file=content/internal/_index.md >}}
title = 'Internal'
[[cascade]]
[cascade._build]
[cascade.build]
render = 'never'
list = 'never'
[cascade._target]
Expand Down
14 changes: 8 additions & 6 deletions content/en/content-management/diagrams.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ keywords: [diagrams,drawing]
menu:
docs:
parent: content-management
weight: 50
weight: 50
weight: 245
weight: 245
toc: true
---
{{< new-in 0.93.0 >}}
Expand Down Expand Up @@ -44,16 +44,18 @@ Will be rendered as:

## Mermaid diagrams

Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`:
Hugo does not provide a built-in template for Mermaid diagrams. Create your own using a [code block render hook]:

```go-html-template
[code block render hook]: /render-hooks/code-blocks

{{< code file=layouts/_default/_markup/render-codeblock-mermaid.html >}}
<pre class="mermaid">
{{- .Inner | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
```
{{< /code >}}

And then include this snippet at the bottom of the content template (**Note**: below `.Content` as the render hook is not processed until `.Content` is executed):
And then include this snippet at the bottom of the content template:

```go-html-template
{{ if .Page.Store.Get "hasMermaid" }}
Expand Down
Loading

0 comments on commit 6d55bbb

Please sign in to comment.