executablebooks / MyST-NB

Parse and execute ipynb files in Sphinx
https://myst-nb.readthedocs.io
BSD 3-Clause "New" or "Revised" License
210 stars 84 forks source link

More metdata controlled output formatting #249

Open chrisjsewell opened 4 years ago

chrisjsewell commented 4 years ago

Building on: https://myst-nb.readthedocs.io/en/latest/use/formatting_outputs.html#images

Basically, port my implementations in: https://ipypublish.readthedocs.io/en/latest/metadata_tags.html#cell-output-level

Also, make the top-level key configurable (in conf.py) and change the default from myst to render

cc @akhmerov

chrisjsewell commented 4 years ago

As per ipypublish, we should we also support output level metadata precedence, and possibly even project/notebook level metadata, i.e. when choosing what metadata to use, precedence would be:

output level > cell level > notebook level > project level

akhmerov commented 4 years ago

All good things. render seems to be a good default, inheritance likewise. I only had a brief look at the ipypublish metadata; some of it might benefit from reorganization. e.g. slideonly: true could become slides: ignore: true to correspond to the jupyter's output bundle and sphinx builders better.

chrisjsewell commented 4 years ago

Oh absolutely, we don't need to take it verbatim, but its useful as a guide for what I've found useful before