alertbox/docsify-footer

Images relative to footer instead of relative to current page

applejag opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
If I reference an image then the image link is going to be relative to whichever page I'm viewing.

Example:

<!-- same behaviour from all three samples: -->
![company logo](_images/logo.svg)
![company logo](/_images/logo.svg)
![company logo](/_images/logo.svg ':ignore')
On page it resolves to
example.com/#/ example.com/_images/logo.svg
example.com/#/some-dir/some-other-page example.com/some-dir/_images/logo.svg

Describe the solution you'd like
Don't know if it's possible, but if when resolving the URLs for the images for the footer if those all were based off the location of the _footer.md file. So if the footer customly changed to be at _docsify/footer.md, then the relative image URL logo.svg on example.com would look for the image at example.com/_docsify/logo.svg, no matter which markdown page is currently being viewed by Docsify.

Describe alternatives you've considered
Using absolute link to where we've hosted it. I.e. instead of the above example just using:

![company logo](https://example.com/_images/logo.svg)

But that makes it more difficult to work with the files locally.

@jilleJr The plugin uses docsify underneath to render markdown. You can get a faster response there.
Nevertheless, I think this is a known issue in docsifyjs.

Possible duplicate of: