diff options
| author | Reorx <novoreorx@gmail.com> | 2022-09-08 23:17:43 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-09-08 23:36:35 +0800 |
| commit | 886aafac1f1fbdee64537938fa906c3dacb516eb (patch) | |
| tree | 8373af942cf1f6ef4d60f13e43c434d4bd230bc5 /layouts/_default/list.html | |
| parent | ae58c91ac49e822fd2cf8c5aa1b36cea0f8470ee (diff) | |
inline_links partial
finally find a way to determine whether a section/term page has archives or not
by conquering hugo's faultiness of .RelPermalink
Diffstat (limited to 'layouts/_default/list.html')
| -rw-r--r-- | layouts/_default/list.html | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 654297b..7dce17b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,20 +7,17 @@ {{- if not .IsHome | and .Title }} <header class="page-header"> {{- partial "breadcrumbs.html" . }} - <h1>{{ .Title }}</h1> + <h1> + {{/* see: https://gohugo.io/variables/taxonomy/#taxonomy-terms-page-variables */}} + {{- if eq .Kind "term" -}}{{- .Data.Singular }}: {{ end -}} + {{ .Title -}} + </h1> {{- if .Description }} <div class="post-description"> {{ .Description | markdownify }} </div> {{- end }} - <div class="inline-links"> - {{- with .Param "archivesSlug" }} - <a href="{{ $.RelPermalink }}{{ . }}/">Archives</a> - {{- end }} - {{ with .OutputFormats.Get "rss" -}} - • <a href="{{ .Permalink }}" target="_blank">RSS</a> - {{ end -}} - </div> + {{- partial "inline_links.html" . -}} </header> {{- end }} |
