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

Conflicting interpretation of READTHEDOCS #543

Closed
eine opened this issue Jan 16, 2018 · 5 comments
Closed

Conflicting interpretation of READTHEDOCS #543

eine opened this issue Jan 16, 2018 · 5 comments

Comments

@eine
Copy link

eine commented Jan 16, 2018

In sphinx_rtd_theme/layout.html#L208-L210, _static/js/theme.js is included if not READTHEDOCS. At the same time, sphinx_rtd_theme/versions.html#L1-L36 is included if READTHEDOCS. As a result, the following settings in html_context produce a valid "versions box/menu" in the bottom of the sidebar, but it is not expandable due to the missing js script:

html_context = {
    'READTHEDOCS': True,
	'current_version': 'builders',
    'versions': [ ['builders', '../builders'], ['v0.35', '../v0.35'], ['v0.34', '../v0.34'] ],
	'downloads': [ ['PDF', '/builders.pdf'], ['HTML', '/builders.tgz'] ]
}

In order to fix it, each artifact needs to be edited so that <script type="text/javascript" src="/js/theme.js"></script> (or the corresponding path) is added.

I'd suggest using a different envvar/mechanism in order to know whether the project is to be hosted on readthedocs.org, so that the "versions box/menu" is usable no matter what the host is.

@Blendify
Copy link
Member

We can simply change this to like if VERSIONING or similar.
This relates to #438

@Blendify
Copy link
Member

Blendify commented Jan 16, 2018

@ericholscher @agjohnson why does rtd do this? Why not just leave it up to the theme? The CSS file too.

@ericholscher
Copy link
Member

Why does RTD do what?

@Blendify
Copy link
Member

Blendify commented Jan 16, 2018 via email

eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 20, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 21, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 21, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 21, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 27, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 27, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 29, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 29, 2018
This was referenced Feb 13, 2018
@agjohnson
Copy link
Collaborator

We do this because our extension points to hosted versions of these resources, but locally the files are still required. I think we're just going to remove the default version list from this theme anyways, as it is causing problems with how we want to be using the theme.

I'll chime in with our requirements on another issue.

eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Feb 27, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue May 25, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jun 17, 2018
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 2, 2019
eine pushed a commit to buildthedocs/sphinx.theme that referenced this issue Jan 4, 2020
* add Lato and Roboto fonts
* add custom_last option to footer
* add favicons
* add fa icons to nav_version
* remove versions menu, place content elsewhere
* add link to home
* show both view and edit buttons to GitHub
* move last_info from footer to header
* move show_sphinx from footer to versions
* move project home link from sidebar to breadcrumbs
* remove display_version theme option
* indent favicon links
* move content from subdir sphinx_rtd_theme to root
* remove gitignore
* add README.md
* justify text in paragraphs and list items (close #1)
* add end dot to footer
* add VERSIONING (readthedocs#543)
* edit analytics block
* rename rtd to btd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants