Add generator tag and fix typos in front matter page

This commit is contained in:
Ryan Watters 2017-03-14 11:27:43 -05:00
parent c126c94103
commit aeda233756
3 changed files with 27 additions and 28 deletions

View File

@ -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. 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` `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` `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` `description`
: the description for the content. : the description for the content.
`draft` `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` `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` `isCJKLanguage`
: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages. : 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. : the meta keywords for the content.
`layout` `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` `lastmod`
: the datetime at which the content was last modified. : the datetime at which the content was last modified.
`linktitle` `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` `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` `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` `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` `taxonomies`
: these will use the field name of the plural form of the index (see `tags` and : these will use the field name of the plural form of the index; see the `tags` and `categories` in the above front matter examples.
`categories` in the above front matter examples).
`title` `title`
: the title for the content. : 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. the multilingual feature.
`weight` `weight`
: used for sorting; see [list templates][ordering] : used for sorting; see [list templates][ordering].
{{% note "Hugo's Default URL Destinations" %}} {{% 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 %}} {{% /note %}}
### User-Defined ### 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 ```yaml
include_toc: true include_toc: true
show_comments: false 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 %}} {{% note %}}
Field names are always normalized to lowercase; e.g., `camelCase: true` is available as `.Params.camelcase`. Field names are always normalized to lowercase; e.g., `camelCase: true` is available as `.Params.camelcase`.
{{% /note %}} {{% /note %}}
## Ordering Content Through Front Matter ## 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 ## 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`. 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].
See [Configuration][config] for more information on configuring Blackfriday rendering.
## Front Matter Format Specs ## Front Matter Format Specs
* [TOML Spec][] The following are the specs used for Hugo's accepted front matter data formats:
* [YAML Spec][]
* [JSON Spec][] * [TOML Spec][toml]
* [YAML Spec][yaml]
* [JSON Spec][json]
[aliases]: /content-management/urls/#aliases/ [aliases]: /content-management/urls/#aliases/
[archetype]: /content-management/archetypes/ [archetype]: /content-management/archetypes/
[bylinktitle]: /templates/lists/#by-link-title [bylinktitle]: /templates/lists/#by-link-title
[config]: /getting-started/configuration/ "Hugo documentation for site configuration" [config]: /getting-started/configuration/ "Hugo documentation for site configuration"
[contentorg]: /content-management/organization/
[content type]: /content-management/types/ [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 [lookup]: /content-management/l
[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates" [ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates"
[pagevars]: /variables/page/ [pagevars]: /variables/page/
[section]: /content-management/sections/ [section]: /content-management/sections/
[taxweight]: /content-management/taxonomies/ [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/ [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"

View File

@ -1,5 +1,4 @@
{{ define "main" }} {{ define "main" }}
<span id="page-top"></span>
<main class="main"> <main class="main">
<article class="content" id="{{.Title | urlize}}"> <article class="content" id="{{.Title | urlize}}">
<header class="content-header"> <header class="content-header">

View File

@ -9,4 +9,5 @@
{{- partial "head/metadata-prefetch.html" . -}} {{- partial "head/metadata-prefetch.html" . -}}
{{- partial "head/metadata-rss.html" . -}} {{- partial "head/metadata-rss.html" . -}}
{{- partial "head/site-style.html" . -}} {{- partial "head/site-style.html" . -}}
{{ .Hugo.Generator }}
</head> </head>