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

Using app.add_css_stylesheet() in conf.py #460

Closed
diego-plan9 opened this issue Oct 3, 2021 · 3 comments · Fixed by #465
Closed

Using app.add_css_stylesheet() in conf.py #460

diego-plan9 opened this issue Oct 3, 2021 · 3 comments · Fixed by #465

Comments

@diego-plan9
Copy link
Contributor

When attempting to build the documentation using latest sphinx (4.2.0) (related to an effort of packaging oauthenticator into Debian), an error is raised due to:

app.add_stylesheet('custom.css')

at conf.py.

It seems .add_stylesheet() has been technically deprecated since quite a while (1.8), although not really remove from sphinx until recently - while it might get reintroduced and supported until 6.0 (sphinx-doc/sphinx#9683), would it make sense to replace it with its .add_css_stylesheet() successor, for some future-proofing? Actually, I could not trace the referenced custom.css - not sure if an alternative would be to simply drop the line altogether.

@welcome
Copy link

welcome bot commented Oct 3, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@consideRatio
Copy link
Member

consideRatio commented Oct 3, 2021

Absolutely, sounds very reasonable! Let's transition to add_css_stylesheet and make us require sphinx >=2 if we don't already do.

Actually, I could not trace the referenced custom.css - not sure if an alternative would be to simply drop the line altogether.

OH! Nice catch! Removing it or commenting it out seems like a good idea to me - better than retaining it with a reference that doesn't exist.

@tk0miya
Copy link

tk0miya commented Oct 3, 2021

would it make sense to replace it with its .add_css_stylesheet() successor, for some future-proofing?

I think it's better to use the html_css_file configuration instead of the add_css_file() API (if you still need to install custom CSS).
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files

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 a pull request may close this issue.

3 participants