Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Enhancement: Images located in a separate resources folder can't be displayed #339

Open
bertysentry opened this issue Jan 29, 2018 · 2 comments

Comments

@bertysentry
Copy link

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.

@lierdakil
Copy link
Collaborator

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.

@bertysentry
Copy link
Author

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! :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants