{{- with .Description -}} {{- . | markdownify | printf "
%s
" | safeHTML -}} {{- else -}} {{- $summary_has_org_toc := substr .Content 0 30 | findRE "[\".]ox-hugo-toc" -}} {{- if $summary_has_org_toc -}} {{- $content_splits := split .RawContent "" -}} {{- $summary_raw := index $content_splits 1 -}} {{- $summary_splits := split $summary_raw "" -}} {{- if eq (len $summary_splits) 2 -}} {{- index $summary_splits 0 | markdownify -}} {{- else -}} {{- $summary_raw | markdownify | truncate 300 -}} {{- end -}} {{- else -}} {{- .Summary | printf "%s
" | safeHTML -}} {{- end -}} {{- end -}}