Intro
Frontmatter in Hugo is a block of YAML, TOML, or JSON at the beginning of a content file that contains metadata about the content. By default, Hugo provides a default frontmatter template for new content files. However, you can create a custom frontmatter file in Hugo by defining a custom archetype file.
In this tutorial, you will learn how to create a custom frontmatter file in Hugo.
Method
- Create a new archetype file
./archetypes/default.md
in your Hugo project. - Define the custom frontmatter template in the archetype file.
Example
|
|