Posts for: #AI-Gen

How Dates Work on This Site

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:

[Read more]

Date Test

This page was created on March 1, 2026. If the dates are working correctly, you should see a different “Updated” date — the date of the most recent git commit that touched this file.

(Edited on April 3 to verify the updated date changes.)

[Read more]