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

sphinx/themes/basic/layout: Set url_root properly on index, don't use '#' #8524

Merged

Commits on Dec 13, 2020

  1. sphinx/themes/basic/layout: Set url_root properly on index, don't use…

    … '#'
    
    - url_root is set to `#` on the index page, which layout.html tries to
      change back to `''` (the empty string).
    - But, this updated url_root wasn't used in the actual location, as an
      argument to `documentation_options.js`.
    - Thus, clever enough templates, which tried to use
      `$DOCUMENTATION_OPTIONS.URL_ROOT` inside javascript would fail.
      This was manifested as broken links, which led to this issue:
      executablebooks/sphinx-copybutton#110
    - I have eventually traced that back to sphinx itself, and found that
      layout.html tried to fix the problem, but the fixed value wasn't
      used.
    - This fix works in my basic test, but I will continue with more tests.
    - Review:
      - someone more clever should examine this and make sure it makes
        sense
      - This does not have tests.  Should it?
    rkdarst committed Dec 13, 2020
    Configuration menu
    Copy the full SHA
    21aecb1 View commit details
    Browse the repository at this point in the history