Handling tags

This commit is contained in:
nemunaire 2021-07-13 11:27:37 +02:00
commit b9020351c1
8 changed files with 84 additions and 16 deletions

View file

@ -10,26 +10,25 @@
post-container">
{{ .Content }}
{{ partial "comments.html" . }}
</div>
<!-- Sidebar Container -->
<div class="
col-xl-8 offset-xl-2
col-xl-2
col-lg-10 offset-lg-1
sidebar-container">
<!-- Featured Tags -->
{{ if .Site.Params.featured_tags }}
<section>
<hr class="hidden-sm hidden-xs">
<hr class="d-none d-lg-block">
<h5><a href="/tags/">FEATURED TAGS</a></h5>
<div class="tags">
{{ $featured_condition_size := .Site.Params.featured_condition_size }}
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
{{ if gt (len $taxonomy.Pages) $featured_condition_size }}
<a href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
{{ $name }}
<a class="badge badge-pill badge-secondary" href="{{ "/tags/" | relLangURL }}{{ $name | urlize }}" title="{{ $name }}">
#{{ $name }}
</a>
{{ end }}
{{ end }}