mkdocs-img2fig-plugin icon indicating copy to clipboard operation
mkdocs-img2fig-plugin copied to clipboard

img2fig breaks relative links when use_directory_urls is set to True

Open timvink opened this issue 4 years ago • 0 comments

With the following directory structure:

docs/
   - folder/page.md
   - sys.png
mkdocs.yml 

And use_directory_urls: true in mkdocs.yml, the images break when enabling this plugin.

The src path is not correct, f.e. changing:

<img alt="The github logo" src="../../github-octocat.png">

To

<figure class="figure-image">
  <img src="../github-octocat.png" alt="The github logo">
  <figcaption>The github logo</figcaption>
</figure>

For a reproducable example (try turning img2fig off and on):

git clone [email protected]:timvink/mkdocs-print-site-plugin.git
cd mkdocs-print-site-plugin
mkdocs serve -f tests/fixtures/projects/relative_images/mkdocs_img2fig.yml

timvink avatar Dec 18 '20 11:12 timvink