overview
Frontmatter (or front matter) is metadata for a page.
predefined frontmatter
These predefined variables can be called from Page Variables. This list is incomplete:
- aliases— an array of aliases that are published paths of renamed content that will be recreated in the output directory structure (see also: Aliases)
- date— the datetime assigned to this page
- description— a description of the page
- draft— if true, hugo will not publish unless- --buildDraftsis passed
- expiryDate— if in the past, hugo will not publish unless- --buildExpiredis passed
- images— an array of paths to images related to this page
- keywords— the meta keywords for this content
- lastmod— the datetime at which content was last modified
- linkTitle— if set, Hugo defaults to using the- linkTitlebefore the- title(see also: Order lists of content by linktitle)
- outputs— specify the output formats (see also: Output formats)
- publishDate— if in the future, hugo will not publish unless- --buildFutureis passed
- slug— overrides the last segment of the URL path (see also: URL management)
- type— the type of the content; derived from the directory (the section) if nto specified here (see also: Sections)
- url— overrides the URL path; works for both regular pages and sections (see also: URL management)
- weight— specify weight to order content in lists- lower weight comes first
- must be non-zero
- see also: Ordering content in lists
 
User-defined Frontmatter
User-defined frontmatter fields can be added. They are placed into a single .Params variable for use in templates.
Example:
include_toc = true
show_comments = false
The above fields can be accessed via .Params.include_toc and Params.show_comments.