I’m trying to include static documentation generated with Sphinx in a small intranet site. To keep things simple the development server was good enough until now.
Now the nested subpages of the docs look for the resources like css and js in “subdir/subdir/_static/” instead of just “_static” when served by the development server resulting in raw html not styled pages. Everything is fine when opening in browser from the filesystem.
This is the part of url.py that I use:
SPHINX_DOCS = Path.home() / “Projects/sphinx-project/build/html/”
urlpatterns = [
path(
“docs/path:path/”,
serve,
{“document_root”: SPHINX_DOCS},
),
path(
“docs/”,
serve,
{
“path”: “index.html”,
“document_root”: SPHINX_DOCS,
},
),
]
Please can you point me to the solution. Thank you