Replies: 1 comment 5 replies
-
|
Hi @tombreit — good question. I should doc this up... 🤔 In general, I think you do want to add the If you add an image to a doc Sphinx will put the file in the Make sense? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Carlton Gibson,
Thank's a lot for this great idea and implementation - I just started integrating this thing in an existing project. I managed to render the sphinx content with my own template and have it served by Django.
But I can't figure out how to reference static assets from my sphinx generated
/docs/_build/json/_staticdirectory.To - for example - "recreate" the (javascript-based) search functionality from the html builder, I need to reference/link some files from this directory in my custom (DTL) template - but how?
As a workaround, I extended the
STATICFILES_DIRSto include this directory...and then use the standard
statictemplate tag:# templates/sphinx_view/base.html <script src="{% static '_static/searchtools.js' %}"></script>But that doesn't feel right (too tight coupling of the django project and the docs, "pollution" of the staticfiles directory after running
collectstaticetc.).Theming is not part of django-sphinx-view, and I'm happy bringing my own CSS and whatever for this "documentation site/view", but how to use the already existing files the json builder produces?
Beta Was this translation helpful? Give feedback.
All reactions