mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 23:38:53 +00: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:
committed by
digitalcraftsman
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`
|
||||
|
||||
Reference in New Issue
Block a user