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 pagedescription— a description of the pagedraft— if true, hugo will not publish unless--buildDraftsis passedexpiryDate— if in the past, hugo will not publish unless--buildExpiredis passedimages— an array of paths to images related to this pagekeywords— the meta keywords for this contentlastmod— the datetime at which content was last modifiedlinkTitle— if set, Hugo defaults to using thelinkTitlebefore thetitle(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 passedslug— 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.