Skip to content
Snippets Groups Projects
Commit 8249ccd7 authored by Martyn Welch's avatar Martyn Welch Committed by Emanuele Aina
Browse files

Tweak HTML rendering to allow HTML elements in Markdown

By default the Goldmark renderer used by Hugo won't render HTML
elements that are present in the markdown, even though this is allowed
in the CommonMark Spec that it claims to implement:

    https://spec.commonmark.org/0.29/#html-blocks



We can get this to work by turning on "unsafe" mode, which means:

    By default, Goldmark does not render raw HTMLs and potentially
    dangerous links. If you have lots of inline HTML and/or JavaScript,
    you may need to turn this on.

As we have such elements and we can guarantee what's being rendered,
turn this on.

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent af5a2a88
No related branches found
No related tags found
1 merge request!50Move designs.a.o to www.a.o
......@@ -84,3 +84,12 @@ languageCode = "en-us"
[mediaTypes]
[mediaTypes."html/pdf-in"]
suffixes = ["pdf-in"]
# By default Goldmark does not render raw HTMLs and potentially dangerous
# links. As we have HTML tables in places (that can't readily be implemented
# in pure Markdown due to large cells with complex content) and can be sure
# of the content being rendered, switch "unsafe" on to allow these HTML
# elements to be created.
[markup]
[markup.goldmark.renderer]
unsafe = true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment