It would be nice to have support for generalised directory structures so projects can be fully configurable. Currently the extension requires _static to be included in the source directory and is copied to the target directory by default.
We should change this so the _static folder can be located anywhere and assets are pulled in as required. When visit_image is parsed then we can copy the individual file to the build folder and update the link in the resulting notebook.
While making this change we could arrange the files in the build folder by type?:
otherwise we can preserve the same folder structure
this is more in line with the latest HTML writer and only static assets that are used would be copied to support the built page. For reference the html writer adopts a flat _images directory for image files to support the site and ignores any other path specifications. If two files have the same name -- a second file is added with a number appended to the filename and that file is referenced in the html. so a resulting structure in html case is:
It would be nice to have support for generalised directory structures so projects can be fully configurable. Currently the extension requires
_static
to be included in the source directory and is copied to the target directory by default.We should change this so the
_static
folder can be located anywhere and assets are pulled in as required. Whenvisit_image
is parsed then we can copy the individual file to the build folder and update the link in the resulting notebook.While making this change we could arrange the files in the build folder by type?:
images
andfigures
->{ BUILDDIR }/_images
downloads
->{ BUILDDIR }/_downloads
otherwise we can preserve the same folder structure
this is more in line with the latest
HTML
writer and onlystatic
assets that are used would be copied to support the built page. For reference thehtml
writer adopts a flat_images
directory for image files to support the site and ignores any other path specifications. If two files have the same name -- a second file is added with a number appended to the filename and that file is referenced in thehtml
. so a resulting structure inhtml
case is:the above example is contained in the attached test repo (below)