Skip to content

js/open-in-new-tab.js not loaded when on GH Pages with a subfolderย #10

@ebouchut

Description

@ebouchut

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions