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:
Julien Schmidt 2017-11-01 22:03:57 +01:00 committed by digitalcraftsman
parent 850d5ca419
commit 22038d1a8e

View File

@ -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`