diff options
Diffstat (limited to 'themes/spectral/layouts/partials/body_text.html')
| -rw-r--r-- | themes/spectral/layouts/partials/body_text.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/themes/spectral/layouts/partials/body_text.html b/themes/spectral/layouts/partials/body_text.html new file mode 100644 index 0000000..6ede9ba --- /dev/null +++ b/themes/spectral/layouts/partials/body_text.html @@ -0,0 +1,10 @@ +{{ if .md }} + {{ $md_body := .context.body | markdownify }} + {{ if not (in $md_body "<p>") }} + {{ printf "<p>%s</p>" $md_body | safeHTML }} + {{ else }} + {{ $md_body }} + {{ end }} +{{ else }} +<p>{{ .context.body | safeHTML }}</p> +{{ end }} |
