Skip to content

Commit

Permalink
tags: sort by name #193
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Feb 23, 2022
1 parent e42f711 commit 9b8db59
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
15 changes: 8 additions & 7 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
{{- end }}
{{- if or (eq .Kind "taxonomy") (eq .Kind "term") }}
<ul>
{{- range .Pages }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
{{- range .Data.Terms.Alphabetical }}
{{- if and .Page.Title (or (ne (.Page.Scratch.Get "relearnIsHiddenStem") true) (ne .Page.Site.Params.disableTagHiddenPages true) ) }}
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a></li>
{{- end }}
{{- else }}
{{- range sort .Pages "Title" }}
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableTagHiddenPages true) ) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{- end }}
{{- end }}
{{- end }}
</ul>
{{- end }}
<footer class=" footline">
{{- with .Params.LastModifierDisplayName }}
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{ with $.Date }} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{ end }}
{{- end }}
</footer>
{{- partial "footer.html" . }}
5 changes: 0 additions & 5 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{{- partial "header.html" . }}

{{ partial "content.html" . }}
<footer class="footline">
{{- with .Params.LastModifierDisplayName }}
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{ with $.Date }} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{ end }}
{{- end }}
</footer>
{{- partial "footer.html" . }}
5 changes: 5 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<footer class=" footline">
{{- with .Params.LastModifierDisplayName }}
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{ with $.Date }} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{ end }}
{{- end }}
</footer>
{{- if .Params.chapter }}
</div> <!-- end chapter-->
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
{{- partial "tags.html" . }}
</div>
{{- if and (not .IsHome) (not .Params.chapter) }}
<h1>{{ if eq .Kind "term" }}{{ .Data.Singular }} :: {{ end }}{{ .Title }}</h1>
<h1>{{ if eq .Kind "term" }}{{ .Data.Singular | humanize }} :: {{ end }}{{ .Title }}</h1>
{{- end }}

{{- define "breadcrumb" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/tags.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{{- if .Params.tags }}
<div class="tags">
{{- range .Params.tags }}
{{- range sort .Params.tags }}
<a class="tag-link" href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{- end }}
</div>
Expand Down

0 comments on commit 9b8db59

Please sign in to comment.