small fixes

This commit is contained in:
teldra 2022-06-15 11:11:43 +02:00
parent dd47c85097
commit 90d0ad183b

View File

@ -95,14 +95,18 @@
<div class="text">
{{ if .Description }}
<p>{{ .Description }}</p>
{{ else if .Summary }}
{{ if hasPrefix .Summary "<p>" }}
{{ .Summary }}
{{ else }}
<p>{{ .Summary }} </p>
{{ end }}
{{ else if .Content }}
<p>{{ .Content }}</p>
{{ $summary := "" }}
{{ if in .RawContent "<!--more-->" }}
{{ $tmp := split .RawContent "<!--more-->" }}
{{ index $tmp 0 | markdownify }}
{{ else }}
{{ if hasPrefix .Summary "<p>" }}
{{ .Summary }}
{{ else }}
<p>{{ .Summary }} </p>
{{ end }}
{{ end }}
{{ else if $image }}
{{ $i := (.Resources.GetMatch $image).Permalink }}
<img src="{{ $i }}" />