fix list template .Description

This commit is contained in:
panr 2024-09-07 23:43:48 +02:00
parent 3c03c1b0ea
commit b6c2bafbdc
4 changed files with 9 additions and 10 deletions

View file

@ -6,7 +6,6 @@
![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/terminal-theme.png?raw=true) ![Terminal](https://github.com/panr/hugo-theme-terminal/blob/master/images/terminal-theme.png?raw=true)
--- ---
⚠️ The theme needs at least Hugo **Extended** v0.90.x. ⚠️ The theme needs at least Hugo **Extended** v0.90.x.

View file

@ -37,7 +37,7 @@
{{ if .Params.showFullContent }} {{ if .Params.showFullContent }}
{{ .Content }} {{ .Content }}
{{ else if .Description }} {{ else if .Description }}
{{ .Description | markdownify }} <p>{{ .Description | markdownify }}</p>
{{ else }} {{ else }}
{{ .Summary }} {{ .Summary }}
{{ end }} {{ end }}

View file

@ -38,7 +38,7 @@
{{ if .Params.showFullContent }} {{ if .Params.showFullContent }}
{{ .Content }} {{ .Content }}
{{ else if .Description }} {{ else if .Description }}
{{ .Description | markdownify }} <p>{{ .Description | markdownify }}</p>
{{ else }} {{ else }}
{{ .Summary }} {{ .Summary }}
{{ end }} {{ end }}

View file

@ -9,13 +9,13 @@
<ul> <ul>
{{ $type := .Type }} {{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }} {{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }} {{ $name := .Name }}
{{ $count := .Count }} {{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }} {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li> <li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a> <a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}
</ul> </ul>
</div> </div>