You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/content-management/content-adapters.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ toc: true
17
17
18
18
A content adapter is a template that dynamically creates pages when building a site. For example, use a content adapter to create pages from a remote data source such as JSON, TOML, YAML, or XML.
19
19
20
-
Unlike templates that reside in the layouts directory, content adapters reside in the content directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path] will be relative to the content adapter.
20
+
Unlike templates that reside in the `layouts` directory, content adapters reside in the `content` directory, no more than one per directory per language. When a content adapter creates a page, the page's [logical path] will be relative to the content adapter.
21
21
22
22
```text
23
23
content/
@@ -33,7 +33,7 @@ content/
33
33
└── _index.md
34
34
```
35
35
36
-
Each content adapter is named _content.gotmpl and uses the same [syntax] as templates in the layouts directory. You can use any of the [template functions] within a content adapter, as well as the methods described below.
36
+
Each content adapter is named _content.gotmpl and uses the same [syntax] as templates in the `layouts` directory. You can use any of the [template functions] within a content adapter, as well as the methods described below.
Copy file name to clipboardExpand all lines: content/en/content-management/cross-references.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ The pages can be referenced as follows:
49
49
{{</* relref "/blog/my-post.md" */>}}
50
50
```
51
51
52
-
index.md can be reference either by its path or by its containing folder without the ending `/`. \_index.md can be referenced only by its containing folder:
52
+
`index.md` can be reference either by its path or by its containing directory without the ending `/`. `_index.md` can be referenced only by its containing directory:
The data directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object.
27
+
The `data` directory in the root of your project may contain one or more data files, in either a flat or nested tree. Hugo merges the data files to create a single data structure, accessible with the `Data` method on a `Site` object.
28
28
29
-
Hugo also merges data directories from themes and modules into this single data structure, where the data directory in the root of your project takes precedence.
29
+
Hugo also merges data directories from themes and modules into this single data structure, where the `data` directory in the root of your project takes precedence.
30
30
31
31
{{% note %}}
32
32
Hugo reads the combined data structure into memory and keeps it there for the entire build. For data that is infrequently accessed, use global or page resources instead.
@@ -42,7 +42,7 @@ project/
42
42
```
43
43
44
44
{{% note %}}
45
-
Do not place CSV files in the data directory. Access CSV files as page, global, or remote resources.
45
+
Do not place CSV files in the `data` directory. Access CSV files as page, global, or remote resources.
46
46
{{% /note %}}
47
47
48
48
See the documentation for the [`Data`] method on a `Site` object for details and examples.
Copy file name to clipboardExpand all lines: content/en/content-management/image-processing/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -482,7 +482,7 @@ To control tag availability, change the `excludeFields` or `includeFields` setti
482
482
483
483
## Smart cropping of images
484
484
485
-
By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice.
485
+
By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice.
Copy file name to clipboardExpand all lines: content/en/content-management/multilingual.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ defaultContentLanguageInSubdir
80
80
: (`bool`) If `true`, Hugo renders the default language site in a subdirectory matching the `defaultContentLanguage`. Default is `false`.
81
81
82
82
contentDir
83
-
: (`string`) The content directory for this language. Omit if [translating by file name].
83
+
: (`string`) The `content` directory for this language. Omit if [translating by file name].
84
84
85
85
disabled
86
86
: (`bool`) If `true`, Hugo will not render content for this language. Default is `false`.
@@ -232,7 +232,7 @@ If a file has no language code, it will be assigned the default language.
232
232
233
233
### Translation by content directory
234
234
235
-
This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` parameter.
235
+
This system uses different content directories for each of the languages. Each language's `content` directory is set using the `contentDir` parameter.
236
236
237
237
{{< code-toggle file=hugo >}}
238
238
languages:
@@ -256,9 +256,9 @@ Considering the following example in conjunction with the configuration above:
256
256
The first file is assigned the English language and is linked to the second.
257
257
The second file is assigned the French language and is linked to the first.
258
258
259
-
Their language is __assigned__ according to the content directory they are __placed__ in.
259
+
Their language is __assigned__ according to the `content` directory they are __placed__ in.
260
260
261
-
By having the same **path and basename** (relative to their language content directory), the content pieces are __linked__ together as translated pages.
261
+
By having the same **path and basename** (relative to their language `content` directory), the content pieces are __linked__ together as translated pages.
Copy file name to clipboardExpand all lines: content/en/content-management/page-bundles.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ leaf bundle
33
33
: A _leaf bundle_ is a directory that contains an index.md file and zero or more resources. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants.
34
34
35
35
branch bundle
36
-
: A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
36
+
: A _branch bundle_ is a directory that contains an `_index.md` file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without `_index.md` files are also branch bundles. This includes the home page.
37
37
38
38
{{% note %}}
39
39
In the definitions above and the examples below, the extension of the index file depends on the [content format]. For example, use index.md for Markdown content, index.html for HTML content, index.adoc for AsciiDoc content, etc.
| Example | content/about/index.md |content/posts/_index.md |
50
+
| Index file |`index.md`|`_index.md`|
51
+
| Example |`content/about/index.md`|`content/posts/_index.md `|
52
52
|[Page kinds]|`page`|`home`, `section`, `taxonomy`, or `term`|
53
-
| Template types |[single]|[home], [section], [taxonomy], or [term]|
53
+
| Template types |[single]|[home], [section], [taxonomy], or [term]|
54
54
| Descendant pages | None | Zero or more |
55
55
| Resource location | Adjacent to the index file or in a nested subdirectory | Same as a leaf bundles, but excludes descendant bundles |
56
56
|[Resource types]|`page`, `image`, `video`, etc. | all but `page`|
@@ -111,12 +111,12 @@ another-leaf-bundle
111
111
: This leaf bundle does not contain any page resources.
112
112
113
113
{{% note %}}
114
-
Create leaf bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
114
+
Create leaf bundles at any depth within the `content` directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
115
115
{{% /note %}}
116
116
117
117
## Branch bundles
118
118
119
-
A _branch bundle_ is a directory that contains an _index.md file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without _index.md files are also branch bundles. This includes the home page.
119
+
A _branch bundle_ is a directory that contains an `_index.md` file and zero or more resources. Analogous to a physical branch, a branch bundle may have descendants including leaf bundles and other branch bundles. Top level directories with or without `_index.md` files are also branch bundles. This includes the home page.
120
120
121
121
```text
122
122
content/
@@ -145,7 +145,7 @@ branch-bundle-2
145
145
: This branch bundle contains an index file and a leaf bundle.
146
146
147
147
{{% note %}}
148
-
Create branch bundles at any depth within the content directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
148
+
Create branch bundles at any depth within the `content` directory, but a leaf bundle may not contain another bundle. Leaf bundles do not have descendants.
Copy file name to clipboardExpand all lines: content/en/content-management/related.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ weight = 80
80
80
{{< /code-toggle >}}
81
81
82
82
* The `name` maps to a optional front matter slice attribute that can be used to link from the page level down to the fragment/heading level.
83
-
* If `applyFilter`is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
83
+
* If `applyFilter`is enabled, the `.HeadingsFiltered` on each page in the result will reflect the filtered headings. This is useful if you want to show the headings in the related content listing:
84
84
85
85
```go-html-template
86
86
{{ $related := .Site.RegularPages.Related . | first 5 }}
0 commit comments