summaryrefslogtreecommitdiff
path: root/USERS.md
diff options
context:
space:
mode:
authorSangeeth Sudheer <git@sangeeth.dev>2024-10-30 23:43:32 +0530
committerSangeeth Sudheer <git@sangeeth.dev>2024-10-31 03:33:47 +0530
commitbd698f9e62b0c15b877d38ad5df4a477a65350e9 (patch)
tree98d31689f7185f5ad26f3b1a9feb599e0feccef7 /USERS.md
parentd8f5706dc3be687d07930608c483a528d6ae2bad (diff)
Support relative paths in markdown images
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: ``` content └── posts ├── _index.md ├── hello.md ├── images │ └── test.png └── test.png ``` You can now include images in `hello.md` in the following ways: ``` ![](test.png) ![](images/test.png) ![](./test.png) ![](./images/test.png) ```
Diffstat (limited to 'USERS.md')
0 files changed, 0 insertions, 0 deletions