mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 20:14:58 +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:
1 parent
850d5ca419
commit
22038d1a8e
1 file changed
+1
-1
@@ -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