Overview
This page documents getting Obsidian-authored markdown (raw HTML and image embeds) to render correctly under Hugo.
Prerequisites
Raw HTML is Stripped by Default
Copying an Obsidian post’s markdown straight into Hugo’s content folder mostly worked, but not everything rendered:
See raw HTML/image not rendering for the first paragraph of a migrated post rendering in Hugo — the superscript citation marker and the embedded image both fail to appear.
Raw HTML was written for the superscript citation markers (<sup>[1]</sup>), and Hugo’s default Markdown renderer (Goldmark) strips raw HTML unless told otherwise — a sane default, since it prevents injected HTML from being rendered unexpectedly. Since all of the content here is self-authored, raw HTML was re-enabled in hugo.toml:
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = trueSetting unsafe = true disables Goldmark’s raw-HTML sanitization for the whole site — this was accepted as an intentional tradeoff, since every markdown file on the site was written by hand, with no untrusted or third-party content ever passing through the renderer.
See superscript rendering fixed for superscript citation markers rendering correctly after enabling unsafe = true.
Images: Obsidian Embeds vs. Hugo/Markdown Links
Obsidian’s image embed syntax (![[Image Name.png]]) is not standard Markdown. Once posts were reorganized as leaf bundles, the image just needed converting to a standard Markdown image link: .
That alone did not work:
See image link not loading for a converted image link still failing to load — the raw markdown syntax shows up as literal text instead of an image.
The cause was spaces in the filename breaking the link. Neither dashes, underscores, nor escaping the spaces with backslashes or quotes fixed it — the fix that worked was to percent-encode spaces as %20:
See image rendering fixed for the same image rendering correctly once spaces in the filename were replaced with %20.
This  conversion was automated in the publish script for every post.
Next: Pt 3, Theme-selection.