mkdocs-open-in-new-tab
mkdocs-open-in-new-tab copied to clipboard
`js/open-in-new-tab.js` not loaded when on GH Pages with a subfolder
Description of the Issue
The plugin injects js/open-in-new-tab.js to the extra-javascript: section here
✅ This works fine locally: when using mkdocs serve where I can see the up-right arrow:
http://127.0.0.1:8000/
❌ However, this does not work, i.e. I cannot see the up-right arrow:
when deployed to my own GitHub Pages with mkdocs gh-deploy --force
https://ericbouchut.com/trio-docs/
Cause
The /js/open-in-new-tab.js file cannot be loaded (Error 404) because it is in /trio-docs/js/open-in-new-tab.js.
The items in extra_javascript have changed since Mkdocs version 1.5. This could be a clue.
Fix?
I tried to fix things in the plugin code (PR is underway). The fix now works fine in both cases.
I need your guidance and a double pair of eyes.