Fix GetPage call when tag/category contains a space

See #521 and #464
This commit is contained in:
George Cushen committed 2018-04-21 13:33:38 +01:00
1 parent 7cc95ba252
commit 6e2d51058f
3 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@
<span class="article-categories">
<i class="fa fa-folder"></i>
{{ range $k, $v := $.Params.categories }}
<a href="{{ ($.Site.GetPage "taxonomyTerm" "categories" (. | urlize | lower)).Permalink }}">{{ . }}</a
<a href="{{ ($.Site.GetPage "taxonomyTerm" "categories" .).Permalink }}">{{ . }}</a
>{{ if lt $k (sub $categoriesLen 1) }}, {{ end }}
{{ end }}
</span>
+1 -1
View File
@@ -3,7 +3,7 @@
{{ if gt $tagsLen 0 }}
<div class="article-tags">
{{ range $k, $v := $.Params.tags }}
<a class="btn btn-primary btn-outline" href="{{ ($.Site.GetPage "taxonomyTerm" "tags" (. | urlize | lower)).Permalink }}">{{ . }}</a>
<a class="btn btn-primary btn-outline" href="{{ ($.Site.GetPage "taxonomyTerm" "tags" .).Permalink }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
+1 -2
View File
@@ -24,8 +24,7 @@
{{ $tagCount := len $taxonomy.Pages }}
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
{{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
{{ $urlPart := urlize $name }}
<a href="{{ ($.Site.GetPage "taxonomyTerm" "tags" $urlPart).Permalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
<a href="{{ ($.Site.GetPage "taxonomyTerm" "tags" $name).Permalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
{{ end }}
</div>
{{ end }}