Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gundamew/hugo-bingo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBing-Sheng Chen <gundamew@gmail.com>2019-07-08 09:28:58 +0300
committerBing-Sheng Chen <gundamew@gmail.com>2019-07-08 09:43:34 +0300
commitd5a0914374b3c2715306f6ac85530186891912b5 (patch)
treef6eab88aab9a0288d3304cdb5fdea8121b05bf45
parent9a3782c312b61a881a929446302bf41a66bc1fca (diff)
fix(page): Replace `.URL` with `.Permalink`v1.4.2
Replace `.URL` with `.Permalink` to omit the warnings below: > 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.
-rw-r--r--layouts/_default/list.html2
-rw-r--r--layouts/index.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 53fa567..a750cae 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -4,7 +4,7 @@
<ul>
{{ range .Data.Pages }}
<li>
- <a href="{{ .URL }}">{{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
<p>{{ .Render "time-element" }}</p>
</li>
{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 3604f74..868053f 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -16,7 +16,7 @@
{{ range first 5 .Data.Pages.ByPublishDate.Reverse }}
<li>
<span>{{ .Render "time-element" }}</span>
- <a href="{{ .URL }}">{{ .Title }}</a>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>