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

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong-Siang Shih (Shaform) <shaform@gmail.com>2018-07-23 11:54:26 +0300
committerChen Xianmin <xianmin12@gmail.com>2018-07-23 11:54:26 +0300
commit84978b94c309fe41d3f0b0ae2defed6686e361be (patch)
treeab5f31cd27c415764473e1c933bbe82b23c94f55
parent585a9a7e5ae19cd5240e285ad0a539301230d9a5 (diff)
fix API incompatibility for v0.45 (#91)
-rw-r--r--layouts/_default/terms.html4
-rw-r--r--layouts/post/single.html4
-rw-r--r--layouts/post/summary.html2
3 files changed, 5 insertions, 5 deletions
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
index dd0de30..dcd13d0 100644
--- a/layouts/_default/terms.html
+++ b/layouts/_default/terms.html
@@ -11,7 +11,7 @@
{{ range $terms }}
{{ $term := .Term }}
{{ $pages := .Pages }}
- {{ with $.Site.GetPage "taxonomy" $type $term }}
+ {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $term) }}
<section id="archive" class="archive">
<div class="archive-title">
</div>
@@ -66,7 +66,7 @@
{{ $count := len $taxonomy.Pages }}
{{ $weigth := div (sub (math.Log $count) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $currentFontSize := (add $smallestFontSize (mul (sub $largestFontSize $smallestFontSize) $weigth) ) }}
- {{ with $.Site.GetPage "taxonomy" $type $tagName }}
+ {{ with $.Site.GetPage "taxonomy" (printf "%s/%s" $type $tagName) }}
<!--Current font size: {{$currentFontSize}}-->
<a href="{{ .Permalink }}"
style="font-size:{{$currentFontSize}}{{$fontUnit}}">{{ $tagName }}</a>
diff --git a/layouts/post/single.html b/layouts/post/single.html
index ae7d01b..21b9d0e 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -11,7 +11,7 @@
<div class="post-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))) -}}
<a href="{{ .Permalink }}"> {{ $name }} </a>
{{ end -}}
{{ end }}
@@ -43,7 +43,7 @@
<div class="post-tags">
{{ range . }}
{{- $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))) -}}
<a href="{{ .Permalink }}">{{ $name }}</a>
{{ end -}}
{{ end }}
diff --git a/layouts/post/summary.html b/layouts/post/summary.html
index 6876a48..1a56f4f 100644
--- a/layouts/post/summary.html
+++ b/layouts/post/summary.html
@@ -8,7 +8,7 @@
<div class="post-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))) -}}
<a href="{{ .Permalink }}"> {{ $name }} </a>
{{ end -}}
{{ end }}