Skip to content

Commit

Permalink
fix list template .Description
Browse files Browse the repository at this point in the history
  • Loading branch information
panr committed Sep 7, 2024
1 parent 3c03c1b commit b6c2baf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

![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.
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2 class="post-title">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 class="post-title">
{{ if .Params.showFullContent }}
{{ .Content }}
{{ else if .Description }}
{{ .Description | markdownify }}
<p>{{ .Description | markdownify }}</p>
{{ else }}
{{ .Summary }}
{{ end }}
Expand Down
14 changes: 7 additions & 7 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ <h1>{{ .Title }}</h1>
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li>
{{ end }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<a class="terms-title" href="{{ .Permalink }}">{{ .Name }} [{{ $count }}]</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
Expand Down

0 comments on commit b6c2baf

Please sign in to comment.