markdown-preview-plus
markdown-preview-plus copied to clipboard
Enhancement: Images located in a separate `resources` folder can't be displayed
In a typical Maven Doxia project, you'll have the below folder structure:
- ./src/main/site/markdown/*.md
- ./src/main/site/resources/images/*.png (and *.jpg, etc.)
With the mvn site
command, Maven converts *.md
files to *.html
files and merge them with the content of the resources
folder. Logically, the *.md
files refer to the images as being in the ./images
folder (and not ../../resources/images
) because that's where the images are... relatively to the HTML files.
When editing *.md files in Atom, markdown-preview-plus fails to render the images, because it looks for them in the ./images
folder (which is 100% logical and expected).
For Maven projects, it would be nice to be able to configure markdown-preview-plus to look into a another directory for external resources, like images.
This seems like it'll be very tricky to do... While possible, it's not something I'd be thrilled about implementing to be perfectly honest.
Consider symlinking /resources/images
to /images
and adding that to gitignore
or equivalent? At least that's more or less how I tend to handle similar issues.
I agree this would be tricky (as the function determining the src
property of the <img>
tag is already complicated with many different cases.
I'll look into the symlink workaround.
Thank you! :-)