From 0d9656d939b58a1ea721b8cde42ef186514f00c3 Mon Sep 17 00:00:00 2001 From: Josh Lubaway Date: Sat, 26 Oct 2019 10:00:59 -0700 Subject: [PATCH] Replace {{ .URL }} with {{ .Permalink }} (#216) Using the `{{ .URL }}` token results in a warning: WARN 2019/10/13 15:12:12 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url. Steps to reproduce ================== Follow along with the Quick Start guide at https://gohugo.io/getting-started/quick-start/ Running `hugo server -D` emits a warning that `.URL` is deprecated. --- layouts/index.html | 4 ++-- layouts/partials/site-navigation.html | 2 +- layouts/partials/summary-with-image.html | 6 +++--- layouts/partials/summary.html | 2 +- layouts/post/summary-with-image.html | 2 +- layouts/post/summary.html | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 0361bce..148525e 100755 --- a/layouts/index.html +++ b/layouts/index.html @@ -37,7 +37,7 @@ {{/* Now, range through the next four after the initial $n_posts items. Nest the requirements, "after" then "first" on the outside */}} {{ range (first 4 (after $n_posts $section)) }}

- + {{ .Title }}

@@ -45,7 +45,7 @@ {{/* As above, Use $section_name to get the section title, and URL. Use "with" to only show it if it exists */}} {{ with .Site.GetPage "section" $section_name }} - {{ i18n "allTitle" . }} + {{ i18n "allTitle" . }} {{ end }} {{ end }} diff --git a/layouts/partials/site-navigation.html b/layouts/partials/site-navigation.html index d1f31da..e055502 100644 --- a/layouts/partials/site-navigation.html +++ b/layouts/partials/site-navigation.html @@ -9,7 +9,7 @@