obsidian-enhancing-export
obsidian-enhancing-export copied to clipboard
Markdown-Hugo: Option to put images in the same directory as exported file
Hi. Currently, when running export to markdown-hugo, the end result for me looks like this:
➜ tree
.
├── scratchpad
│ └── 5802d43f298e15b95cbc5caf2a9a2116c2660b59.png
└── scratchpad.md
scratchpad.md content:
<figure>
<span class="image placeholder"
data-original-image-src="../scratchpad/5802d43f298e15b95cbc5caf2a9a2116c2660b59.png"
data-original-image-title="wikilink">histomf.png</span>
<figcaption>histomf.png</figcaption>
</figure>
Here is my command setup:
-f ${fromFormat} --resource-path="${currentDir}" --resource-path="${vaultDir}/${attachmentFolderPath}" --lua-filter="${luaDir}/markdown+hugo.lua" --lua-filter admonition.lua -s -o "${outputPath}" -t commonmark_x-attributes
- I'm not sure it's correct behavior to go up
../scratchpad
. I'd expect./scratchpad
- In my hugo blog all images are stored in the same directory as the markdown file. So the expected result is:
➜ tree
.
├── 5802d43f298e15b95cbc5caf2a9a2116c2660b59.png
└── scratchpad.md
scratchpad.md content:
<figure>
<span class="image placeholder"
data-original-image-src="./5802d43f298e15b95cbc5caf2a9a2116c2660b59.png"
data-original-image-title="wikilink">histomf.png</span>
<figcaption>histomf.png</figcaption>
</figure>
Is it possible to achieve this with some kind of export options or it needs to be implemented as an option in the plugin? If the latter, I'm happy to work on PR, my guess is that I need to change something in markdown.lua
and add setting somewhere.