mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
Merge commit 'a024bc7d76fcc5e49e8210f9b0896db9ef21861a'
This commit is contained in:
@@ -7,7 +7,7 @@ action:
|
||||
related: []
|
||||
returnType: time.Time
|
||||
signatures: [SITE.LastChange]
|
||||
expiryDate: 2025-02-19 # deprecated 2024-02-19
|
||||
expiryDate: 2026-02-19 # deprecated 2024-02-19 in v0.123.0
|
||||
---
|
||||
|
||||
{{% deprecated-in 0.123.0 %}}
|
||||
@@ -15,14 +15,3 @@ 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" }} → January 31, 2024
|
||||
|
||||
```
|
||||
|
||||
[`time.Time`]: https://pkg.go.dev/time#Time
|
||||
[functions]: /functions/time/
|
||||
[methods]: /methods/time/
|
||||
|
Reference in New Issue
Block a user