Deduplicate .Description and .Summary blocks

This commit is contained in:
BBaoVanC 2021-11-22 00:42:08 -06:00
parent f77efb1843
commit a11cc777bf
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
4 changed files with 8 additions and 19 deletions

View File

@ -23,13 +23,7 @@
</h2> </h2>
<div class="section-description"> <div class="section-description">
{{ if .Description }} {{ partial "description-or-summary.html" . }}
<p>
{{ .Description | markdownify }}
</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div> </div>
</div> </div>
</a> </a>

View File

@ -23,11 +23,7 @@
</div> </div>
<div class="post-description"> <div class="post-description">
{{ with .Description }} {{ partial "description-or-summary.html" . }}
<p>
{{ . | markdownify }}
</p>
{{ end }}
</div> </div>
<div class="series-pages"> <div class="series-pages">

View File

@ -14,13 +14,7 @@
{{ end }} {{ end }}
<div class="post-description"> <div class="post-description">
{{ if .Description }} {{ partial "description-or-summary.html" . }}
<p>
{{ .Description | markdownify }}
</p>
{{ else }}
{{ .Summary }}
{{ end }}
</div> </div>
<div class="readmore"> <div class="readmore">

View File

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