Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

img2fig breaks relative links when use_directory_urls is set to True #4

Open
timvink opened this issue Dec 18, 2020 · 0 comments
Open

Comments

@timvink
Copy link
Contributor

timvink commented Dec 18, 2020

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant