Posts for: #Workflow

Automatic Dating with Git

Hugo can pull dates from Git history so you never have to update lastmod by hand.

Enable Git info

# hugo.toml
enableGitInfo = true

Configure front matter date resolution

[frontmatter]
  date = [':filename', ':default']
  publishDate = [':filename', ':default']
  lastmod = [':git', ':fileModTime']

How it works

  • .Date — tries the filename first (2026-04-03-post.md), then the date field in front matter.
  • .Lastmod — uses the Git author date of the last commit that touched the file, falling back to filesystem mtime.
  • .PublishDate — same resolution chain as .Date.

Filename date formats

Hugo recognizes these patterns:

[Read more]

Tools I Use

A list of the hardware, software, and services I rely on daily.

Editor

VS Code with GitHub Copilot.

Terminal

Bash on Linux.

Languages

Python (via uv), Go, shell scripts.

[Read more]