1
Fork 0

Ensure tags are sorted alphabetically

This commit is contained in:
Jake Howard 2022-01-01 13:36:37 +00:00
parent 9965de16a5
commit 615e3113e7
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 5 additions and 3 deletions

View file

@ -12,7 +12,7 @@
<a href="{{ ref . "/tags" }}" class="no-color-change mr-1" title="Tags">
<i class="fas fa-tags small"></i>
</a>
{{ range $i, $e := .Params.tags }}
{{ range (.Params.tags | sort) }}
<a href="/tags/{{ urlize . }}" class="mr-1" title="{{ . }}">#{{ . }}</a>
{{ end }}
{{ end }}

View file

@ -59,8 +59,10 @@
<meta name="author" content="{{ title .Site.Params.author }}" />
<meta name="canonical" content="{{ .Permalink }}" />
{{ range .Params.tags }}
<meta property="article:tag" content="{{ . }}" />
{{ if .Params.tags }}
{{ range (.Params.tags | sort) }}
<meta property="article:tag" content="{{ . }}" />
{{ end }}
{{ end }}
{{ range .AlternativeOutputFormats }}