summaryrefslogtreecommitdiff
path: root/layouts/_default/_markup/render-image.html
AgeCommit message (Collapse)Author
2024-10-31Support relative paths in markdown imagesSangeeth Sudheer
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) ```
2024-05-23Image tags for sizingFrancesco
2024-05-21MinorFrancesco
2024-04-24Img lazy loadingFrancesco
2024-04-22Theme UpdateFrancesco