mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Add a feature for including content only in specific export types

Open fwkoch opened this issue 9 months ago • 1 comments

Building multiple export types from the same source would be improved if there was an option to include some content in only one export type. For example, if I want a video for a web build and an image for a pdf build, I could do something like:

:::{only:web}
![](./my-video.mp4)
:::

:::{only:pdf}
![](./my-image.jpg)
:::

One example of where this could be used is https://github.com/jupyter-book/mystmd/pull/1744


Regarding implementation, this could be a directive, like my example above, or it could be an option on existing directives. It could also come in as a class, following this proposal: https://github.com/jupyter-book/myst-enhancement-proposals/pull/28

fwkoch avatar Feb 03 '25 17:02 fwkoch