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

github.com/balaramadurai/hugo-travelify-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/partials/widgets/categories.html5
-rw-r--r--layouts/partials/widgets/tag_cloud.html4
2 files changed, 6 insertions, 3 deletions
diff --git a/layouts/partials/widgets/categories.html b/layouts/partials/widgets/categories.html
index 12f49fd..058e779 100644
--- a/layouts/partials/widgets/categories.html
+++ b/layouts/partials/widgets/categories.html
@@ -2,10 +2,11 @@
<h3 class="widget-title">{{with .Site.Data.l10n.widgets.categories.title}}{{.}}{{end}}</h3>
<ul>
{{ range $name, $items := .Site.Taxonomies.categories }}
+ {{ with site.GetPage (printf "/%s/%s" "categories" $name) }}
<li class="cat-item">
- {{ $url := printf "%s/%s" "categories" ($name | urlize)}}
- <a href="{{ $url | absURL }}">{{ $name | title }}</a> ({{ len $items }})
+ <a href="{{ .Permalink }}">{{ $name | title }}</a> ({{ len $items }})
</li>
{{ end }}
+ {{ end }}
</ul>
</aside>
diff --git a/layouts/partials/widgets/tag_cloud.html b/layouts/partials/widgets/tag_cloud.html
index 21cdb8d..236dfdb 100644
--- a/layouts/partials/widgets/tag_cloud.html
+++ b/layouts/partials/widgets/tag_cloud.html
@@ -9,12 +9,14 @@
{{ $baseurl := .Site.BaseURL }}
{{ range $name, $value := .Site.Taxonomies.tags }}
{{ if (gt $value.Count $min_count) }}
- <a href="{{ $baseurl }}tags/{{ $name | urlize }}" style="font-size: {{ add ($value.Count) $mag_factor }}px;" title="{{ ($value.Count) }} topics">
+ {{ with site.GetPage (printf "/%s/%s" "tags" $name) }}
+ <a href="{{ .Permalink }}" style="font-size: {{ add ($value.Count) $mag_factor }}px;" title="{{ ($value.Count) }} topics">
<!--a href="{{ $baseurl }}/tags/{{ $name | urlize }}"-->
{{ $name | title }}
</a>
{{ end }}
{{ end }}
+ {{ end }}
</div>
</aside>