diff options
author | Shaform <shaform@gmail.com> | 2018-07-21 05:05:46 +0300 |
---|---|---|
committer | Shaform <shaform@gmail.com> | 2018-07-21 05:05:46 +0300 |
commit | 18a439a143dfe3fd605e6394d4253a1120608733 (patch) | |
tree | 1f420a0938532e72c1ce23ffd37b1662e904a964 | |
parent | d34dd0c325d5afcd2467864edb02df90444bcbea (diff) |
deprecate older API
-rw-r--r-- | layouts/_default/terms.html | 4 | ||||
-rw-r--r-- | layouts/posts/single.html | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 7dd33ed..e800cb7 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -27,7 +27,7 @@ {{ range .Data.Terms.ByCount }} {{ $name := .Name }} {{ $pages := .Pages }} - {{ with $.Site.GetPage "taxonomy" $type .Term }} + {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type .Term) }} <h2><a href="{{ .Permalink }}">{{ $name }}</a></h2> <dl class="row"> {{ range first ($.Site.Params.numListPosts | default 10) $pages }} @@ -48,7 +48,7 @@ {{ range .Data.Terms.Alphabetical }} {{ $name := .Name }} {{ $count := len .Pages }} - {{ with $.Site.GetPage "taxonomy" $type .Term }} + {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type .Term) }} <dt class="col-md-3"><span class="badge badge-secondary">{{ $count }}</span> {{ if gt $count 1 }}{{ i18n "articles_tagged" }}{{ else }}{{ i18n "article_tagged" }}{{ end }}</dt> <dd class="col-md-9"><a href="{{ .Permalink }}">{{ $name }}</a></dd> {{ end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index aec11a2..f30c3b2 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -18,7 +18,7 @@ / {{ i18n "in_category" }} {{ range . -}} {{- $name := . -}} - {{- with $.Site.GetPage "taxonomy" "categories" $name | default ($.Site.GetPage "taxonomy" "categories" ($name | urlize)) -}} + {{- with $.Site.GetPage "taxonomy" (printf "categories/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "categories/%s" ($name | urlize))) -}} {{- if not ($.Scratch.Get "firstcategory") -}} , {{ else -}} @@ -37,7 +37,7 @@ <i class="fas fa-tags" aria-hidden="true"></i> {{ range (. | sort) -}} {{- $name := . -}} - {{- with $.Site.GetPage "taxonomy" "tags" $name | default ($.Site.GetPage "taxonomy" "tags" ($name | urlize)) -}} + {{- with $.Site.GetPage "taxonomy" (printf "tags/%s" $name) | default ($.Site.GetPage "taxonomy" (printf "tags/%s" ($name | urlize))) -}} {{- if not ($.Scratch.Get "firsttag") -}} , {{ else -}} |