I am working with Sphinx and I want to set the html_static_path variable in the config.py file. The default was:
html_static_path = ['_static']
My project setup is:
docs/
build/
doctrees
html/
_static/
source/
conf.py
The sphinx documentation says that I need to set the path relative to this directory, i.e. relative path from conf.py. Thus, I tried:
html_static_path = ['..\build\html\source\_static']
AND I tried to set the absolute path. But I still get the warning:
WARNING: html_static_path entry 'build\html\source\_static' does not exist
Can you help me? Thank you!
The build directory is created after you build the docs, which is why you get that error. When you make your docs, Sphinx will copy the static directory from your source location as defined by html_static_path to the build location.
Create a new directory source/_static and place any static assets inside of it.
Change the value in conf.py to this:
html_static_path = ["_static"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With