hugo-theme-termlite/layouts/_default/page_summary.html
Eryn Wells db3f1f40fa page_summary.html: Make rendering the summary optional
Pages can control whether summaries are rendered for them in lists with the rendersSummary param.
2024-07-03 07:41:23 -07:00

16 lines
490 B
HTML

<article class="page-summary">
<header>
<h2 class="page-summary__title">{{ .Title }}</h2>
{{ with .Params.subtitle | default .Description | markdownify }}
<p class="page-summary__subtitle">{{ . }}</p>
{{ end }}
</header>
{{ if (.Params.rendersSummary | default true) -}}
<div class="page-summary__content">
{{ .Summary }}
</div>
{{- end }}
<footer class="page-summary__footer">
<a href="{{ .RelPermalink }}">More →</a>
</footer>
</article>