mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 02:16:09 +00:00
Replace links to glossary terms with custom render hook syntax
For example: [scalar](/getting-started/glossary/#scalar) => [scalar](g)
This commit is contained in:
1 parent
441752d2d0
commit
69d7a781b4
222 files changed
+263
-959
No files matched your search
@@ -3,7 +3,7 @@ title: {{ replace .File.ContentBaseName "-" " " }}
|
||||
---
|
||||
|
||||
{{% comment %}}
|
||||
You can insert these definitions in other pages using the glossary term (gt) shortcode, so they must be self-contained.
|
||||
You can insert these definitions in other pages using the `glossary-term` shortcode, so they must be self-contained.
|
||||
|
||||
Do this:
|
||||
|
||||
@@ -17,5 +17,3 @@ Italicize the term whenever you use it in the definition.
|
||||
|
||||
An exception to this rule occurs when a term is an alias for another. In such cases, it is sufficient to use the phrase 'See [page kind]'."
|
||||
{{% /comment %}}
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -15,7 +15,7 @@ aliases: [/content/archetypes/]
|
||||
|
||||
## Overview
|
||||
|
||||
A content file consists of [front matter] and markup. The markup is typically Markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
|
||||
A content file consists of [front matter](g) and markup. The markup is typically Markdown, but Hugo also supports other [content formats](g). Front matter can be TOML, YAML, or JSON.
|
||||
|
||||
The `hugo new content` command creates a new file in the `content` directory, using an archetype as a template. This is the default archetype:
|
||||
|
||||
@@ -25,7 +25,7 @@ date = '{{ .Date }}'
|
||||
draft = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
When you create new content, Hugo evaluates the [template actions] within the archetype. For example:
|
||||
When you create new content, Hugo evaluates the [template actions](g) within the archetype. For example:
|
||||
|
||||
```sh
|
||||
hugo new content posts/my-first-post.md
|
||||
@@ -39,7 +39,7 @@ date = '2023-08-24T11:49:46-07:00'
|
||||
draft = true
|
||||
{{< /code-toggle >}}
|
||||
|
||||
You can create an archetype for one or more [content types]. For example, use one archetype for posts, and use the default archetype for everything else:
|
||||
You can create an archetype for one or more [content types](g). For example, use one archetype for posts, and use the default archetype for everything else:
|
||||
|
||||
```text
|
||||
archetypes/
|
||||
@@ -68,9 +68,9 @@ If none of these exists, Hugo uses a built-in default archetype.
|
||||
|
||||
## Functions and context
|
||||
|
||||
You can use any [template function] within an archetype. As shown above, the default archetype uses the [`replace`](/functions/strings/replace) function to replace hyphens with spaces when populating the title in front matter.
|
||||
You can use any template [function](g) within an archetype. As shown above, the default archetype uses the [`replace`](/functions/strings/replace) function to replace hyphens with spaces when populating the title in front matter.
|
||||
|
||||
Archetypes receive the following [context]:
|
||||
Archetypes receive the following [context](g):
|
||||
|
||||
Date
|
||||
: (`string`) The current date and time, formatted in compliance with RFC3339.
|
||||
@@ -79,9 +79,7 @@ File
|
||||
: (`hugolib.fileInfo`) Returns file information for the current page. See [details](/methods/page/file).
|
||||
|
||||
Type
|
||||
: (`string`) The [content type] inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command.
|
||||
|
||||
[content type]: /getting-started/glossary#content-type
|
||||
: (`string`) The [content type](g) inferred from the top-level directory name, or as specified by the `--kind` flag passed to the `hugo new content` command.
|
||||
|
||||
Site
|
||||
: (`page.Site`) The current site object. See [details](/methods/site/).
|
||||
@@ -130,11 +128,11 @@ One or more practical examples, each within a fenced code block.
|
||||
Additional information to clarify as needed.
|
||||
{{< /code >}}
|
||||
|
||||
Although you can include [template actions] within the content body, remember that Hugo evaluates these once---at the time of content creation. In most cases, place template actions in a [template] where Hugo evaluates the actions every time you [build](/getting-started/glossary/#build) the site.
|
||||
Although you can include [template actions](g) within the content body, remember that Hugo evaluates these once---at the time of content creation. In most cases, place template actions in a [template](g) where Hugo evaluates the actions every time you [build](g) the site.
|
||||
|
||||
## Leaf bundles
|
||||
|
||||
You can also create archetypes for [leaf bundles](/getting-started/glossary/#leaf-bundle).
|
||||
You can also create archetypes for [leaf bundles](g).
|
||||
|
||||
For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images.
|
||||
|
||||
@@ -193,11 +191,3 @@ To create an article using the tutorials archetype:
|
||||
```sh
|
||||
hugo new content --kind tutorials articles/something.md
|
||||
```
|
||||
|
||||
[content formats]: /getting-started/glossary/#content-format
|
||||
[content types]: /getting-started/glossary/#content-type
|
||||
[context]: /getting-started/glossary/#context
|
||||
[front matter]: /getting-started/glossary/#front-matter
|
||||
[template actions]: /getting-started/glossary/#template-action
|
||||
[template]: /getting-started/glossary/#template
|
||||
[template function]: /getting-started/glossary/#function
|
||||
@@ -17,7 +17,7 @@ toc: true
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
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](g)will be relative to the content adapter.
|
||||
|
||||
```text
|
||||
content/
|
||||
@@ -137,9 +137,8 @@ Key|Description|Required
|
||||
`dates.expiryDate`|The page expiry date as a `time.Time` value.|
|
||||
`dates.lastmod`|The page last modification date as a `time.Time` value.|
|
||||
`dates.publishDate`|The page publication date as a `time.Time` value.|
|
||||
`kind`|The [page kind]. Default is `page`.|
|
||||
`params`|A map of page parameters.|
|
||||
`path`|The page's [logical path] relative to the content adapter. Do not include a leading slash or file extension.|:heavy_check_mark:
|
||||
`path`|The page's [logical path](g) relative to the content adapter. Do not include a leading slash or file extension.|:heavy_check_mark:
|
||||
`title`|The page title.|
|
||||
|
||||
{{% note %}}
|
||||
@@ -158,7 +157,7 @@ Key|Description|Required
|
||||
`content.value`|The content value as a string or resource.|:heavy_check_mark:
|
||||
`name`|The resource name.|
|
||||
`params`|A map of resource parameters.|
|
||||
`path`|The resources's [logical path] relative to the content adapter. Do not include a leading slash.|:heavy_check_mark:
|
||||
`path`|The resources's [logical path](g) relative to the content adapter. Do not include a leading slash.|:heavy_check_mark:
|
||||
`title`|The resource title.|
|
||||
|
||||
{{% note %}}
|
||||
@@ -352,8 +351,6 @@ To detect page collisions, use the `--printPathWarnings` flag when building your
|
||||
|
||||
[content formats]: /content-management/formats/#classification
|
||||
[front matter field]: /content-management/front-matter/#fields
|
||||
[logical path]: /getting-started/glossary/#logical-path
|
||||
[media type]: https://en.wikipedia.org/wiki/Media_type
|
||||
[page kind]: /getting-started/glossary/#page-kind
|
||||
[syntax]: /templates/introduction/
|
||||
[template functions]: /functions/
|
||||
@@ -12,15 +12,9 @@ toc: true
|
||||
aliases: [/extras/datafiles/,/extras/datadrivencontent/,/doc/datafiles/,/templates/data-templates/]
|
||||
---
|
||||
|
||||
Hugo can access and [unmarshal] local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
|
||||
Hugo can access and [unmarshal](g) local and remote data sources including CSV, JSON, TOML, YAML, and XML. Use this data to augment existing content or to create new content.
|
||||
|
||||
[unmarshal]: /getting-started/glossary/#unmarshal
|
||||
|
||||
A data source might be a file in the `data` directory, a [global resource], a [page resource], or a [remote resource].
|
||||
|
||||
[global resource]: /getting-started/glossary/#global-resource
|
||||
[page resource]: /getting-started/glossary/#page-resource
|
||||
[remote resource]: /getting-started/glossary/#remote-resource
|
||||
A data source might be a file in the `data` directory, a [global resource](g), a [page resource](g), or a [remote resource](g).
|
||||
|
||||
## Data directory
|
||||
|
||||
|
||||
@@ -39,15 +39,7 @@ weight = 10
|
||||
author = 'John Smith'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Front matter fields may be [boolean], [integer], [float], [string], [arrays], or [maps]. Note that the TOML format also supports unquoted date/time values.
|
||||
|
||||
[scalar]: /getting-started/glossary/#scalar
|
||||
[arrays]: /getting-started/glossary/#array
|
||||
[maps]: /getting-started/glossary/#map
|
||||
[boolean]: /getting-started/glossary/#boolean
|
||||
[integer]: /getting-started/glossary/#integer
|
||||
[float]: /getting-started/glossary/#float
|
||||
[string]: /getting-started/glossary/#string
|
||||
Front matter fields may be [boolean](g), [integer](g), [float](g), [string](g), [arrays](g), or [maps](g). Note that the TOML format also supports unquoted date/time values.
|
||||
|
||||
## Fields
|
||||
|
||||
@@ -113,20 +105,18 @@ If `true`, the page will not be rendered unless you pass the `--buildDrafts` fla
|
||||
|
||||
###### isCJKLanguage
|
||||
|
||||
(`bool`) Set to `true` if the content language is in the [CJK] family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], [`ReadingTime`], and [`Summary`] methods on a `Page` object.
|
||||
(`bool`) Set to `true` if the content language is in the [CJK](g) family. This value determines how Hugo calculates word count, and affects the values returned by the [`WordCount`], [`FuzzyWordCount`], [`ReadingTime`], and [`Summary`] methods on a `Page` object.
|
||||
|
||||
[`fuzzywordcount`]: /methods/page/wordcount/
|
||||
[`readingtime`]: /methods/page/readingtime/
|
||||
[`summary`]: /methods/page/summary/
|
||||
[`wordcount`]: /methods/page/wordcount/
|
||||
[cjk]: /getting-started/glossary/#cjk
|
||||
|
||||
###### keywords
|
||||
|
||||
(`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] to classify content. Access these values from a template using the [`Keywords`] method on a `Page` object.
|
||||
(`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.
|
||||
|
||||
[`keywords`]: /methods/page/keywords/
|
||||
[taxonomy]: /getting-started/glossary/#taxonomy
|
||||
|
||||
{{% comment %}}
|
||||
<!-- Added in v0.123.0 but purposefully omitted from documentation. -->
|
||||
@@ -254,9 +244,8 @@ Alias to [publishDate](#publishdate).
|
||||
|
||||
###### type
|
||||
|
||||
(`string`) The [content type], overriding the value derived from the top level section in which the page resides. Access this value from a template using the [`Type`] method on a `Page` object.
|
||||
(`string`) The [content type](g), overriding the value derived from the top level section in which the page resides. Access this value from a template using the [`Type`] method on a `Page` object.
|
||||
|
||||
[content type]: /getting-started/glossary/#content-type
|
||||
[`type`]: /methods/page/type/
|
||||
|
||||
###### unpublishdate
|
||||
@@ -268,10 +257,8 @@ Alias to [expirydate](#expirydate).
|
||||
(`string`) Overrides the entire URL path. Applicable to regular pages and section pages. See the [URL management] page for details.
|
||||
|
||||
###### weight
|
||||
(`int`) The page [weight], used to order the page within a [page collection]. Access this value from a template using the [`Weight`] method on a `Page` object.
|
||||
(`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.
|
||||
|
||||
[page collection]: /getting-started/glossary/#page-collection
|
||||
[weight]: /getting-started/glossary/#weight
|
||||
[`weight`]: /methods/page/weight/
|
||||
|
||||
## Parameters
|
||||
@@ -302,7 +289,7 @@ Parameter|Data type|Used by these embedded templates
|
||||
`images`|`[]string`|[`opengraph.html`], [`schema.html`], [`twitter_cards.html`]
|
||||
`videos`|`[]string`|[`opengraph.html`]
|
||||
|
||||
The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected.
|
||||
The embedded templates will skip a parameter if not provided in front matter, but will throw an error if the data type is unexpected.
|
||||
|
||||
[`opengraph.html`]: {{% eturl opengraph %}}
|
||||
[`schema.html`]: {{% eturl schema %}}
|
||||
@@ -332,7 +319,7 @@ genres = ['mystery','romance']
|
||||
author = 'John Smith'
|
||||
{{< /code-toggle >}}
|
||||
|
||||
You can add taxonomy terms to the front matter of any these [page kinds]:
|
||||
You can add taxonomy terms to the front matter of any these [page kinds](g):
|
||||
|
||||
- `home`
|
||||
- `page`
|
||||
@@ -340,8 +327,6 @@ You can add taxonomy terms to the front matter of any these [page kinds]:
|
||||
- `taxonomy`
|
||||
- `term`
|
||||
|
||||
[page kinds]: /getting-started/glossary/#page-kind
|
||||
|
||||
Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] method on a `Page` object. For example:
|
||||
|
||||
{{< code file=layouts/_default/single.html >}}
|
||||
@@ -360,9 +345,7 @@ Access taxonomy terms from a template using the [`Params`] or [`GetTerms`] metho
|
||||
|
||||
## Cascade
|
||||
|
||||
Any [node] can pass down to its descendants a set of front matter values.
|
||||
|
||||
[node]: /getting-started/glossary/#node
|
||||
Any [node](g) can pass down to its descendants a set of front matter values.
|
||||
|
||||
### Target specific pages
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ Although you can use these methods in combination when defining a menu, the menu
|
||||
|
||||
## Define automatically
|
||||
|
||||
To automatically define a menu entry for each top-level [section] of your site, enable the section pages menu in your site configuration.
|
||||
To automatically define a menu entry for each top-level [section](g) of your site, enable the section pages menu in your site configuration.
|
||||
|
||||
{{< code-toggle file=hugo >}}
|
||||
sectionPagesMenu = "main"
|
||||
@@ -229,5 +229,4 @@ See [menu templates].
|
||||
[localize]: /content-management/multilingual/#menus
|
||||
[menu templates]: /templates/menu/
|
||||
[multilingual]: /content-management/multilingual/#menus
|
||||
[section]: /getting-started/glossary/#section
|
||||
[template]: /templates/menu/
|
||||
@@ -36,9 +36,7 @@ branch bundle
|
||||
: 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.
|
||||
|
||||
{{% note %}}
|
||||
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.
|
||||
|
||||
[content format]: /getting-started/glossary/#content-format
|
||||
In the definitions above and the examples below, the extension of the index file depends on the [content format](g). For example, use `index.md` for Markdown content, `index.html` for HTML content, `index.adoc` for AsciiDoc content, etc.
|
||||
{{% /note %}}
|
||||
|
||||
## Comparison
|
||||
@@ -49,11 +47,11 @@ Page bundle characteristics vary by bundle type.
|
||||
|---------------------|---------------------------------------------------------|---------------------------------------------------------|
|
||||
| Index file | `index.md` | `_index.md` |
|
||||
| Example | `content/about/index.md` | `content/posts/_index.md ` |
|
||||
| [Page kinds] | `page` | `home`, `section`, `taxonomy`, or `term` |
|
||||
| [Page kinds](g) | `page` | `home`, `section`, `taxonomy`, or `term` |
|
||||
| Template types | [single] | [home], [section], [taxonomy], or [term] |
|
||||
| Descendant pages | None | Zero or more |
|
||||
| Resource location | Adjacent to the index file or in a nested subdirectory | Same as a leaf bundles, but excludes descendant bundles |
|
||||
| [Resource types] | `page`, `image`, `video`, etc. | all but `page` |
|
||||
| [Resource types](g) | `page`, `image`, `video`, etc. | all but `page` |
|
||||
|
||||
[single]: /templates/types/#single
|
||||
[home]: /templates/types/#home
|
||||
@@ -61,7 +59,7 @@ Page bundle characteristics vary by bundle type.
|
||||
[taxonomy]: /templates/types/#taxonomy
|
||||
[term]: /templates/types/#term
|
||||
|
||||
Files with [resource type] `page` include content written in Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode. In a leaf bundle, excluding the index file, these files are only accessible as page resources. In a branch bundle, these files are only accessible as content pages.
|
||||
Files with [resource type](g) `page` include content written in Markdown, HTML, AsciiDoc, Pandoc, reStructuredText, and Emacs Org Mode. In a leaf bundle, excluding the index file, these files are only accessible as page resources. In a branch bundle, these files are only accessible as content pages.
|
||||
|
||||
## Leaf bundles
|
||||
|
||||
@@ -94,7 +92,7 @@ about
|
||||
: This leaf bundle does not contain any page resources.
|
||||
|
||||
my-post
|
||||
: This leaf bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
|
||||
: This leaf bundle contains an index file, two resources of [resource type](g) `page`, and two resources of resource type `image`.
|
||||
|
||||
- content-1, content-2
|
||||
|
||||
@@ -139,7 +137,7 @@ home page
|
||||
: This branch bundle contains an index file, two descendant branch bundles, and no resources.
|
||||
|
||||
branch-bundle-1
|
||||
: This branch bundle contains an index file, two resources of [resource type] `page`, and two resources of resource type `image`.
|
||||
: This branch bundle contains an index file, two resources of [resource type](g) `page`, and two resources of resource type `image`.
|
||||
|
||||
branch-bundle-2
|
||||
: This branch bundle contains an index file and a leaf bundle.
|
||||
@@ -148,14 +146,10 @@ branch-bundle-2
|
||||
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.
|
||||
{{% /note %}}
|
||||
|
||||
|
||||
## Headless bundles
|
||||
|
||||
Use [build options] in front matter to create an unpublished leaf or branch bundle whose content and resources you can include in other pages.
|
||||
|
||||
[`Resources`]: /methods/page/resources/
|
||||
[build options]: content-management/build-options/
|
||||
[page kinds]: /getting-started/glossary/#page-kind
|
||||
[build options]: /content-management/build-options/
|
||||
[page resources]: /content-management/page-resources/
|
||||
[resource type]: /getting-started/glossary/#resource-type
|
||||
[resource types]: /getting-started/glossary/#resource-type
|
||||
@@ -42,9 +42,8 @@ namedSlices
|
||||
: (`slice`) The keywords to search for, expressed as a slice of `KeyValues` using the [`keyVals`] function.
|
||||
|
||||
fragments
|
||||
: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment] identifiers of the documents.
|
||||
: (`slice`) A list of special keywords that is used for indices configured as type "fragments". This will match the [fragment](g) identifiers of the documents.
|
||||
|
||||
[fragment]: /getting-started/glossary/#fragment
|
||||
[`keyVals`]: /functions/collections/keyvals/
|
||||
|
||||
A fictional example using all of the above options:
|
||||
|
||||
@@ -15,7 +15,7 @@ aliases: [/content/sections/]
|
||||
|
||||
## Overview
|
||||
|
||||
A section is a top-level content directory, or any content directory with an `_index.md` file. A content directory with an `_index.md` file is also known as a [branch bundle](/getting-started/glossary/#branch-bundle). Section templates receive one or more page [collections](/getting-started/glossary/#collection) in [context](/getting-started/glossary/#context).
|
||||
A section is a top-level content directory, or any content directory with an `_index.md` file. A content directory with an `_index.md` file is also known as a [branch bundle](g). Section templates receive one or more page [collections](g) in [context](g).
|
||||
|
||||
{{% note %}}
|
||||
Although top-level directories without `_index.md` files are sections, we recommend creating `_index.md` files in _all_ sections.
|
||||
|
||||
@@ -9,9 +9,7 @@ codeFences
|
||||
: (`bool`) Whether to highlight fenced code blocks. Default is `true`.
|
||||
|
||||
guessSyntax
|
||||
: (`bool`) Whether to automatically detect the language if the `LANG` argument is blank or set to a language for which there is no corresponding [lexer]. Falls back to a plain text lexer if unable to automatically detect the language. Default is `false`.
|
||||
|
||||
[lexer]: /getting-started/glossary/#lexer
|
||||
: (`bool`) Whether to automatically detect the language if the `LANG` argument is blank or set to a language for which there is no corresponding [lexer](g). Falls back to a plain text lexer if unable to automatically detect the language. Default is `false`.
|
||||
|
||||
{{% note %}}
|
||||
The Chroma syntax highlighter includes lexers for approximately 250 languages, but only 5 of these have implemented automatic language detection.
|
||||
@@ -41,6 +39,8 @@ noClasses
|
||||
style
|
||||
: (`string`) The CSS styles to apply to the highlighted code. See the [style gallery] for examples. Case-sensitive. Default is `monokai`.
|
||||
|
||||
[style gallery]: https://xyproto.github.io/splash/docs/
|
||||
|
||||
tabWidth
|
||||
: (`int`) Substitute this number of spaces for each tab character in your highlighted code. Irrelevant if `noClasses` is `false`. Default is `4`.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ action:
|
||||
aliases: [/functions/append]
|
||||
---
|
||||
|
||||
This function appends all elements, excluding the last, to the last element. This allows [pipe](/getting-started/glossary/#pipeline) constructs as shown below.
|
||||
This function appends all elements, excluding the last, to the last element. This allows [pipe](g) constructs as shown below.
|
||||
|
||||
Append a single element to a slice:
|
||||
|
||||
|
||||
@@ -16,11 +16,7 @@ action:
|
||||
aliases: [/functions/in]
|
||||
---
|
||||
|
||||
The `SET` can be an [array], [slice], or [string].
|
||||
|
||||
[array]: /getting-started/glossary/#array
|
||||
[slice]: /getting-started/glossary/#slice
|
||||
[string]: /getting-started/glossary/#string
|
||||
The `SET` can be an [array](g), [slice](g), or [string](g).
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "a" "b" "c" }}
|
||||
|
||||
@@ -13,11 +13,10 @@ action:
|
||||
signatures: [collections.NewScratch ]
|
||||
---
|
||||
|
||||
The `collections.NewScratch` function creates a locally scoped [scratch pad] to store and manipulate data. To create a scratch pad that is attached to a `Page` object, use the [`Scratch`] or [`Store`] method.
|
||||
The `collections.NewScratch` function creates a locally scoped [scratch pad](g) to store and manipulate data. To create a scratch pad that is attached to a `Page` object, use the [`Scratch`] or [`Store`] method.
|
||||
|
||||
[`Scratch`]: /methods/page/scratch/
|
||||
[`Store`]: /methods/page/store/
|
||||
[scratch pad]: /getting-started/glossary/#scratch-pad
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -32,21 +32,15 @@ Hugo will test for equality if you do not provide an `OPERATOR` argument. For ex
|
||||
The where function takes three or four arguments. The `OPERATOR` argument is optional.
|
||||
|
||||
COLLECTION
|
||||
: (`any`) A [page collection] or a [slice] of [maps].
|
||||
|
||||
[maps]: /getting-started/glossary/#map
|
||||
[page collection]: /getting-started/glossary/#page-collection
|
||||
[slice]: /getting-started/glossary/#slice
|
||||
: (`any`) A [page collection](g) or a [slice](g) of [maps](g).
|
||||
|
||||
KEY
|
||||
: (`string`) The key of the page or map value to compare with `VALUE`. With page collections, commonly used comparison keys are `Section`, `Type`, and `Params`. To compare with a member of the page `Params` map, [chain] the subkey as shown below:
|
||||
: (`string`) The key of the page or map value to compare with `VALUE`. With page collections, commonly used comparison keys are `Section`, `Type`, and `Params`. To compare with a member of the page `Params` map, [chain](g) the subkey as shown below:
|
||||
|
||||
```go-html-template
|
||||
{{ $result := where .Site.RegularPages "Params.foo" "bar" }}
|
||||
```
|
||||
|
||||
[chain]: /getting-started/glossary/#chain
|
||||
|
||||
OPERATOR
|
||||
: (`string`) The logical comparison [operator](#operators).
|
||||
|
||||
@@ -102,9 +96,7 @@ The examples below perform comparisons within a page collection, but the same co
|
||||
|
||||
## String comparison
|
||||
|
||||
Compare the value of the given field to a [`string`]:
|
||||
|
||||
[`string`]: /getting-started/glossary/#string
|
||||
Compare the value of the given field to a [`string`](g):
|
||||
|
||||
```go-html-template
|
||||
{{ $pages := where .Site.RegularPages "Section" "eq" "books" }}
|
||||
@@ -113,10 +105,7 @@ Compare the value of the given field to a [`string`]:
|
||||
|
||||
## Numeric comparison
|
||||
|
||||
Compare the value of the given field to an [`int`] or [`float`]:
|
||||
|
||||
[`int`]: /getting-started/glossary/#int
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
Compare the value of the given field to an [`int`](g) or [`float`](g):
|
||||
|
||||
```go-html-template
|
||||
{{ $books := where site.RegularPages "Section" "eq" "books" }}
|
||||
@@ -131,9 +120,7 @@ Compare the value of the given field to an [`int`] or [`float`]:
|
||||
|
||||
## Boolean comparison
|
||||
|
||||
Compare the value of the given field to a [`bool`]:
|
||||
|
||||
[`bool`]: /getting-started/glossary/#bool
|
||||
Compare the value of the given field to a [`bool`](g):
|
||||
|
||||
```go-html-template
|
||||
{{ $books := where site.RegularPages "Section" "eq" "books" }}
|
||||
@@ -146,10 +133,7 @@ Compare the value of the given field to a [`bool`]:
|
||||
|
||||
## Member comparison
|
||||
|
||||
Compare a [`scalar`] to a [`slice`].
|
||||
|
||||
[`scalar`]: /getting-started/glossary/#scalar
|
||||
[`slice`]: /getting-started/glossary/#slice
|
||||
Compare a [`scalar`](g) to a [`slice`](g).
|
||||
|
||||
For example, to return a collection of pages where the `color` page parameter is either "red" or "yellow":
|
||||
|
||||
@@ -219,7 +203,7 @@ For example, to return a collection of pages that were created before the curren
|
||||
|
||||
### Custom dates
|
||||
|
||||
With custom front matter dates, the comparison depends on the front matter data format (TOML, YAML, or JSON).
|
||||
With custom front matter dates, the comparison depends on the front matter data format (TOML, YAML, or JSON).
|
||||
|
||||
{{% note %}}
|
||||
Using TOML for pages with custom front matter dates enables precise date comparisons.
|
||||
|
||||
@@ -17,15 +17,12 @@ expiryDate: 2025-02-19 # deprecated 2024-02-19
|
||||
---
|
||||
|
||||
{{% deprecated-in 0.123.0 %}}
|
||||
Instead, use [`transform.Unmarshal`] with a [global], [page], or [remote] resource.
|
||||
Instead, use [`transform.Unmarshal`] with a [global resource](g), [page resource](g), or [remote resource](g).
|
||||
|
||||
See the [remote data example].
|
||||
|
||||
[`transform.Unmarshal`]: /functions/transform/unmarshal/
|
||||
[global]: /getting-started/glossary/#global-resource
|
||||
[page]: /getting-started/glossary/#page-resource
|
||||
[remote data example]: /functions/resources/getremote/#remote-data
|
||||
[remote]: /getting-started/glossary/#remote-resource
|
||||
{{% /deprecated-in %}}
|
||||
|
||||
Given the following directory structure:
|
||||
|
||||
@@ -17,15 +17,12 @@ expiryDate: 2025-02-19 # deprecated 2024-02-19
|
||||
---
|
||||
|
||||
{{% deprecated-in 0.123.0 %}}
|
||||
Instead, use [`transform.Unmarshal`] with a [global], [page], or [remote] resource.
|
||||
Instead, use [`transform.Unmarshal`] with a [global resource](g), [page resource](g), or [remote resource](g).
|
||||
|
||||
See the [remote data example].
|
||||
|
||||
[`transform.Unmarshal`]: /functions/transform/unmarshal/
|
||||
[global]: /getting-started/glossary/#global-resource
|
||||
[page]: /getting-started/glossary/#page-resource
|
||||
[remote data example]: /functions/resources/getremote/#remote-data
|
||||
[remote]: /getting-started/glossary/#remote-resource
|
||||
{{% /deprecated-in %}}
|
||||
|
||||
Given the following directory structure:
|
||||
|
||||
@@ -35,7 +35,7 @@ Do not use the global `page` function in shortcodes, partials called by shortcod
|
||||
|
||||
Hugo almost always passes a `Page` as the data context into the top level template (e.g., `single.html`). The one exception is the multihost sitemap template. This means that you can access the current page with the `.` in the template.
|
||||
|
||||
But when you are deeply nested inside of a [content view], [partial], or [render hook], it is not always practical or possible to access the `Page` object.
|
||||
But when you are deeply nested inside of a [content view](g), [partial](g), or [render hook](g), it is not always practical or possible to access the `Page` object.
|
||||
|
||||
Use the global `page` function to access the `Page` object from anywhere in any template.
|
||||
|
||||
@@ -101,7 +101,3 @@ If Hugo renders the section page before a content page, the cached rendered shor
|
||||
|
||||
[`Summary`]: /methods/page/summary/
|
||||
[`partialCached`]: /functions/partials/includecached/
|
||||
[content view]: /getting-started/glossary/#content-view
|
||||
[partial]: /getting-started/glossary/#partial
|
||||
[render hook]: /getting-started/glossary/#render-hook
|
||||
[shortcode]: getting-started/glossary/#shortcode
|
||||
@@ -43,7 +43,7 @@ Within a range block:
|
||||
|
||||
## Understanding context
|
||||
|
||||
At the top of a page template, the [context] (the dot) is a `Page` object. Within the `range` block, the context is bound to each successive element.
|
||||
At the top of a page template, the [context](g) (the dot) is a `Page` object. Within the `range` block, the context is bound to each successive element.
|
||||
|
||||
With this contrived example that uses the [`seq`] function to generate a slice of integers:
|
||||
|
||||
@@ -76,7 +76,6 @@ Gaining a thorough understanding of context is critical for anyone writing templ
|
||||
{{% /note %}}
|
||||
|
||||
[`seq`]: /functions/collections/seq/
|
||||
[context]: /getting-started/glossary/#context
|
||||
|
||||
## Array or slice of scalars
|
||||
|
||||
|
||||
@@ -15,19 +15,10 @@ toc: true
|
||||
|
||||
The `return` statement is a non-standard extension to Go's [text/template package]. Used within partial templates, the `return` statement terminates template execution and returns the given value, if any.
|
||||
|
||||
The returned value may be of any data type including, but not limited to, [`bool`], [`float`], [`int`], [`map`], [`resource`], [`slice`], and [`string`].
|
||||
The returned value may be of any data type including, but not limited to, [`bool`](g), [`float`](g), [`int`](g), [`map`](g), [`resource`](g), [`slice`](g), or [`string`](g).
|
||||
|
||||
A `return` statement without a value returns an empty string of type `template.HTML`.
|
||||
|
||||
[`bool`]: /getting-started/glossary/#bool
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
[`int`]: /getting-started/glossary/#int
|
||||
[`map`]: /getting-started/glossary/#map
|
||||
[`resource`]: /getting-started/glossary/#resource
|
||||
[`slice`]: /getting-started/glossary/#slice
|
||||
[`string`]: /getting-started/glossary/#string
|
||||
[text/template]: https://pkg.go.dev/text/template
|
||||
|
||||
{{% note %}}
|
||||
Unlike `return` statements in other languages, Hugo executes the first occurrence of the `return` statement regardless of its position within logical blocks. See [usage](#usage) notes below.
|
||||
{{% /note %}}
|
||||
|
||||
@@ -104,7 +104,7 @@ Instead of failing the build, we can catch the error and emit a warning:
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
In the above, note that the [context](/getting-started/glossary/#context) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context] if needed.
|
||||
In the above, note that the [context](g) within the last conditional block is the `TryValue` object returned by the `try` statement. At this point neither the `Err` nor `Value` methods returned anything, so the current context is not useful. Use the `$` to access the [template context] if needed.
|
||||
|
||||
[template context]: /templates/introduction/#template-context
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Initialize a variable, scoped to the current block:
|
||||
|
||||
## Understanding context
|
||||
|
||||
At the top of a page template, the [context] (the dot) is a `Page` object. Inside of the `with` block, the context is bound to the value passed to the `with` statement.
|
||||
At the top of a page template, the [context](g) (the dot) is a `Page` object. Inside of the `with` block, the context is bound to the value passed to the `with` statement.
|
||||
|
||||
With this contrived example:
|
||||
|
||||
@@ -94,8 +94,6 @@ This template will render the page title as desired:
|
||||
Gaining a thorough understanding of context is critical for anyone writing template code.
|
||||
{{% /note %}}
|
||||
|
||||
[context]: /getting-started/glossary/#context
|
||||
|
||||
{{% include "functions/go-template/_common/text-template.md" %}}
|
||||
|
||||
[`else`]: /functions/go-template/else/
|
||||
@@ -12,7 +12,7 @@ action:
|
||||
signatures: [hugo.Environment]
|
||||
---
|
||||
|
||||
The `hugo.Environment` function returns the current running [environment] as defined through the `--environment` command line flag.
|
||||
The `hugo.Environment` function returns the current running [environment](g) as defined through the `--environment` command line flag.
|
||||
|
||||
```go-html-template
|
||||
{{ hugo.Environment }} → production
|
||||
@@ -26,5 +26,3 @@ Command|Environment
|
||||
`hugo --environment staging`|`staging`
|
||||
`hugo server`|`development`
|
||||
`hugo server --environment staging`|`staging`
|
||||
|
||||
[environment]: /getting-started/glossary/#environment
|
||||
@@ -15,11 +15,10 @@ toc: true
|
||||
|
||||
{{< new-in 0.139.0 >}}
|
||||
|
||||
The global `hugo.Store` function creates a persistent [scratch pad] to store and manipulate data. To create a locally scoped, use the [`newScratch`] function.
|
||||
The global `hugo.Store` function creates a persistent [scratch pad](g) to store and manipulate data. To create a locally scoped, use the [`newScratch`] function.
|
||||
|
||||
[`Scratch`]: /functions/hugo/scratch/
|
||||
[`newScratch`]: /functions/collections/newscratch/
|
||||
[scratch pad]: /getting-started/glossary/#scratch-pad
|
||||
|
||||
## Methods
|
||||
|
||||
@@ -108,9 +107,7 @@ Removes the given key.
|
||||
|
||||
The `Store` method is often used to set scratch pad values within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are indeterminate until Hugo renders the page content.
|
||||
|
||||
If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop] variable:
|
||||
|
||||
[noop]: /getting-started/glossary/#noop
|
||||
If you need to access a scratch pad value from a parent template, and the parent template has not yet rendered the page content, you can trigger content rendering by assigning the returned value to a [noop](g) variable:
|
||||
|
||||
```go-html-template
|
||||
{{ $noop := .Content }}
|
||||
|
||||
@@ -25,12 +25,9 @@ See [image processing] for an overview of Hugo's image pipeline.
|
||||
Supported image formats include GIF, JPEG, PNG, TIFF, and WebP.
|
||||
|
||||
{{% note %}}
|
||||
This is a legacy function, superseded by the [`Width`] and [`Height`] methods for [global], [page], and [remote] resources. See the [image processing] section for details.
|
||||
This is a legacy function, superseded by the [`Width`] and [`Height`] methods for [global resources](g), [page resources](g), and [remote resources](g). See the [image processing] section for details.
|
||||
|
||||
[`Width`]: /methods/resource/width/
|
||||
[`Height`]: /methods/resource/height/
|
||||
[global]: /getting-started/glossary/#global-resource
|
||||
[image processing]: /content-management/image-processing/
|
||||
[page]: /getting-started/glossary/#page-resource
|
||||
[remote]: /getting-started/glossary/#remote-resource
|
||||
{{% /note %}}
|
||||
@@ -27,11 +27,7 @@ Capture the overlay image as a resource:
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The overlay image can be a [global resource], a [page resource], or a [remote resource].
|
||||
|
||||
[global resource]: /getting-started/glossary/#global-resource
|
||||
[page resource]: /getting-started/glossary/#page-resource
|
||||
[remote resource]: /getting-started/glossary/#remote-resource
|
||||
The overlay image can be a [global resource](g), a [page resource](g), or a [remote resource](g).
|
||||
|
||||
Create the filter:
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ color
|
||||
: (`string`) The font color, either a 3-digit or 6-digit hexadecimal color code. Default is `#ffffff` (white).
|
||||
|
||||
font
|
||||
: (`resource.Resource`) The font can be a [global resource], a [page resource], or a [remote resource]. Default is [Go Regular], a proportional sans-serif TrueType font.
|
||||
: (`resource.Resource`) The font can be a [global resource](g), a [page resource](g), or a [remote resource](g). Default is [Go Regular], a proportional sans-serif TrueType font.
|
||||
|
||||
[Go Regular]: https://go.dev/blog/go-fonts#sans-serif
|
||||
|
||||
@@ -41,10 +41,6 @@ x
|
||||
y
|
||||
: (`int`) The vertical offset, in pixels, relative to the top of the image. Default is `10`.
|
||||
|
||||
[global resource]: /getting-started/glossary/#global-resource
|
||||
[page resource]: /getting-started/glossary/#page-resource
|
||||
[remote resource]: /getting-started/glossary/#remote-resource
|
||||
|
||||
## Usage
|
||||
|
||||
Set the text and paths:
|
||||
|
||||
@@ -15,14 +15,12 @@ action:
|
||||
signatures: [math.Add VALUE VALUE...]
|
||||
---
|
||||
|
||||
If one of the numbers is a [`float`], the result is a `float`.
|
||||
If one of the numbers is a [`float`](g), the result is a `float`.
|
||||
|
||||
```go-html-template
|
||||
{{ add 12 3 2 }} → 17
|
||||
```
|
||||
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
|
||||
You can also use the `add` function to concatenate strings.
|
||||
|
||||
```go-html-template
|
||||
|
||||
@@ -15,10 +15,8 @@ action:
|
||||
signatures: [math.Div VALUE VALUE...]
|
||||
---
|
||||
|
||||
If one of the numbers is a [`float`], the result is a `float`.
|
||||
If one of the numbers is a [`float`](g), the result is a `float`.
|
||||
|
||||
```go-html-template
|
||||
{{ div 12 3 2 }} → 2
|
||||
```
|
||||
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
@@ -15,10 +15,8 @@ action:
|
||||
signatures: [math.Mul VALUE VALUE...]
|
||||
---
|
||||
|
||||
If one of the numbers is a [`float`], the result is a `float`.
|
||||
If one of the numbers is a [`float`](g), the result is a `float`.
|
||||
|
||||
```go-html-template
|
||||
{{ mul 12 3 2 }} → 72
|
||||
```
|
||||
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
@@ -12,13 +12,13 @@ action:
|
||||
|
||||
{{< new-in 0.121.2 >}}
|
||||
|
||||
The `math.Rand` function returns a pseudo-random number in the [half-open interval] [0.0, 1.0).
|
||||
The `math.Rand` function returns a pseudo-random number in the half-open [interval](g) [0.0, 1.0).
|
||||
|
||||
```go-html-template
|
||||
{{ math.Rand }} → 0.6312770459590062
|
||||
```
|
||||
|
||||
To generate a random integer in the [closed interval] [0, 5]:
|
||||
To generate a random integer in the closed interval [0, 5]:
|
||||
|
||||
```go-html-template
|
||||
{{ math.Rand | mul 6 | math.Floor }}
|
||||
@@ -41,6 +41,3 @@ To generate a random float, with one digit after the decimal point, in the close
|
||||
```go-html-template
|
||||
{{ div (math.Rand | mul 50 | math.Ceil) 10 }}
|
||||
```
|
||||
|
||||
[closed interval]: /getting-started/glossary/#interval
|
||||
[half-open interval]: /getting-started/glossary/#interval
|
||||
@@ -15,10 +15,8 @@ action:
|
||||
signatures: [math.Sub VALUE VALUE...]
|
||||
---
|
||||
|
||||
If one of the numbers is a [`float`], the result is a `float`.
|
||||
If one of the numbers is a [`float`](g), the result is a `float`.
|
||||
|
||||
```go-html-template
|
||||
{{ sub 12 3 2 }} → 7
|
||||
```
|
||||
|
||||
[`float`]: /getting-started/glossary/#float
|
||||
@@ -10,11 +10,8 @@ action:
|
||||
signatures: ['openapi3.Unmarshal RESOURCE']
|
||||
---
|
||||
|
||||
Use the `openapi3.Unmarshal` function with [global], [page], or [remote] resources.
|
||||
Use the `openapi3.Unmarshal` function with [global resources](g), [page resources](g), or [remote resources](g).
|
||||
|
||||
[global]: /getting-started/glossary/#global-resource
|
||||
[page]: /getting-started/glossary/#page-resource
|
||||
[remote]: /getting-started/glossary/#remote-resource
|
||||
[OpenAPI]: https://www.openapis.org/
|
||||
|
||||
For example, to work with a remote [OpenAPI] definition:
|
||||
|
||||
@@ -67,10 +67,9 @@ You can also change the request method and set the request body:
|
||||
|
||||
## Remote data
|
||||
|
||||
When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal] the response.
|
||||
When retrieving remote data, use the [`transform.Unmarshal`] function to [unmarshal](g) the response.
|
||||
|
||||
[`transform.Unmarshal`]: /functions/transform/unmarshal/
|
||||
[unmarshal]: /getting-started/glossary/#unmarshal
|
||||
|
||||
```go-html-template
|
||||
{{ $data := dict }}
|
||||
|
||||
@@ -20,7 +20,6 @@ The START and END positions are zero-based, where `0` represents the first chara
|
||||
{{ slicestr "BatMan" 0 3 }} → Bat
|
||||
```
|
||||
|
||||
The START and END arguments represent the endpoints of a [half-open interval], a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand.
|
||||
The START and END arguments represent the endpoints of a half-open [interval], a concept that may be difficult to grasp when first encountered. You may find that the [`strings.Substr`] function is easier to understand.
|
||||
|
||||
[half-open interval]: /getting-started/glossary/#interval
|
||||
[`strings.Substr`]: /functions/strings/substr/
|
||||
@@ -27,7 +27,7 @@ This produces a `time.Time` value, with a string representation such as:
|
||||
2023-10-15 12:59:28.337140706 -0700 PDT m=+0.041752605
|
||||
```
|
||||
|
||||
To format and [localize] the value, pass it through the [`time.Format`] function:
|
||||
To format and [localize](g) the value, pass it through the [`time.Format`] function:
|
||||
|
||||
```go-html-template
|
||||
{{ time.Now | time.Format "Jan 2006" }} → Oct 2023
|
||||
@@ -44,5 +44,4 @@ The `time.Now` function returns a `time.Time` value, so you can chain any of the
|
||||
```
|
||||
|
||||
[`time.Format`]: /functions/time/format/
|
||||
[localize]: /getting-started/glossary/#localization
|
||||
[time methods]: /methods/time/
|
||||
@@ -16,7 +16,7 @@ toc: true
|
||||
aliases: [/functions/transform.unmarshal]
|
||||
---
|
||||
|
||||
The input can be a string or a [resource].
|
||||
The input can be a string or a [resource](g).
|
||||
|
||||
## Unmarshal a string
|
||||
|
||||
@@ -271,7 +271,7 @@ Each item node looks like this:
|
||||
}
|
||||
```
|
||||
|
||||
The title keys do not begin with an underscore or a letter---they are not valid [identifiers]. Use the [`index`] function to access the values:
|
||||
The title keys do not begin with an underscore or a letter---they are not valid [identifiers](g). Use the [`index`] function to access the values:
|
||||
|
||||
```go-html-template
|
||||
{{ with $data.channel.item }}
|
||||
@@ -296,6 +296,4 @@ Hugo renders this to:
|
||||
```
|
||||
|
||||
[`index`]: /functions/collections/indexfunction/
|
||||
[identifiers]: https://go.dev/ref/spec#Identifiers
|
||||
[resource]: /getting-started/glossary/#resource
|
||||
[page bundle]: /content-management/page-bundles/
|
||||
@@ -16,7 +16,7 @@ aliases: [/functions/urlize]
|
||||
|
||||
## Example
|
||||
|
||||
Use the `urlize` function to create a link to a [term] page.
|
||||
Use the `urlize` function to create a link to a [term page](g).
|
||||
|
||||
Consider this site configuration:
|
||||
|
||||
@@ -60,4 +60,3 @@ To create a link to the term page:
|
||||
To generate a list of term pages associated with a given content page, use the [`GetTerms`] method on a `Page` object.
|
||||
|
||||
[`GetTerms`]: /methods/page/getterms/
|
||||
[term]: /getting-started/glossary/#term
|
||||
@@ -61,9 +61,7 @@ See the specifications for each file format: [TOML], [YAML], and [JSON].
|
||||
|
||||
## Configuration directory
|
||||
|
||||
Instead of a single site configuration file, split your configuration by [environment], root configuration key, and language. For example:
|
||||
|
||||
[environment]: /getting-started/glossary/#environment
|
||||
Instead of a single site configuration file, split your configuration by [environment](g), root configuration key, and language. For example:
|
||||
|
||||
```text
|
||||
my-project/
|
||||
@@ -293,9 +291,7 @@ To remain consistent and prevent unexpected behavior, do not mix these strategie
|
||||
|
||||
###### disableKinds
|
||||
|
||||
(`string slice`) Disable rendering of the specified page [kinds], any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`.
|
||||
|
||||
[kinds]: /getting-started/glossary/#page-kind
|
||||
(`string slice`) Disable rendering of the specified page [kinds](g), any of `404`, `home`, `page`, `robotstxt`, `rss`, `section`, `sitemap`, `taxonomy`, or `term`.
|
||||
|
||||
###### disableLanguages
|
||||
|
||||
@@ -735,9 +731,7 @@ DART_SASS_BINARY
|
||||
: (`string`) The absolute path to the Dart Sass executable. By default, Hugo searches for the executable in each of the paths in the `PATH` environment variable.
|
||||
|
||||
HUGO_ENVIRONMENT
|
||||
: (`string`) Overrides the default [environment], typically one of `development`, `staging`, or `production`.
|
||||
|
||||
[environment]: /getting-started/glossary/#environment
|
||||
: (`string`) Overrides the default [environment](g), typically one of `development`, `staging`, or `production`.
|
||||
|
||||
HUGO_FILE_LOG_FORMAT
|
||||
: (`string`) A format string for the file path, line number, and column number displayed when reporting errors, or when calling the `Position` method from a shortcode or Markdown render hook. Valid tokens are `:file`, `:line`, and `:col`. Default is `:file::line::col`.
|
||||
@@ -966,10 +960,10 @@ lang
|
||||
: The [page language].
|
||||
|
||||
kind
|
||||
: The [kind] of the page.
|
||||
: The [kind](g) of the page.
|
||||
|
||||
output
|
||||
: The [output format] of the page.
|
||||
: The [output format](g) of the page.
|
||||
|
||||
It is recommended to put coarse grained filters (e.g. for language and output format) in the excludes section, e.g.:
|
||||
|
||||
@@ -1003,6 +997,3 @@ Some use cases for this feature:
|
||||
|
||||
[path]: /methods/page/path/
|
||||
[page language]: /methods/page/language/
|
||||
[kind]: /getting-started/glossary/#page-kind
|
||||
[output format]: /getting-started/glossary/#output-format
|
||||
[type]: /getting-started/glossary/#content-type
|
||||
@@ -116,11 +116,11 @@ The `resources` directory contains cached output from Hugo's asset pipelines, ge
|
||||
|
||||
###### static
|
||||
|
||||
The `static` directory contains files that will be copied to the `public` directory when you build your site. For example: `favicon.ico`, `robots.txt`, and files that verify site ownership. Before the introduction of [page bundles](/getting-started/glossary/#page-bundle) and [asset pipelines](/hugo-pipes/introduction/), the `static` directory was also used for images, CSS, and JavaScript.
|
||||
The `static` directory contains files that will be copied to the `public` directory when you build your site. For example: `favicon.ico`, `robots.txt`, and files that verify site ownership. Before the introduction of [page bundles](g) and [asset pipelines](/hugo-pipes/introduction/), the `static` directory was also used for images, CSS, and JavaScript.
|
||||
|
||||
###### themes
|
||||
|
||||
The `themes` directory contains one or more [themes](/getting-started/glossary/#theme), each in its own subdirectory.
|
||||
The `themes` directory contains one or more [themes](g), each in its own subdirectory.
|
||||
|
||||
## Union file system
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
---
|
||||
title: Glossary link reference definitions
|
||||
build:
|
||||
render: never
|
||||
list: never
|
||||
---
|
||||
|
||||
{{% comment %}}
|
||||
Use the "include" shortcode to include this file in the Markdown page for each glossary term. This eliminates the need for separate link reference definitions for internal glossary term links.
|
||||
|
||||
Do not create plural versions of these link reference definition. If you need to use the plural version of a glossary term, do this in Markdown:
|
||||
|
||||
The plural of action is [actions][action].
|
||||
|
||||
You must include this file in the Markdown page for each glossary term because the terms can be independently included in other pages using the glossary term (gt) shortcode.
|
||||
{{% /comment %}}
|
||||
|
||||
[action]: /getting-started/glossary/#action
|
||||
[archetype]: /getting-started/glossary/#archetype
|
||||
[argument]: /getting-started/glossary/#argument
|
||||
[array]: /getting-started/glossary/#array
|
||||
[bool]: /getting-started/glossary/#bool
|
||||
[boolean]: /getting-started/glossary/#boolean
|
||||
[branch bundle]: /getting-started/glossary/#branch-bundle
|
||||
[build]: /getting-started/glossary/#build
|
||||
[bundle]: /getting-started/glossary/#bundle
|
||||
[cache]: /getting-started/glossary/#cache
|
||||
[chain]: /getting-started/glossary/#chain
|
||||
[cjk]: /getting-started/glossary/#cjk
|
||||
[cli]: /getting-started/glossary/#cli
|
||||
[collection]: /getting-started/glossary/#collection
|
||||
[content adapter]: /getting-started/glossary/#content-adapter
|
||||
[content format]: /getting-started/glossary/#content-format
|
||||
[content type]: /getting-started/glossary/#content-type
|
||||
[content view]: /getting-started/glossary/#content-view
|
||||
[context]: /getting-started/glossary/#context
|
||||
[default sort order]: /getting-started/glossary/#default-sort-order
|
||||
[element]: /getting-started/glossary/#element
|
||||
[environment]: /getting-started/glossary/#environment
|
||||
[field]: /getting-started/glossary/#field
|
||||
[flag]: /getting-started/glossary/#flag
|
||||
[float]: /getting-started/glossary/#float
|
||||
[floating point]: /getting-started/glossary/#floating-point
|
||||
[fragment]: /getting-started/glossary/#fragment
|
||||
[front matter]: /getting-started/glossary/#front-matter
|
||||
[function]: /getting-started/glossary/#function
|
||||
[global resource]: /getting-started/glossary/#global-resource
|
||||
[headless bundle]: /getting-started/glossary/#headless-bundle
|
||||
[identifier]: /getting-started/glossary/#identifier
|
||||
[int]: /getting-started/glossary/#int
|
||||
[integer]: /getting-started/glossary/#integer
|
||||
[internationalization]: /getting-started/glossary/#internationalization
|
||||
[interval]: /getting-started/glossary/#interval
|
||||
[kind]: /getting-started/glossary/#kind
|
||||
[layout]: /getting-started/glossary/#layout
|
||||
[leaf bundle]: /getting-started/glossary/#leaf-bundle
|
||||
[lexer]: /getting-started/glossary/#lexer
|
||||
[list page]: /getting-started/glossary/#list-page
|
||||
[list template]: /getting-started/glossary/#list-template
|
||||
[localization]: /getting-started/glossary/#localization
|
||||
[logical path]: /getting-started/glossary/#logical-path
|
||||
[map]: /getting-started/glossary/#map
|
||||
[markdown attribute]: /getting-started/glossary/#markdown-attribute
|
||||
[marshal]: /getting-started/glossary/#marshal
|
||||
[method]: /getting-started/glossary/#method
|
||||
[module]: /getting-started/glossary/#module
|
||||
[node]: /getting-started/glossary/#node
|
||||
[noop]: /getting-started/glossary/#noop
|
||||
[object]: /getting-started/glossary/#object
|
||||
[ordered taxonomy]: /getting-started/glossary/#ordered-taxonomy
|
||||
[output format]: /getting-started/glossary/#output-format
|
||||
[page bundle]: /getting-started/glossary/#page-bundle
|
||||
[page collection]: /getting-started/glossary/#page-collection
|
||||
[page kind]: /getting-started/glossary/#page-kind
|
||||
[page resource]: /getting-started/glossary/#page-resource
|
||||
[pager]: /getting-started/glossary/#pager
|
||||
[paginate]: /getting-started/glossary/#paginate
|
||||
[pagination]: /getting-started/glossary/#pagination
|
||||
[paginator]: /getting-started/glossary/#paginator
|
||||
[parameter]: /getting-started/glossary/#parameter
|
||||
[partial]: /getting-started/glossary/#partial
|
||||
[permalink]: /getting-started/glossary/#permalink
|
||||
[pipe]: /getting-started/glossary/#pipe
|
||||
[pipeline]: /getting-started/glossary/#pipeline
|
||||
[publish]: /getting-started/glossary/#publish
|
||||
[regular page]: /getting-started/glossary/#regular-page
|
||||
[relative permalink]: /getting-started/glossary/#relative-permalink
|
||||
[remote resource]: /getting-started/glossary/#remote-resource
|
||||
[render hook]: /getting-started/glossary/#render-hook
|
||||
[resource type]: /getting-started/glossary/#resource-type
|
||||
[resource]: /getting-started/glossary/#resource
|
||||
[scalar]: /getting-started/glossary/#scalar
|
||||
[scratch pad]: /getting-started/glossary/#scratch-pad
|
||||
[section page]: /getting-started/glossary/#section-page
|
||||
[section]: /getting-started/glossary/#section
|
||||
[shortcode]: /getting-started/glossary/#shortcode
|
||||
[slice]: /getting-started/glossary/#slice
|
||||
[string literal (interpreted)]: /getting-started/glossary/#string-literal-interpreted
|
||||
[string literal (raw)]: /getting-started/glossary/#string-literal-raw
|
||||
[string]: /getting-started/glossary/#string
|
||||
[taxonomic weight]: /getting-started/glossary/#taxonomic-weight
|
||||
[taxonomy object]: /getting-started/glossary/#taxonomy-object
|
||||
[taxonomy page]: /getting-started/glossary/#taxonomy-page
|
||||
[taxonomy]: /getting-started/glossary/#taxonomy
|
||||
[template action]: /getting-started/glossary/#template-action
|
||||
[template]: /getting-started/glossary/#template
|
||||
[term page]: /getting-started/glossary/#term-page
|
||||
[term]: /getting-started/glossary/#term
|
||||
[theme]: /getting-started/glossary/#theme
|
||||
[token]: /getting-started/glossary/#token
|
||||
[type]: /getting-started/glossary/#type
|
||||
[unmarshal]: /getting-started/glossary/#unmarshal
|
||||
[variable]: /getting-started/glossary/#variable
|
||||
[walk]: /getting-started/glossary/#walk
|
||||
[weight]: /getting-started/glossary/#weight
|
||||
[weighted page]: /getting-started/glossary/#weighted-page
|
||||
[zero time]: /getting-started/glossary/#zero-time
|
||||
@@ -2,6 +2,4 @@
|
||||
title: action
|
||||
---
|
||||
|
||||
See [template action].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [template action](g).
|
||||
@@ -3,5 +3,3 @@ title: archetype
|
||||
---
|
||||
|
||||
An archetype is a template for new content. See [details](/content-management/archetypes/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: argument
|
||||
---
|
||||
|
||||
A [scalar], [array], [slice], [map], or [object] passed to a [function], [method], or [shortcode].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A [scalar](g), [array](g), [slice](g), [map](g), or [object](g) passed to a [function](g), [method](g), or [shortcode](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: array
|
||||
---
|
||||
|
||||
A numbered sequence of elements. Unlike Go's [slice] data type, an array has a fixed length. [Elements][element] within an array can be [scalars][scalar], slices, [maps][map], pages, or other arrays. See the [Go documentation](https://go.dev/ref/spec#Array_types) for details.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A numbered sequence of [elements](g). Unlike Go's [slice](g) data type, an array has a fixed length. Elements within an array can be [scalars](g), slices, [maps](g), pages, or other arrays. See the [Go documentation](https://go.dev/ref/spec#Array_types) for details.
|
||||
@@ -2,6 +2,4 @@
|
||||
title: bool
|
||||
---
|
||||
|
||||
See [boolean].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [boolean](g).
|
||||
@@ -3,5 +3,3 @@ title: boolean
|
||||
---
|
||||
|
||||
A data type with two possible values, either `true` or `false`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: branch bundle
|
||||
---
|
||||
|
||||
A directory that contains an `_index.md` file and zero or more [resources][resource]. 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. See [details](/content-management/page-bundles/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A directory that contains an `_index.md` file and zero or more [resources](g). 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. See [details](/content-management/page-bundles/).
|
||||
@@ -3,5 +3,3 @@ title: build
|
||||
---
|
||||
|
||||
To generate a static site that includes HTML files and assets such as images, CSS, and JavaScript. The build process includes rendering and resource transformations.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: bundle
|
||||
---
|
||||
|
||||
See [page bundle].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [page bundle](g).
|
||||
@@ -3,5 +3,3 @@ title: cache
|
||||
---
|
||||
|
||||
A software component that stores data so that future requests for the same data are faster.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: chain
|
||||
---
|
||||
|
||||
Within a template, to connect one or more [identifiers][identifier] with a dot. An identifier can represent a method, object, or field. For example, `.Site.Params.author.name` or `.Date.UTC.Hour`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Within a template, to connect one or more [identifiers](g) with a dot. An identifier can represent a method, object, or field. For example, `.Site.Params.author.name` or `.Date.UTC.Hour`.
|
||||
@@ -3,5 +3,3 @@ title: CJK
|
||||
---
|
||||
|
||||
A collective term for the Chinese, Japanese, and Korean languages. See [details](https://en.wikipedia.org/wiki/CJK_characters).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: CLI
|
||||
---
|
||||
|
||||
Command line interface.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: collection
|
||||
---
|
||||
|
||||
An [array], [slice], or [map].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
An [array](g), [slice](g), or [map](g).
|
||||
@@ -3,5 +3,3 @@ title: content adapter
|
||||
---
|
||||
|
||||
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. See [details](/content-management/content-adapters/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: content format
|
||||
---
|
||||
|
||||
A markup language for creating content. Typically Markdown, but may also be HTML, AsciiDoc, Org, Pandoc, or reStructuredText. See [details](/content-management/formats/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: content type
|
||||
---
|
||||
|
||||
A classification of content inferred from the top-level directory name or the `type` set in [front matter]. Pages in the root of the `content` directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates][template]. See [details](/content-management/types/)
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A classification of content inferred from the top-level directory name or the `type` set in [front matter](g). Pages in the root of the `content` directory, including the home page, are of type "page". Accessed via `.Page.Type` in [templates](g). See [details](/content-management/types/)
|
||||
@@ -3,5 +3,3 @@ title: content view
|
||||
---
|
||||
|
||||
A template called with the `.Page.Render` method. See [details](/templates/content-view/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: context
|
||||
---
|
||||
|
||||
Represented by a dot "." within a [template action], context is the current location in a data structure. For example, while iterating over a [collection] of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See [details](/templates/introduction/#context).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Represented by a dot "." within a [template action](g), context is the current location in a data structure. For example, while iterating over a [collection](g) of pages, the context within each iteration is the page's data structure. The context received by each template depends on template type and/or how it was called. See [details](/templates/introduction/#context).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: default sort order
|
||||
---
|
||||
|
||||
The default sort order for page collections. Hugo sorts by [weight], then by date (descending), then by link title, and then by file path.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
The default sort order for page collections. Hugo sorts by [weight](g), then by date (descending), then by link title, and then by file path.
|
||||
@@ -3,5 +3,3 @@ title: element
|
||||
---
|
||||
|
||||
A member of a slice or array.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -9,5 +9,3 @@ When running the built-in development server with the `hugo server` command, the
|
||||
To determine the current environment within a template, use the [`hugo.Environment`] function.
|
||||
|
||||
[`hugo.Environment`]: /functions/hugo/environment/
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: field
|
||||
---
|
||||
|
||||
A predefined key-value pair in front matter such as `date` or `title`. See also [parameter].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A predefined key-value pair in front matter such as `date` or `title`. See also [parameter](g).
|
||||
@@ -3,5 +3,3 @@ title: flag
|
||||
---
|
||||
|
||||
An option passed to a command-line program, beginning with one or two hyphens. See [details](/commands/hugo/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,6 +3,4 @@ title: float
|
||||
alias: true
|
||||
---
|
||||
|
||||
See [floating point].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [floating point](g).
|
||||
@@ -3,5 +3,3 @@ title: floating point
|
||||
---
|
||||
|
||||
A numeric data type with a fractional component. For example, `3.14159`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: front matter
|
||||
---
|
||||
|
||||
Metadata at the beginning of each content page, separated from the content by format-specific delimiters. See [details](/content-management/front-matter/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: function
|
||||
---
|
||||
|
||||
Used within a [template action], a function takes one or more [arguments][argument] and returns a value. Unlike [methods][method], functions are not associated with an [object]. See [details](/functions/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Used within a [template action](g), a function takes one or more [arguments](g) and returns a value. Unlike [methods](g), functions are not associated with an [object](g). See [details](/functions/).
|
||||
@@ -8,5 +8,3 @@ A file within the `assets` directory, or within any directory [mounted](/hugo-mo
|
||||
[`resources.GetMatch`]: /functions/resources/getmatch/
|
||||
[`resources.Match`]: /functions/resources/match/
|
||||
[`resources.ByType`]: /functions/resources/byType/
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: headless bundle
|
||||
---
|
||||
|
||||
An unpublished leaf or branch bundle whose content and resources you can include in other pages. See [build options](/content-management/build-options/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: identifier
|
||||
---
|
||||
|
||||
A string that represents a variable, method, object, or field. It must conform to Go's [language specification](https://go.dev/ref/spec#Identifiers), beginning with a letter or underscore, followed by zero or more letters, digits, or underscores.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: int
|
||||
---
|
||||
|
||||
See [integer].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [integer](g).
|
||||
@@ -3,5 +3,3 @@ title: integer
|
||||
---
|
||||
|
||||
A numeric data type without a fractional component. For example, `42`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: internationalization
|
||||
---
|
||||
|
||||
Software design and development efforts that enable [localization]. See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Software design and development efforts that enable [localization](g). See the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated i18n.
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
---
|
||||
title: string literal (interpreted)
|
||||
title: interpreted string literal
|
||||
---
|
||||
|
||||
Interpreted string literals are character sequences between double quotes, as in "foo". Within the quotes, any character may appear except a newline and an unescaped double quote. The text between the quotes forms the value of the literal, with backslash escapes interpreted. See [details](https://go.dev/ref/spec#String_literals).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -9,5 +9,3 @@ An [interval](https://en.wikipedia.org/wiki/Interval_(mathematics)) is a range o
|
||||
- An _open_ interval, denoted by parentheses, excludes its endpoints. For example, (0, 1) is the interval where `0 < x < 1`.
|
||||
|
||||
- A _half-open_ interval includes only one of its endpoints. For example, (0, 1] is the _left-open_ interval where `0 < x <= 1`, while [0, 1) is the _right-open_ interval where `0 <= x < 1`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: kind
|
||||
---
|
||||
|
||||
See [page kind].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [page kind](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: layout
|
||||
---
|
||||
|
||||
See [template].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
See [template](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: leaf bundle
|
||||
---
|
||||
|
||||
A directory that contains an index.md file and zero or more [resources][resource]. Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants. See [details](/content-management/page-bundles/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A directory that contains an index.md file and zero or more [resources](g). Analogous to a physical leaf, a leaf bundle is at the end of a branch. It has no descendants. See [details](/content-management/page-bundles/).
|
||||
@@ -3,5 +3,3 @@ title: lexer
|
||||
---
|
||||
|
||||
A software component that identifies keywords, identifiers, operators, numbers, and other basic building blocks of a programming language within the input text.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: list page
|
||||
---
|
||||
|
||||
Any [page kind] that receives a page [collection] in [context]. This includes the home page, [section pages][section page], [taxonomy pages][taxonomy page], and [term pages][term page].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Any [page kind](g) that receives a page [collection](g) in [context](g). This includes the home page, [section pages](g), [taxonomy pages](g), and [term pages](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: list template
|
||||
---
|
||||
|
||||
Any template that renders a [list page]. This includes [home](/templates/types/#home), [section](/templates/types/#section), [taxonomy](/templates/types/#taxonomy), and [term](/templates/types/#term) templates.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Any template that renders a [list page](g). This includes [home](/templates/types/#home), [section](/templates/types/#section), [taxonomy](/templates/types/#taxonomy), and [term](/templates/types/#term) templates.
|
||||
@@ -3,5 +3,3 @@ title: localization
|
||||
---
|
||||
|
||||
Adaptation of a site to meet language and regional requirements. This includes translations, language-specific media, date and currency formats, etc. See [details](/content-management/multilingual/) and the [W3C definition](https://www.w3.org/International/questions/qa-i18n). Abbreviated l10n.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -5,5 +5,3 @@ title: logical path
|
||||
{{< new-in 0.123.0 >}}
|
||||
|
||||
A page or page resource identifier derived from the file path, excluding its extension and language identifier. This value is neither a file path nor a URL. Starting with a file path relative to the `content` directory, Hugo determines the logical path by stripping the file extension and language identifier, converting to lower case, then replacing spaces with hyphens. {{% comment %}}<!-- You may also set this value using the `path` front matter field. -->{{% /comment %}} See [examples](/methods/page/path/#examples).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: map
|
||||
---
|
||||
|
||||
An unordered group of elements, each indexed by a unique key. See the [Go documentation](https://go.dev/ref/spec#Map_types) for details.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -3,5 +3,3 @@ title: Markdown attribute
|
||||
---
|
||||
|
||||
A list of attributes, containing one or more key-value pairs, separated by spaces or commas, and wrapped by braces. Apply Markdown attributes to images and block-level elements including blockquotes, fenced code blocks, headings, horizontal rules, lists, paragraphs, and tables. See [details](/getting-started/configuration-markup/#goldmark).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: marshal
|
||||
---
|
||||
|
||||
To transform a data structure into a serialized object. For example, transforming a [map] into a JSON string. See [unmarshal].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
To transform a data structure into a serialized object. For example, transforming a [map](g) into a JSON string. See [unmarshal](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: method
|
||||
---
|
||||
|
||||
Used within a [template action] and associated with an [object], a method takes zero or more [arguments][argument] and either returns a value or performs an action. For example, `.IsHome` is a method on the `.Page` object which returns `true` if the current page is the home page. See also [function].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Used within a [template action](g) and associated with an [object](g), a method takes zero or more [arguments](g) and either returns a value or performs an action. For example, `.IsHome` is a method on the `.Page` object which returns `true` if the current page is the home page. See also [function](g).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: module
|
||||
---
|
||||
|
||||
Like a [theme], a module is a packaged combination of [archetypes][archetype], assets, content, data, [templates][template], translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See [details](/hugo-modules/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Like a [theme](g), a module is a packaged combination of [archetypes](g), assets, content, data, [templates](g), translation tables, static files, or configuration settings. A module may serve as the basis for a new site, or to augment an existing site. See [details](/hugo-modules/).
|
||||
@@ -2,6 +2,4 @@
|
||||
title: node
|
||||
---
|
||||
|
||||
A class of [page kinds][page kind] including `home`, `section`, `taxonomy`, and `term`.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A class of [page kinds](g) including `home`, `section`, `taxonomy`, and `term`.
|
||||
@@ -3,5 +3,3 @@ title: noop
|
||||
---
|
||||
|
||||
An abbreviated form of "no operation", a _noop_ is a statement that does nothing.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: object
|
||||
---
|
||||
|
||||
A data structure with or without associated [methods][method].
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A data structure with or without associated [methods](g).
|
||||
@@ -2,9 +2,7 @@
|
||||
title: ordered taxonomy
|
||||
---
|
||||
|
||||
Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [`Taxonomy`][taxonomy] object, which is a [map], an ordered taxonomy is a [slice], where each element is an object that contains the [term] and a slice of its [weighted pages][weighted page].
|
||||
Created by invoking the [`Alphabetical`] or [`ByCount`] method on a [`Taxonomy`](g) object, which is a [map](g), an _ordered taxonomy_ is a [slice](g), where each element is an object that contains the [term](g) and a slice of its [weighted pages](g).
|
||||
|
||||
[`Alphabetical`]: /methods/taxonomy/alphabetical/
|
||||
[`ByCount`]: /methods/taxonomy/bycount/
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,8 +2,6 @@
|
||||
title: output format
|
||||
---
|
||||
|
||||
Hugo generates one or more files per page when building a site. For example, when rendering home, [section], [taxonomy], and [term] pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in _output formats_. Create multiple output formats, and control generation based on [page kind], or by enabling one or more output formats for one or more pages. See [details].
|
||||
Hugo generates one or more files per page when building a site. For example, when rendering home, [section](g), [taxonomy](g), and [term](g) pages, Hugo generates an HTML file and an RSS file. Both HTML and RSS are built-in _output formats_. Create multiple output formats, and control generation based on [page kind](g), or by enabling one or more output formats for one or more pages. See [details].
|
||||
|
||||
[details]: /templates/output-formats/
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: page bundle
|
||||
---
|
||||
|
||||
A directory that encapsulates both content and associated [resources][resource]. There are two types of page bundles: [leaf bundles][leaf bundle]and [branch bundles][branch bundle]. See [details](/content-management/page-bundles/).
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
A directory that encapsulates both content and associated [resources](g). There are two types of page bundles: [leaf bundles](g) and [branch bundles](g). See [details](/content-management/page-bundles/).
|
||||
@@ -3,5 +3,3 @@ title: page collection
|
||||
---
|
||||
|
||||
A slice of `Page` objects.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -5,5 +5,3 @@ title: page kind
|
||||
A classification of pages, one of `home`, `page`, `section`, `taxonomy`, or `term`. See [details](/methods/page/kind/).
|
||||
|
||||
Note that there are also `RSS`, `sitemap`, `robotsTXT`, and `404` page kinds, but these are only available during the rendering of each of these respective page's kind and therefore *not* available in any of the `Pages` collections.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,8 +2,6 @@
|
||||
title: page resource
|
||||
---
|
||||
|
||||
A file within a [page bundle]. Capture one or more page resources using any of the [`Resources`] methods on a `Page` object.
|
||||
A file within a [page bundle](g). Capture one or more page resources using any of the [`Resources`] methods on a `Page` object.
|
||||
|
||||
[`Resources`]: /methods/page/resources/#methods
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
@@ -2,6 +2,4 @@
|
||||
title: pager
|
||||
---
|
||||
|
||||
Created during [pagination], a pager contains a subset of a list page and navigation links to other pagers.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Created during [pagination](g), a pager contains a subset of a list page and navigation links to other pagers.
|
||||
@@ -3,5 +3,3 @@ title: paginate
|
||||
---
|
||||
|
||||
To split a list page into two or more subsets.
|
||||
|
||||
{{% include "/getting-started/glossary/_link-reference-definitions" %}}
|
||||
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user