mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-19 02:24:41 -04:00
Add generator tag and fix typos in front matter page
This commit is contained in:
parent
c126c94103
commit
aeda233756
@ -83,19 +83,19 @@ slug: "spf13-vim-3-0-release-and-new-website"
|
||||
There are a few predefined variables that Hugo is aware of. See [Page Variables][pagevars] for how to call many of these predefined variables in your templates.
|
||||
|
||||
`aliases`
|
||||
: an array of one or more aliases (e.g. old published path of a renamed content) that would be created to redirect to this content. See [Aliases][aliases] for details.
|
||||
: an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure . See [Aliases][aliases] for details.
|
||||
|
||||
`date`
|
||||
: the datetime at which the content was created; note this value is auto-populated according to Hugo's built-in [archetype][]
|
||||
: the datetime at which the content was created; note this value is auto-populated according to Hugo's built-in [archetype][].
|
||||
|
||||
`description`
|
||||
: the description for the content.
|
||||
|
||||
`draft`
|
||||
: If true, the content will not be rendered unless `hugo` is called with `--buildDrafts`
|
||||
: if `true`, the content will not be rendered unless the `--buildDrafts` flag is passed to the `hugo` command.
|
||||
|
||||
`expirydate`
|
||||
: denotes when content should no longer be published by Hugo; expired content will not be rendered unless `hugo` is called with `--buildExpired`
|
||||
: the datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
|
||||
|
||||
`isCJKLanguage`
|
||||
: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
|
||||
@ -104,26 +104,25 @@ There are a few predefined variables that Hugo is aware of. See [Page Variables]
|
||||
: the meta keywords for the content.
|
||||
|
||||
`layout`
|
||||
: the layout Hugo should look for in the [lookup order][] when rendering this content.
|
||||
: the layout Hugo should select from the [lookup order][] when rendering the content.
|
||||
|
||||
`lastmod`
|
||||
: the datetime at which the content was last modified.
|
||||
|
||||
`linktitle`
|
||||
: used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle]
|
||||
: used for creating links to content; if set, Hugo defaults to using the `linktitle` before the `title`. Hugo can also [order lists of content by `linktitle`][bylinktitle].
|
||||
|
||||
`markup`
|
||||
: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown
|
||||
: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown.
|
||||
|
||||
`publishdate`
|
||||
: If in the future, content will not be rendered unless `hugo` is called with `--buildFuture`
|
||||
: if in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
|
||||
|
||||
`slug`
|
||||
: appears as the tail of the URL. When used, it will override the segment of the URL based on the filename.
|
||||
: appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename.
|
||||
|
||||
`taxonomies`
|
||||
: these will use the field name of the plural form of the index (see `tags` and
|
||||
`categories` in the above front matter examples).
|
||||
: these will use the field name of the plural form of the index; see the `tags` and `categories` in the above front matter examples.
|
||||
|
||||
`title`
|
||||
: the title for the content.
|
||||
@ -136,55 +135,55 @@ There are a few predefined variables that Hugo is aware of. See [Page Variables]
|
||||
the multilingual feature.
|
||||
|
||||
`weight`
|
||||
: used for sorting; see [list templates][ordering]
|
||||
: used for sorting; see [list templates][ordering].
|
||||
|
||||
{{% note "Hugo's Default URL Destinations" %}}
|
||||
If neither `slug` nor `url` is present, and [permalinks are not configured otherwise](/content-management/urls/#permalinks), the filename will be used to create the URL for a page. See [Content Organization](/content-management/organization) and [URL Management](/content-management/urls/).
|
||||
If neither `slug` nor `url` is present and [permalinks are not configured otherwise](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
|
||||
{{% /note %}}
|
||||
|
||||
### User-Defined
|
||||
|
||||
You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates:
|
||||
You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates.
|
||||
|
||||
These fields in the following example can be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables][] section provides more information on using Hugo's page- and site-level variables in your templates.
|
||||
|
||||
```yaml
|
||||
include_toc: true
|
||||
show_comments: false
|
||||
```
|
||||
|
||||
These two user-defined fields can then be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables][] section provides more information on using Hugo's page- and site-level variables in your templates.
|
||||
|
||||
{{% note %}}
|
||||
Field names are always normalized to lowercase; e.g., `camelCase: true` is available as `.Params.camelcase`.
|
||||
{{% /note %}}
|
||||
|
||||
## Ordering Content Through Front Matter
|
||||
|
||||
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][ordering] to see the role `weight` in ordering content.
|
||||
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for list views. You can use `weight` for ordering content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][ordering] to see the role `weight` in ordering content.
|
||||
|
||||
## Overriding Global Blackfriday Configuration
|
||||
|
||||
It's possible to set some options for Markdown rendering in a content's front matter as an override to the options set in your site `config`.
|
||||
|
||||
See [Configuration][config] for more information on configuring Blackfriday rendering.
|
||||
It's possible to set some options for Markdown rendering in a content's front matter as an override to the [BlackFriday rendering options set in your project configuration][config].
|
||||
|
||||
## Front Matter Format Specs
|
||||
|
||||
* [TOML Spec][]
|
||||
* [YAML Spec][]
|
||||
* [JSON Spec][]
|
||||
The following are the specs used for Hugo's accepted front matter data formats:
|
||||
|
||||
* [TOML Spec][toml]
|
||||
* [YAML Spec][yaml]
|
||||
* [JSON Spec][json]
|
||||
|
||||
[aliases]: /content-management/urls/#aliases/
|
||||
[archetype]: /content-management/archetypes/
|
||||
[bylinktitle]: /templates/lists/#by-link-title
|
||||
[config]: /getting-started/configuration/ "Hugo documentation for site configuration"
|
||||
[contentorg]: /content-management/organization/
|
||||
[content type]: /content-management/types/
|
||||
[JSON Spec]: /documents/ecma-404-json-spec.pdf "Specification for JSON, JavaScript Object Notation"
|
||||
[contentorg]: /content-management/organization/
|
||||
[json]: /documents/ecma-404-json-spec.pdf "Specification for JSON, JavaScript Object Notation"
|
||||
[lookup]: /content-management/l
|
||||
[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates"
|
||||
[pagevars]: /variables/page/
|
||||
[section]: /content-management/sections/
|
||||
[taxweight]: /content-management/taxonomies/
|
||||
[TOML Spec]: https://github.com/toml-lang/toml "Specification for TOML, Tom's Obvious Minimal Language"
|
||||
[toml]: https://github.com/toml-lang/toml "Specification for TOML, Tom's Obvious Minimal Language"
|
||||
[urls]: /content-management/urls/
|
||||
[YAML Spec]: http://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language"
|
||||
[yaml]: http://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language"
|
||||
|
@ -1,5 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<span id="page-top"></span>
|
||||
<main class="main">
|
||||
<article class="content" id="{{.Title | urlize}}">
|
||||
<header class="content-header">
|
||||
|
@ -9,4 +9,5 @@
|
||||
{{- partial "head/metadata-prefetch.html" . -}}
|
||||
{{- partial "head/metadata-rss.html" . -}}
|
||||
{{- partial "head/site-style.html" . -}}
|
||||
{{ .Hugo.Generator }}
|
||||
</head>
|
Loading…
x
Reference in New Issue
Block a user