Skip to content

Commit 8a8b308

Browse files
committed
content: Document new dimensions
1 parent a5a4fa9 commit 8a8b308

File tree

11 files changed

+241
-2
lines changed

11 files changed

+241
-2
lines changed

‎content/en/configuration/all.md‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,26 @@ dataDir
5959
: (`string`) The designated directory for data files. Default is `data`. {{% module-mounts-note %}}
6060

6161
defaultContentLanguage
62-
: (`string`) The project's default language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined language keys. Default is `en`.
62+
: (`string`) The project's default content language key, conforming to the syntax described in [RFC 5646]. This value must match one of the defined language keys. Default is `en`.
6363

6464
defaultContentLanguageInSubdir
65-
: (`bool`) Whether to publish the default language site to a subdirectory matching the `defaultContentLanguage`. Default is `false`.
65+
: (`bool`) Whether to publish the default content language site to a subdirectory matching the `defaultContentLanguage`. Default is `false`.
66+
67+
defaultContentRole
68+
: {{< new-in 0.149.0 />}}
69+
: (`string`) The site's default content role. Default is `guest`.
70+
71+
defaultContentRoleInSubdir
72+
: {{< new-in 0.149.0 />}}
73+
: (`bool`) Whether to publish the default content role to a subdirectory matching the `defaultContentRole`. Default is `false`.
74+
75+
defaultContentVersion
76+
: {{< new-in 0.149.0 />}}
77+
: (`string`) The site's default content version. Default is `TODO`.
78+
79+
defaultContentVersionInSubdir
80+
: {{< new-in 0.149.0 />}}
81+
: (`bool`) Whether to publish the default content version to a subdirectory matching the `defaultContentVersion`. Default is `false`.
6682

6783
defaultOutputFormat
6884
: (`string`) The default output format for the site. If unspecified, the first available format in the defined order (by weight, then alphabetically) will be used.
@@ -240,6 +256,9 @@ renderSegments
240256
resourceDir
241257
: (`string`) The designated directory for caching output from [asset pipelines](g). Default is `resources`.
242258

259+
roles
260+
: See [configure roles](/configuration/roles/).
261+
243262
security
244263
: See [configure security](/configuration/security/).
245264

@@ -294,6 +313,9 @@ titleCaseStyle
294313
uglyurls
295314
: See [configure ugly URLs](/configuration/ugly-urls/).
296315

316+
versions
317+
: See [configure versions](/configuration/versions/).
318+
297319
## Cache directory
298320

299321
Hugo's file cache directory is configurable via the [`cacheDir`] configuration option or the `HUGO_CACHEDIR` environment variable. If neither is set, Hugo will use, in order of preference:

‎content/en/configuration/roles.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Configure roles
3+
linkTitle: Roles
4+
description: Configure roles.
5+
categories: []
6+
keywords: []
7+
---
8+
9+
{{< new-in 0.149.0 />}}
10+
11+
This is the default configuration:
12+
13+
{{< code-toggle config=rolls />}}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Configure versions
3+
linkTitle: Versions
4+
description: Configure versions.
5+
categories: []
6+
keywords: []
7+
---
8+
9+
{{< new-in 0.149.0 />}}
10+
11+
This is the default configuration:
12+
13+
{{< code-toggle config=versions />}}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Dimensions
3+
description: TODO
4+
categories: []
5+
keywords: []
6+
---
7+
8+
{{< new-in 0.149.0 />}}
9+
10+
TODO
11+
12+
<!-- TODO we may not need some of these sentences -->
13+
14+
See [configure languages](/configuration/languages/).
15+
16+
See [configure roles](/configuration/roles/).
17+
18+
See [configure versions](/configuration/versions/).
19+
20+
21+
<!-- TODO we may not need some of these references -->
22+
23+
<!-- site config -->
24+
[`defaultContentLanguage`]: /configuration/all/#defaultcontentlanguage
25+
[`defaultContentLanguageInSubdir`]: /configuration/all/#defaultcontentlanguageinsubdir
26+
[`defaultContentRoleInSubdir`]: /configuration/all/#defaultcontentrole
27+
[`defaultContentRole`]: /configuration/all/#defaultcontentrole
28+
[`defaultContentRoleInSubdir`]: /configuration/all/#defaultcontentrole
29+
[`defaultContentVersion`]: /configuration/all/#defaultcontentversion
30+
[`defaultContentVersionInSubdir`]: /configuration/all/#defaultcontentversioninsubdir
31+
32+
<!-- site methods -->
33+
[`Dimension`]: /methods/site/dimension/
34+
[`Language`]: /methods/site/language/
35+
[`Languages`]: /methods/site/languages/
36+
[`Role`]: /methods/site/role/
37+
[`Roles`]: /methods/site/roles/
38+
[`Version`]: /methods/site/version/
39+
[`Versions`]: /methods/site/versions/
40+
41+
<!-- front matter -->
42+
[front matter languageDelegees]: /content-management/front-matter/#languagedelegees
43+
[front matter languages]: /content-management/front-matter/#languages
44+
[front matter roleDelegees]: /content-management/front-matter/#roledelegees
45+
[front matter roles]: /content-management/front-matter/#roles
46+
[front matter versionDelegees]: /content-management/front-matter/#versiondelegees
47+
[front matter versions]: /content-management/front-matter/#versions

‎content/en/content-management/front-matter.md‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,14 @@ isCJKLanguage
7474
keywords
7575
: (`string array`) An array of keywords, typically rendered within a `meta` element within the `head` element of the published HTML file, or used as a [taxonomy](g) to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
7676

77+
languageDelegees
78+
: {{< new-in 0.149.0 />}}
79+
: (`TODO`) TODO.
80+
81+
languages
82+
: {{< new-in 0.149.0 />}}
83+
: (`TODO`) TODO.
84+
7785
lastmod
7886
: (`string`) The date that the page was last modified. Note that the TOML format also supports unquoted date/time values. See the [dates](#dates) section for examples. Access this value from a template using the [`Lastmod`] method on a `Page` object.
7987

@@ -111,6 +119,14 @@ published
111119
resources
112120
: (`map array`) An array of maps to provide metadata for [page resources].
113121

122+
roleDelegees
123+
: {{< new-in 0.149.0 />}}
124+
: (`TODO`) TODO.
125+
126+
roles
127+
: {{< new-in 0.149.0 />}}
128+
: (`TODO`) TODO.
129+
114130
sitemap
115131
: (`map`) A map of sitemap options. See the [sitemap templates] page for details. Access these values from a template using the [`Sitemap`] method on a `Page` object.
116132

@@ -135,6 +151,14 @@ unpublishdate
135151
url
136152
: (`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management] page for details.
137153

154+
versionDelegees
155+
: {{< new-in 0.149.0 />}}
156+
: (`TODO`) TODO.
157+
158+
versions
159+
: {{< new-in 0.149.0 />}}
160+
: (`TODO`) TODO.
161+
138162
weight
139163
: (`int`) The page [weight](g), used to order the page within a [page collection](g). Access this value from a template using the [`Weight`] method on a `Page` object.
140164

‎content/en/methods/page/Rotate.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Rotate
3+
description: TODO
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: page.Pages
9+
signatures: [PAGE.Rotate DIMENSION]
10+
---
11+
12+
{{< new-in 0.149.0 />}}
13+
14+
TODO
15+
16+
<!-- DIMENSION must be one of language, role, or version. -->
17+
18+
```go-html-template
19+
{{ .Rotate "language" }}
20+
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Dimension
3+
description: TODO
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: TODO
9+
signatures: [SITE.Dimension DIMENSION]
10+
---
11+
12+
{{< new-in 0.149.0 />}}
13+
14+
TODO
15+
<!--
16+
Not sure how to document the returned data type; it changes based on the
17+
argument, e.g.,
18+
19+
{{ .Site.Dimension "language" }} => langs.Language
20+
{{ .Site.Dimension "role" }} => roles.RoleSite
21+
{{ .Site.Dimension "version" }} => versions.VersionSite
22+
-->
23+
24+
<!-- DIMENSION must be one of language, role, or version. -->
25+
26+
```go-html-template
27+
{{ .Site.Dimension "language" }}
28+
```

‎content/en/methods/site/Role.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Role
3+
description: Returns the role configured for this site.
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: roles.RoleSite
9+
signatures: [SITE.Role]
10+
---
11+
12+
{{< new-in 0.149.0 />}}
13+
14+
TODO
15+
16+
```go-html-template
17+
{{ .Site.Role }}
18+
```

‎content/en/methods/site/Roles.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Roles
3+
description: Returns the roles configured for this site.
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: roles.Roles
9+
signatures: [SITE.Roles]
10+
---
11+
12+
{{< new-in 0.149.0 />}}
13+
14+
TODO
15+
16+
```go-html-template
17+
{{ .Site.Roles }}
18+
```

‎content/en/methods/site/Version.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Version
3+
description: Returns the version configured for this site.
4+
categories: []
5+
keywords: []
6+
params:
7+
functions_and_methods:
8+
returnType: versions.VersionSite
9+
signatures: [SITE.Version]
10+
---
11+
12+
{{< new-in 0.149.0 />}}
13+
14+
TODO
15+
16+
```go-html-template
17+
{{ .Site.Version }}
18+
```

0 commit comments

Comments
 (0)