Skip to content

Best way to not have html in the exported markdown? #692

Answered by kaushalmodi
nickanderson asked this question in Q&A
Discussion options

You must be logged in to vote

ox-hugo relies on having HTML in the exported Markdown to match a lot of features that Org Mode has.

It's not possible to export HTML-free Markdown.

Our hugo build process strips html from the markdown files in order to prevent potentially malicious stuff.

To truly protect your site from malicious attacks, look into CSP (content security protection) headers.

I have this setting in the hugo config for all my sites for many years (and I have CSP enabled): https://ox-hugo.scripter.co/doc/goldmark/#enable-unsafe-html . That will prevent Hugo from stripping away the HTML.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@nickanderson
Comment options

Answer selected by nickanderson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants