hugo-theme-termlite/layouts/_default/page_summary.html
Eryn Wells 4d9e9e1301 Only include an <hgroup> in the page summary if there's a description to include
Otherwise just use an <h2>. Add .page-summary__heading to both elements and update
the styles.
2024-10-20 09:16:43 -07:00

23 lines
827 B
HTML

<article class="page-summary">
{{ if and (.Params.rendersSummary | default true) (gt (len .Description) 0) -}}
<hgroup class="page-summary__heading">
<h2><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
{{ with .Description }}
<p>{{ . | markdownify }}</p>
{{ end }}
</hgroup>
{{ else }}
<h2 class="page-summary__heading"><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
{{ end }}
{{- if .Date -}}
{{- partial "page/date.html" (dict "page" .) -}}
{{- end }}
{{- if not hugo.IsProduction -}}
{{ partial "page/taxonomy_draft.html" (dict "page" .) }}
{{- end -}}
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "categories") }}
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "tags") }}
</article>