mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +00:00
Fix typo in Format function
This commit is contained in:
1 parent
4a2148e276
commit
e97837f656
1 file changed
+2
-2
@@ -18,7 +18,7 @@ aliases: []
|
|||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|
||||||
`Format` will format date values defined in your front matter. `.Format` and can be used as a property on the following [page variables][pagevars]:
|
`Format` will format date values defined in your front matter and can be used as a property on the following [page variables][pagevars]:
|
||||||
|
|
||||||
* `.PublishDate`
|
* `.PublishDate`
|
||||||
* `.Date`
|
* `.Date`
|
||||||
@@ -30,7 +30,7 @@ Assuming a key-value of `date: 2017-03-03` in a content file's front matter, you
|
|||||||
{{ .PublishDate.Format "January 2, 2006" }} => March 3, 2017
|
{{ .PublishDate.Format "January 2, 2006" }} => March 3, 2017
|
||||||
```
|
```
|
||||||
|
|
||||||
For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat].
|
For formatting *any* string representations of dates defined in your front matter, see the [`dateFormat` function][dateFormat], which will still leverage the Golang layout string explained below but uses a slightly different syntax.
|
||||||
|
|
||||||
## Go's Layout String
|
## Go's Layout String
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user