2 Commits

Author SHA1 Message Date
5d335647d0 Remove description-or-summary partial and just use .Summary
I think this may have changed in Hugo's history, but now description and
summary are considered different things. The description is what goes in
metadata (and what search engines see), while the summary is the blurb
about the article that should be displayed when rendering a summary
(what I should've been using always here).
2025-08-07 02:17:24 -05:00
22fff1a9c5 Replace _internal subdirectory in partials
I originally put it there to mimic the old pattern before Hugo 0.148,
but it probably just makes things confusing.

Fixes #90
2025-08-07 01:05:06 -05:00
8 changed files with 22 additions and 21 deletions

View File

@@ -1,7 +0,0 @@
{{ with .Description }}
<p>{{ . | markdownify }}</p>
{{ else }}
{{ with .Summary }}
{{ . }}
{{ end }}
{{ end }}

View File

@@ -1,6 +1,6 @@
{{ if gt .Paginator.TotalPages 1 }}
<nav class="pagination">
{{/* https://github.com/gohugoio/hugo/blob/a88b488181279befd50e1d127f9f67604f2f9854/tpl/tplimpl/embedded/templates/_partials/pagination.html */}}
{{ partial "_internal/pagination.html" . }}
{{ partial "pagination-hugo.html" . }}
</nav>
{{ end }}

View File

@@ -5,9 +5,11 @@
{{ partial "page-metadata/author.html" . }}
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>
{{ with .Summary }}
<div class="page-description">
{{ . }}
</div>
{{ end }}
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>

View File

@@ -5,8 +5,10 @@
{{ .Title | markdownify }}
</h2>
<div class="section-description">
{{ partial "description-or-summary.html" . }}
</div>
{{ with .Summary }}
<div class="section-description">
{{ . }}
</div>
{{ end }}
</div>
</a>

View File

@@ -6,9 +6,11 @@
{{ partial "page-metadata/series.html" . }}
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>
{{ with .Summary }}
<div class="page-description">
{{ . }}
</div>
{{ end }}
<div class="page-list series-inner">
{{ range .Data.Pages.Reverse }}

View File

@@ -8,9 +8,11 @@
{{ partial "feature-figure.html" . }}
<div class="page-description">
{{ partial "description-or-summary.html" . }}
</div>
{{ with .Summary }}
<div class="page-description">
{{ . }}
</div>
{{ end }}
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>

View File

@@ -28,7 +28,7 @@
</a>
{{ partial "page-metadata/taxonomy.html" . }}
</div>
{{ partial "description-or-summary.html" . }}
{{ .Summary }}
</article>
{{ end }}
{{ end }}