change homepage, add alltags partial

This commit is contained in:
chris 2023-06-13 22:24:38 -05:00
parent 498b077cad
commit 16c25c15de
4 changed files with 22 additions and 18 deletions

View File

@ -13,18 +13,7 @@
{{ i18n "last_updated" }} {{ partial "date-fmt.html" .}}
{{ partial "github.html" . }}
</p>
<ul class="tags">
{{ range (.GetTerms "tags") }}
<li><a href="{{ .Permalink }}">
{{if (eq $.Site.Language.Lang "en")}}
{{ .LinkTitle | humanize }}
{{else}}
{{ .LinkTitle }}
{{end}}
</a>
</li>
{{ end }}
</ul>
{{partial "tags.html" .}}
{{partial "toc.html" .}}
{{partial "textprocessing.html" . }}
</article>

View File

@ -8,13 +8,14 @@
<!-- Begin actual content -->
{{partial "header.html" .}}
<article>
{{partial "toc.html" .}}
{{partial "textprocessing.html" . }}
{{if $.Site.Data.config.enableRecentNotes}}
{{partial "recent.html" . }}
{{end}}
{{partial "toc.html" .}}
{{partial "textprocessing.html" . }}
{{partial "allTags.html" .}}
{{partial "recent.html" . }}
<!-- {{if $.Site.Data.config.enableRecentNotes}} -->
<!-- {{end}} -->
</article>
{{partial "footerIndex.html" .}}
<!-- {{partial "footerIndex.html" .}} -->
</div>
</body>
</html>

View File

@ -0,0 +1,9 @@
<h2>Topics</h2><br>
{{range $name, $taxonomy := .Site.Taxonomies.tags}} {{ $cnt := .Count }}
{{ with $.Site.GetPage (printf "/tags/%s" $name) }}
<div class="tagbutton">
<a href={{ .RelPermalink }} title="All pages with tag <i>{{$name}}</i>">{{$name}}</a>
<sup>{{$cnt}}</sup>
</div>
{{end}}
{{end}}

View File

@ -0,0 +1,5 @@
<ul class="tags">
{{ range (.GetTerms "tags") }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle | title}}</a></li>
{{ end }}
</ul>