forked from drowl87/hextra_mirror
docs: describe page last modification date (#562)
This commit is contained in:
parent
bbe3c46320
commit
c60d1f5de7
@ -212,6 +212,22 @@ Options for `theme.default`:
|
|||||||
The `theme.displayToggle` parameter allows you to display a toggle button for changing themes.
|
The `theme.displayToggle` parameter allows you to display a toggle button for changing themes.
|
||||||
When set to `true`, visitors can switch between light or dark mode, overriding the default setting.
|
When set to `true`, visitors can switch between light or dark mode, overriding the default setting.
|
||||||
|
|
||||||
|
### Page Last Modification
|
||||||
|
|
||||||
|
The date of the page's last modification can be displayed by enabling the `params.displayUpdatedDate` flag. To use Git commit date as the source, enable also the `enableGitInfo` flag.
|
||||||
|
|
||||||
|
To customize the date format, set the `params.dateFormat` parameter. Its layout matches Hugo's [`time.Format`](https://gohugo.io/functions/time/format/).
|
||||||
|
|
||||||
|
```yaml {filename="hugo.yaml"}
|
||||||
|
# Parse Git commit
|
||||||
|
enableGitInfo: true
|
||||||
|
|
||||||
|
params:
|
||||||
|
# Display the last modification date
|
||||||
|
displayUpdatedDate: true
|
||||||
|
dateFormat: "January 2, 2006"
|
||||||
|
```
|
||||||
|
|
||||||
### Page Width
|
### Page Width
|
||||||
|
|
||||||
The width of the page can be customized by the `params.page.width` parameter in the config file:
|
The width of the page can be customized by the `params.page.width` parameter in the config file:
|
||||||
|
@ -3,6 +3,7 @@ baseURL: "https://example.com/"
|
|||||||
title: "Hextra"
|
title: "Hextra"
|
||||||
|
|
||||||
enableRobotsTXT: true
|
enableRobotsTXT: true
|
||||||
|
# Parse Git commit
|
||||||
enableGitInfo: true
|
enableGitInfo: true
|
||||||
# enableEmoji: false
|
# enableEmoji: false
|
||||||
hasCJKLanguage: true
|
hasCJKLanguage: true
|
||||||
@ -135,6 +136,7 @@ params:
|
|||||||
displayPoweredBy: true
|
displayPoweredBy: true
|
||||||
width: normal
|
width: normal
|
||||||
|
|
||||||
|
# Display the last modification date
|
||||||
displayUpdatedDate: true
|
displayUpdatedDate: true
|
||||||
dateFormat: "January 2, 2006"
|
dateFormat: "January 2, 2006"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user