We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06a5c3a commit b9c5a3dCopy full SHA for b9c5a3d
themes/hugoplate/layouts/partials/components/blog-card.html
@@ -33,7 +33,10 @@ <h4 class="mb-3">
33
</ul>
34
{{ end }}
35
<p class="mb-6">
36
- {{ .Summary | truncate 150 "…" }}
+ {{ $summary := .Summary }}
37
+ {{ $cleanedSummary := $summary | replaceRE "<h[1-6][^>]*>.*?</h[1-6]>" "" }}
38
+ {{ $truncatedSummary := $cleanedSummary | plainify | truncate 150 }}
39
+ {{ $truncatedSummary | safeHTML }}
40
</p>
41
<a class="btn btn-outline-primary btn-sm" href="{{ .RelPermalink }}">
42
{{ T "read_more" }}
0 commit comments