Skip to content

Commit 09969fc

Browse files
committed
Updates for v0.123.0
See gohugoio#2385
1 parent 94f2a36 commit 09969fc

40 files changed

+1250
-638
lines changed

config/_default/menus/menus.en.toml

+24-18
Original file line numberDiff line numberDiff line change
@@ -15,60 +15,66 @@ name = 'Getting started'
1515
weight = 30
1616
identifier = 'getting-started'
1717
pageRef = '/getting-started/'
18+
19+
[[docs]]
20+
name = 'Quick reference'
21+
weight = 40
22+
identifier = 'quick-reference'
23+
pageRef = '/quick-reference/'
1824
post = 'break'
1925

2026
[[docs]]
2127
name = 'Content management'
22-
weight = 40
28+
weight = 50
2329
identifier = 'content-management'
2430
post = 'expanded'
2531
pageRef = '/content-management/'
2632

2733
[[docs]]
2834
name = 'Templates'
29-
weight = 50
35+
weight = 60
3036
identifier = 'templates'
3137
pageRef = '/templates/'
3238

3339
[[docs]]
3440
name = 'Functions'
35-
weight = 60
41+
weight = 70
3642
identifier = 'functions'
3743
pageRef = '/functions/'
3844

3945
[[docs]]
4046
name = 'Methods'
41-
weight = 70
47+
weight = 80
4248
identifier = 'methods'
4349
pageRef = '/methods/'
4450

45-
[[docs]]
46-
name = 'Quick reference'
47-
weight = 80
48-
identifier = 'quick-reference'
49-
pageRef = '/quick-reference/'
50-
5151
[[docs]]
5252
name = 'Variables'
53-
weight = 85
53+
weight = 90
5454
identifier = 'variables'
5555
pageRef = '/variables/'
5656

57+
[[docs]]
58+
name = 'Render hooks'
59+
weight = 100
60+
identifier = 'render-hooks'
61+
pageRef = '/render-hooks/'
62+
5763
[[docs]]
5864
name = 'Hugo Modules'
59-
weight = 90
65+
weight = 110
6066
identifier = 'modules'
6167
pageRef = '/hugo-modules/'
6268

6369
[[docs]]
6470
name = 'Hugo Pipes'
65-
weight = 100
71+
weight = 120
6672
identifier = 'hugo-pipes'
6773
pageRef = '/hugo-pipes/'
6874

6975
[[docs]]
7076
name = 'CLI'
71-
weight = 110
77+
weight = 130
7278
post = 'break'
7379
identifier = 'commands'
7480
pageRef = '/commands/'
@@ -77,25 +83,25 @@ pageRef = '/commands/'
7783

7884
[[docs]]
7985
name = 'Troubleshooting'
80-
weight = 120
86+
weight = 140
8187
identifier = 'troubleshooting'
8288
pageRef = '/troubleshooting/'
8389

8490
[[docs]]
8591
name = 'Developer tools'
86-
weight = 130
92+
weight = 150
8793
identifier = 'developer-tools'
8894
pageRef = '/tools/'
8995

9096
[[docs]]
9197
name = 'Hosting and deployment'
92-
weight = 140
98+
weight = 160
9399
identifier = 'hosting-and-deployment'
94100
pageRef = '/hosting-and-deployment/'
95101

96102
[[docs]]
97103
name = 'Contribute'
98-
weight = 150
104+
weight = 170
99105
post = 'break'
100106
identifier = 'contribute'
101107
pageRef = '/contribute/'

content/en/content-management/build-options.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ toc: true
1212
aliases: [/content/build-options/]
1313
---
1414

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

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

8686
{{< code-toggle file=content/headless/index.md fm=true >}}
8787
title = 'Headless page'
88-
[_build]
88+
[build]
8989
list = 'never'
9090
publishResources = false
9191
render = 'never'
@@ -143,7 +143,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
143143
{{< code-toggle file=content/headless/_index.md fm=true >}}
144144
title = 'Headless section'
145145
[[cascade]]
146-
[cascade._build]
146+
[cascade.build]
147147
list = 'local'
148148
publishResources = false
149149
render = 'never'
@@ -201,10 +201,10 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
201201

202202
{{< code-toggle file=content/glossary/_index.md fm=true >}}
203203
title = 'Glossary'
204-
[_build]
204+
[build]
205205
render = 'always'
206206
[[cascade]]
207-
[cascade._build]
207+
[cascade.build]
208208
list = 'local'
209209
publishResources = false
210210
render = 'never'
@@ -247,7 +247,7 @@ Set the build options in front matter:
247247

248248
{{< code-toggle file=content/books/_index.md >}}
249249
title = 'Books'
250-
[_build]
250+
[build]
251251
render = 'never'
252252
list = 'never'
253253
{{< /code-toggle >}}
@@ -294,7 +294,7 @@ Set the build options in front matter, using the `cascade` keyword to "cascade"
294294
{{< code-toggle file=content/internal/_index.md >}}
295295
title = 'Internal'
296296
[[cascade]]
297-
[cascade._build]
297+
[cascade.build]
298298
render = 'never'
299299
list = 'never'
300300
[cascade._target]

content/en/content-management/diagrams.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ keywords: [diagrams,drawing]
66
menu:
77
docs:
88
parent: content-management
9-
weight: 50
10-
weight: 50
9+
weight: 245
10+
weight: 245
1111
toc: true
1212
---
1313
{{< new-in 0.93.0 >}}
@@ -44,16 +44,18 @@ Will be rendered as:
4444

4545
## Mermaid diagrams
4646

47-
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`:
47+
Hugo does not provide a built-in template for Mermaid diagrams. Create your own using a [code block render hook]:
4848

49-
```go-html-template
49+
[code block render hook]: /render-hooks/code-blocks
50+
51+
{{< code file=layouts/_default/_markup/render-codeblock-mermaid.html >}}
5052
<pre class="mermaid">
5153
{{- .Inner | safeHTML }}
5254
</pre>
5355
{{ .Page.Store.Set "hasMermaid" true }}
54-
```
56+
{{< /code >}}
5557

56-
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):
58+
And then include this snippet at the bottom of the content template:
5759

5860
```go-html-template
5961
{{ if .Page.Store.Get "hasMermaid" }}

0 commit comments

Comments
 (0)