MyST-NB icon indicating copy to clipboard operation
MyST-NB copied to clipboard

How to include glue artifacts in notebooks that aren’t built in the book

Open choldgraf opened this issue 5 years ago • 4 comments

Another use case that might be worth documenting, is that now you could have a notebook(s) that doesn't actually show up in the documentation (you signify this to sphinx by adding "orphan: True" in the notebook metadata, see file-wide-metadata), then you can have a separate markdown file that uses these roles/directives to show selected figures/data from one or more notebooks.

I've talked about this use case before; when you want to use the notebook(s) as a "log" of your data analysis, then have a separate document which is the final "publishable" output.

originally from @chrisjsewell in #77

choldgraf avatar Mar 15 '20 18:03 choldgraf

I think another option would be to allow for a config variable like “glue_notebooks” that could point to a folder of notebooks and load then all into the glue cache.

choldgraf avatar Mar 15 '20 18:03 choldgraf

I think another option would be to allow for a config variable like “glue_notebooks” that could point to a folder of notebooks and load then all into the glue cache.

Yes but the advantage of having these notebooks within the sphinx source folder, is that they will be integrated in the jupyter-cache execution (#55).

We could certainly still add it as an alternative, but with the caveat, that it wouldn't be guaranteed that the outputs are "up-to-date"

chrisjsewell avatar Mar 15 '20 18:03 chrisjsewell

Makes sense - I'm also trying to think in terms of the CLI as well. E.g. with a global TOC how would this be accomplished? (I suppose that notebook-level metadata like :orphan: could still work in this case)

choldgraf avatar Mar 15 '20 18:03 choldgraf

I’ll leave that for you to figure out 😉

chrisjsewell avatar Mar 15 '20 19:03 chrisjsewell