Every page on this site has two dates: Created and Updated. Neither one is maintained by hand. Here’s the full flow.
Creating a new page
New content is created with the new.sh script:
./scripts/new.sh content/thissite/my-page.md
This sources .env for HUGO_IMAGE and SITE_DIR, then runs
hugo new inside the Docker container.
Hugo reads the archetype template at archetypes/default.md:
+++
date = '{{ .Date }}'
draft = true
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
tags = []
+++
At creation time, Hugo substitutes {{ .Date }} with the current
timestamp and writes it into the new file’s front matter. The result
looks like: