Lego2012
5/25/2017 - 11:03 AM

Front Matter Variables Default

Front Matter Variables Default

Front Matter Variables

Predefined

There are a few predefined variables that Hugo is aware of. See Page Variables for how to call many of these predefined variables in your templates.

aliases

an array of one or more aliases (e.g., old published paths of renamed content) that will be created in the output directory structure.

date

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 the --buildDrafts flag is passed to the hugo command.

expirydate

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.

keywords

the meta keywords for the content.

layout

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.

markup

experimental; specify "rst" for reStructuredText (requiresrst2html) or "md" (default) for Markdown.

publishdate

if in the future, content will not be rendered unless the --buildFuture flag is passed to hugo.

slug

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 the tags and categories in the above front matter examples.

title

the title for the content.

type

the type of the content; this value will be derived from the directory (i.e., the section) automatically if unset.

url

the full path to the content from the web root. It makes no assumptions about the path of the content file. It also ignores any language prefixes of the multilingual feature.

weight

used for ordering your content in lists.

If neither slug nor url is present and permalinks are not configured otherwise, Hugo will use the filename of your content to create the output URL. See Content Organization for an explanation of paths in Hugo and URL Management for ways to customize Hugo’s default behaviors.