Issue
How can I add a custom CSS file? The following conf.py
does not work:
html_static_path = ['_static']
html_theme = 'default'
html_theme_options = {
'cssfiles': ['_static/style.css']
}
Result:
$ make html
Running Sphinx v1.2.2
loading pickled environment... not yet created
building [html]: targets for 2 source files that are out of date
updating environment: 2 added, 0 changed, 0 removed
reading sources... [ 50%] help
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents...
Theme error:
unsupported theme option 'cssfiles' given
Solution
A simpler way is to add this to your conf.py
:
def setup(app):
app.add_css_file('css/custom.css') # may also be an URL
Then put the file into the _static/css/
folder.
Answered By - Gringo Suave
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.