mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
Merge commit '5be51ac3db225d5df501ed1fa1499c41d97dbf65'
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
---
|
||||
title: ExpiryDate
|
||||
description: Returns the expiry date of the given page.
|
||||
description: Returns the expiry date of the given page.
|
||||
categories: []
|
||||
keywords: []
|
||||
action:
|
||||
related:
|
||||
- methods/page/Date
|
||||
- methods/page/LastMod
|
||||
- methods/page/PublishDate
|
||||
returnType: time.Time
|
||||
signatures: [PAGE.ExpiryDate]
|
||||
params:
|
||||
functions_and_methods:
|
||||
returnType: time.Time
|
||||
signatures: [PAGE.ExpiryDate]
|
||||
---
|
||||
|
||||
By default, Hugo excludes expired pages when building your site. To include expired pages, use the `--buildExpired` command line flag.
|
||||
@@ -30,6 +27,6 @@ The expiry date is a [time.Time] value. Format and localize the value with the [
|
||||
In the example above we explicitly set the expiry date in front matter. With Hugo's default configuration, the `ExpiryDate` method returns the front matter value. This behavior is configurable, allowing you to set fallback values if the expiry date is not defined in front matter. See [details].
|
||||
|
||||
[`time.Format`]: /functions/time/format/
|
||||
[details]: /getting-started/configuration/#configure-dates
|
||||
[details]: /configuration/front-matter/#dates
|
||||
[time methods]: /methods/time/
|
||||
[time.Time]: https://pkg.go.dev/time#Time
|
||||
|
Reference in New Issue
Block a user