Skip to content

Commit

Permalink
shortcode-templates.md: Update year example
Browse files Browse the repository at this point in the history
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).`
  • Loading branch information
julienschmidt authored and digitalcraftsman committed Nov 1, 2017
1 parent 850d5ca commit 22038d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/templates/shortcode-templates.md
Expand Up @@ -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" >}} {{< code file="/layouts/shortcodes/year.html" >}}
{{ .Page.Now.Year }} {{ now.Format "2006" }}
{{< /code >}} {{< /code >}}


### Single Positional Example: `youtube` ### Single Positional Example: `youtube`
Expand Down

0 comments on commit 22038d1

Please sign in to comment.