mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 19:14:46 -04:00
shortcode-templates.md: Update year example
The example used a deprecated way to get the current year: `Page's Now is deprecated and will be removed in Hugo 0.31. Use now (the template func).`
This commit is contained in:
parent
850d5ca419
commit
22038d1a8e
@ -150,7 +150,7 @@ Let's assume you would like to keep mentions of your copyright year current in y
|
||||
```
|
||||
|
||||
{{< code file="/layouts/shortcodes/year.html" >}}
|
||||
{{ .Page.Now.Year }}
|
||||
{{ now.Format "2006" }}
|
||||
{{< /code >}}
|
||||
|
||||
### Single Positional Example: `youtube`
|
||||
|
Loading…
x
Reference in New Issue
Block a user