content: Update front matter configuration example

This commit is contained in:
Joe Mooring 2025-08-26 07:25:12 -07:00 committed by GitHub
parent 863945e13e
commit 66eee712b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,10 +90,11 @@ Consider this site configuration:
{{< code-toggle file=hugo >}}
[frontmatter]
date = [':filename', ':default']
publishDate = [':filename', ':default']
lastmod = ['lastmod', ':fileModTime']
{{< /code-toggle >}}
To determine `date`, Hugo tries to extract the date from the file name, falling back to the default ordered sequence of date fields.
To determine `date` and `publishDate`, Hugo tries to extract the value from the file name, falling back to the default ordered sequence of date fields.
To determine `lastmod`, Hugo looks for a `lastmod` field in front matter, falling back to the file's last modification timestamp.