mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit '8b9803425e63e1b1801f8d5d676e96368d706722'
This commit is contained in:
@@ -9,13 +9,19 @@ action:
|
||||
signatures: [SITE.LastChange]
|
||||
---
|
||||
|
||||
{{% deprecated-in 0.123.0 %}}
|
||||
Use [`.Site.Lastmod`] instead.
|
||||
|
||||
[`.Site.Lastmod`]: /methods/site/lastmod/
|
||||
{{% /deprecated-in %}}
|
||||
|
||||
The `LastChange` method on a `Site` object returns a [`time.Time`] value. Use this with time [functions] and [methods]. For example:
|
||||
|
||||
```go-html-template
|
||||
{{ .Site.LastChange | time.Format ":date_long" }} → October 16, 2023
|
||||
{{ .Site.LastChange | time.Format ":date_long" }} → January 31, 2024
|
||||
|
||||
```
|
||||
|
||||
[`time.Time`]: https://pkg.go.dev/time#Time
|
||||
[functions]: /functions/time
|
||||
[methods]: /methods/time
|
||||
[functions]: /functions/time/
|
||||
[methods]: /methods/time/
|
||||
|
Reference in New Issue
Block a user