docs/content/en/methods/page/Lastmod.md
Set the last modification date in front matter:
{{< code-toggle file=content/news/article-1.md fm=true >}} title = 'Article 1' lastmod = 2023-10-19T00:40:04-07:00 {{< /code-toggle >}}
The last modification date is a time.Time value. Format and localize the value with the time.Format function, or use it with any of the time methods.
{{ .Lastmod | time.Format ":date_medium" }} → Oct 19, 2023
In the example above we explicitly set the last modification date in front matter. With Hugo's default configuration, the Lastmod method returns the front matter value. This behavior is configurable, allowing you to:
GitInfo for details.Learn more about date configuration.