mystmd icon indicating copy to clipboard operation
mystmd copied to clipboard

Define a plugin / extension mechanism for renderers

Open choldgraf opened this issue 9 months ago • 0 comments
trafficstars

Authors commonly want to support more complex, different, or custom renderer outputs than what MySTMD supports out of the box. For example, if you wanted to support more specific Latex outputs than the AST knows how to handle with its default nodes. Currently, if we want to extend the outputs that a renderer can understand and create, we need to modify the core MyST library. This isn't scalable and would lead to a lot of code bloat over time, as well as disagreement because there will always be more than one way of doing things.

We should provide a mechanism by which authors / developers can modify the behavior renderers. For example:

  • Understanding how to convert custom nodes into renderer outputs.
  • Understanding how to over-ride the output for a given node.

These would allow users to control the AST -> output transformation with plugins, which would greatly expand the flexibility of MyST without requiring a contribution to our codebase each time.

choldgraf avatar Jan 22 '25 19:01 choldgraf