mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 12:13:58 +00:00
feat(blox): support HTML & multiple paragraphs in Markdown blox
This commit is contained in:
1 parent
370dc623ab
commit
55b856df3a
1 file changed
+3
-2
@@ -6,7 +6,7 @@
|
||||
{{ $page := .wcPage }}
|
||||
{{ $block := .wcBlock }}
|
||||
{{ $title := $block.content.title | emojify | $page.RenderString }}
|
||||
{{ $text := $block.content.text | emojify | $page.RenderString }}
|
||||
{{ $text := $block.content.text | emojify | $page.RenderString | safeHTML }}
|
||||
|
||||
<div class="flex flex-col items-center max-w-prose mx-auto gap-3 justify-center">
|
||||
|
||||
@@ -14,5 +14,6 @@
|
||||
{{ $title }}
|
||||
</div>
|
||||
|
||||
{{ with $text }}<p class="prose prose-slate lg:prose-xl dark:prose-invert max-w-prose">{{ . }}</p>{{ end }}
|
||||
{{/* We use DIV rather than P to support `prose` class and multiple paragraphs */}}
|
||||
{{ with $text }}<div class="prose prose-slate lg:prose-xl dark:prose-invert max-w-prose">{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
Reference in new issue
Block a user