page_summary.html: Make rendering the summary optional

Pages can control whether summaries are rendered for them in lists with the rendersSummary param.
This commit is contained in:
Eryn Wells 2024-07-03 07:31:32 -07:00
parent b50f4c6a92
commit db3f1f40fa

View file

@ -5,9 +5,11 @@
<p class="page-summary__subtitle">{{ . }}</p>
{{ end }}
</header>
<div class="page-summary__content">
{{ .Summary }}
</div>
{{ if (.Params.rendersSummary | default true) -}}
<div class="page-summary__content">
{{ .Summary }}
</div>
{{- end }}
<footer class="page-summary__footer">
<a href="{{ .RelPermalink }}">More →</a>
</footer>