The front matter is one of the features that gives Hugo its strength. It enables us to include the meta data of the content right with it. We will use it to categorize the content and provide other kind of info to add some magic :)
The “front matter” format we use is named TOML. It is delimited with +++
.
Example:
+++
title = "Register"
type = "reference"
groups = ["reference"]
promoted = true
weight = 10
+++
Example:
+++
title = "Front Matter"
+++
Mandatory, it is used as browser page title and as the 1st level header.
Example:
+++
type = "faq"
+++
Optional, used to identify the kind of a page and use a specific template. The supported types of page are:
TBD
Example:
+++
groups = ["whatsnew"]
+++
Groups are used to gather together similar pages to classify them, it’s the concept of Taxonomies.
Available groups are:
Example:
+++
tags = ["issue", "faq", "problem", "connection"]
+++
Tags are another kind of Taxonomies, they are used by the search engine to prioritize the results.
Let’s say you have 2 pages mentionning the word “authentication” and only one them has the tag “authentication”. If your search term is “authentication” the page with the tag will have a higher rank level than the other.
Example:
+++
weight = 10
+++
Weights are used to sort pages in a group or tag.
Example:
+++
promoted = true
+++
It is used to identify the pages we want to link from the Overview page. It is currently only used for Reference pages.