Closed runofthemillgeek closed 2 weeks ago
@tomfran was this accidentally closed when you force-pushed? 🤔
Probably, sorry for that. Can you re-fork and re-open this PR please? At least the repo size is now down to 2MB 😅
Huge reduction! :) I'll cherry-pick the commit and force-push, should be enough.
Hmm okay, maybe need to open another.
Adds code from Hugo's built-in render-image hook and modifies it slightly to support relative image paths in markdown files.
Previously, we'd have to spell the absolute path from root of the hugo site or make directories for each individual post which is what Hugo recommend. But this was very inefficient. This change allows us to use editors like Obsidian, VSCode and have them render the images correctly. It also supports Hugo's page bundles for rendering images as a result. Based on the order, I believe page bundles are given priority so that works out.
i.e, if you have the following tree:
You can now include images in
hello.md
in the following ways: