Use tags for date and draft in the page_summary; add taxonomies

This commit is contained in:
Eryn Wells 2024-10-13 23:14:12 -07:00
parent 4c689f0f5c
commit d89f1b62b4
2 changed files with 24 additions and 29 deletions

View file

@ -1,16 +1,18 @@
<article class="page-summary">
<header class="page-summary__heading">
<h2 class="page-summary__title"><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
</header>
{{ if (.Params.rendersSummary | default true) -}}
{{ with .Description }}
<div class="page-summary__content">{{ . | markdownify }}</div>
<hgroup>
<h2><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></h2>
{{ if and (.Params.rendersSummary | default true) -}}
{{ with .Description }}
<p>{{ . | markdownify }}</p>
{{ end }}
{{ end }}
</hgroup>
{{- if .Date -}}
{{- partial "page/date.html" (dict "page" .) -}}
{{- end }}
{{- if ne hugo.Environment "production" -}}
{{ partial "page/taxonomy_draft.html" (dict "page" . "class" "page-summary__draft") }}
{{ partial "page/taxonomy_draft.html" (dict "page" .) }}
{{- end -}}
{{- if .Date -}}
{{- partial "page/date.html" (dict "page" . "class" "page-summary__date") -}}
{{- end }}
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "categories") }}
{{ partial "page/taxonomy_list.html" (dict "page" . "taxonomy" "tags") }}
</article>