The treatment of static assets needs a rework as it has real limitations at the moment. In the current re-write of the extension I propose we adopt a new approach to asset management.
Sphinx make html: [Information Only]
The current sphinx html writer produces a _static folder with a collection of assets contained in a single folder. This isn't convenient for all notebook cases as it is difficult to find supportive static assets for individual notebooks. It works well for large websites.
notebooks: [sphinxcontrib-jupyter]
rather than implement different ways the static assets are collected for ipynb, jupyter-html etc. I propose we adopt a file/asset approach to the static folder. If an rst file document.rst contains a figure picture.png then the file would be copied to _static/document/picture.png. This allows a unique path without worrying about file collisions between documents. It also helps locate static assets for notebooks.
For slide and course notebook cases we can modify this to include the document folder in the directory the notebook is written so it would be easy to distribute the notebook and files.
The treatment of static assets needs a rework as it has real limitations at the moment. In the current re-write of the extension I propose we adopt a new approach to asset management.
Sphinx make
html
: [Information Only]The current sphinx
html
writer produces a_static
folder with a collection of assets contained in a single folder. This isn't convenient for all notebook cases as it is difficult to find supportive static assets for individual notebooks. It works well for large websites.notebooks
: [sphinxcontrib-jupyter]rather than implement different ways the
static
assets are collected foripynb
,jupyter-html
etc. I propose we adopt afile/asset
approach to the static folder. If anrst
filedocument.rst
contains a figurepicture.png
then the file would be copied to_static/document/picture.png
. This allows a unique path without worrying about file collisions between documents. It also helps locate static assets for notebooks.For
slide
andcourse
notebook cases we can modify this to include thedocument
folder in the directory the notebook is written so it would be easy to distribute the notebook and files.