-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add a theme option for additional CSS files #358
Comments
Do you mean |
No, not the static path. I was thinking about a configuration option like
Which would then result in the file Whether this needs to be a list of stylesheets is questionable. Usually one is enough. The idea with |
I think you are looking for something like http://www.sphinx-doc.org/en/stable/templating.html?highlight=extrahead ? |
Closing this, we can re-open if this is an issue but I do not think there is an issue here. |
Sorry for the late reply, but I don't agree that the link given in the above comment is a good solution. From what I understand, this would still require me to create a new theme, extend The idea behind this request is that it would not be necessary to override the theme completely just to add a couple of custom CSS rules. At the current state, there is no way that I can see to add CSS files via the config (that is, without extending the theme). I've been trying the I'm fine with it by the way if you decide to refuse this feature request and expect users to override the theme. I just wanted to add some details, as it seems that in the above comments, we've been talking about two different things (one being the sphinx theme config, and the other being overriding the theme altogether). |
Try something like this in the conf.py file you can change the file paths to your liking:
|
This works. Thanks! I was just looking for this in the sphinx docs (the fact that a |
Have a look at http://www.sphinx-doc.org/en/stable/extdev/appapi.html? |
This is cool. The fact that you can write a setup function in conf.py is a bit hidden away in the core-events section. Thanks for this! 👍 |
I have just one simple class to add to the CSS. After looking through the source-code, I found no theme option to add a CSS file. Also extending the theme did not work for some reason. It kept complaining that no "theme.conf" file is found even though there was one. But that may be an issue with sphinx itself.
I have given up now and will leave the output as-is, but it does make parts of the documentation less readable than it could be.
Having a theme option to append additional CSS files to the output would be really nice.
The text was updated successfully, but these errors were encountered: