Skip to content

Figure out a way for Sphinx to deal with mime bundles #1

@choldgraf

Description

@choldgraf

Something that we have run into in implementing an IPYNB parser, as well as in thinking through an execution/cacheing step, is how to deal with the outputs of running Jupyter cells. AKA, how to handle mime bundles.

The way that jupyter-sphinx does this is to hard-code rules that parse the bundle and convert those directly to docutils objects at parse time. This isn't ideal, because this throws away information about the bundle before the rendering step, which is when you'd want that extra "mime-bundle-like" information.

So we should figure out a way to do something like:

  • Given the output of a Jupyter cell, find a way to either represent this in a docutils node or to represent a "pointer" in docutils that can be used to fetch the outputs later
  • Instructions for how, at the builder (transform?) step, this mimebundle should be grabbed and then rendered in an opinionated fashion (e.g. HTML renderers would pull JS/HTML if it's in an output, while PDF renderers would just pull static representations of the outputs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions