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

Fixed html sidebars to supported version in Sphinx #1804

Merged
merged 6 commits into from
Aug 13, 2019

Conversation

AdaBehan
Copy link
Contributor

@AdaBehan AdaBehan commented Jul 23, 2019

Changed html_sidebars from single string to list of string as per
https://www.sphinx-doc.org/en/master/changes.html#id58

Closes #1565

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details

@pganssle
Copy link
Member

I have rebased this on #1802, since this is currently untested in the CI.

@pganssle
Copy link
Member

Are we sure this is working correctly? The sidebar on the netlify preview looks different from the sidebar on the current documentation.

The current documentation has "Next topic" and "This Page", both of which are missing in the netlify version.

@AdaBehan
Copy link
Contributor Author

@pganssle well spotted it does not look right. I will have a look.

@AdaBehan
Copy link
Contributor Author

@pganssle Little unsure what todo about the list method not being supported in older versions of Sphinx.

4:59:00 PM: Running Sphinx v1.8.5
4:59:00 PM: Configuration error:
4:59:00 PM: There is a syntax error in your configuration file: invalid syntax (conf.py, line 72)
4:59:01 PM: ERROR: InvocationError for command /opt/build/repo/.tox/docs/bin/sphinx-build -W -b html -d /opt/build/repo/.tox/docs/tmp/doctrees docs docs/build/html (exited with code 2)
4:59:01 PM: ___________________________________ summary ____________________________________
4:59:01 PM: ERROR:   docs: commands failed

I could do something like:

if Sphinx.__version__  > 2 : 
    html_sidebars = {'index': ['indexsidebar.html']}
else:
    html_sidebars = {'index': ['relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']}

Maybe i am miss reading the Sphenix documentation but it does not look like there is another way to declare the "value".
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars

@pganssle
Copy link
Member

@adamRogerson That doesn't seem right, Sphinx was raising deprecation warnings in version 1.8.5, so they must have had a migration target in mind.

Are you sure the list version is not supported? The PR seems to be succeeding now and the netlify build (which uses 1.8.5) is doing the right thing.

@AdaBehan
Copy link
Contributor Author

AdaBehan commented Aug 1, 2019

@pganssle I must have misread the error there. Is there anything else that needs to be done on this ?

@benoit-pierre benoit-pierre reopened this Aug 13, 2019
@benoit-pierre benoit-pierre merged commit 05f42a2 into pypa:master Aug 13, 2019
@AdaBehan AdaBehan deleted the sphinx_deprecated branch August 14, 2019 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

html_sidebars with dict deprecated in Sphinx
3 participants