From 22038d1a8e9b1c4e04a48256cd6cf0b7888436be Mon Sep 17 00:00:00 2001 From: Julien Schmidt Date: Wed, 1 Nov 2017 22:03:57 +0100 Subject: [PATCH] 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).` --- content/templates/shortcode-templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/templates/shortcode-templates.md b/content/templates/shortcode-templates.md index 0f30d4bcb..9770eb392 100644 --- a/content/templates/shortcode-templates.md +++ b/content/templates/shortcode-templates.md @@ -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`