Archetypes

Archetypes

Default front matter format

As the Hextra theme prefers the YAML1 format in its docs and the Hugo configuration has also been created in this format, I switch the front matter format to YAML as well. Therefor, I create the file archetype/default.md containing:

default.md
---
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
date: {{ .Date }}
draft: true
---

Using this archetype the front matter format for a content file created by the hugo new content command is specified to be YAML.


  1. YAML in the Wikipedia ↩︎

Last updated on