You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the export-block supports only HTML. It'd be great if this was extensible so additional backends could be provided and handled. For example, I'd like to be able to use an export block to generate graphs with MermaidJS. It'd be great if we could extend this with an object of other backends and then a function that would return the proper ast object.
The text was updated successfully, but these errors were encountered:
Hey. uniorg-rehype is specifically an org-to-html converter (rehype/hast is an AST representation of HTML), so I'm not sure what you mean by supporting more backends. There are multiple ways to plug-in more functionality like mermaidjs though.
First, it's possible to add more unified plugins that would transform AST before (or after) uniorg-rehype. So, for example one could add a plugin that transforms #+begin_src mermaid or #+begin_mermaid ("special block") blocks to a proper export-block (which would then get exported by uniorg-rehype).
Second, uniorg-rehype accepts a handlers option, which allows to override how certain blocks are exported. So you can override how export-block is handled
Currently the export-block supports only HTML. It'd be great if this was extensible so additional backends could be provided and handled. For example, I'd like to be able to use an export block to generate graphs with MermaidJS. It'd be great if we could extend this with an object of other backends and then a function that would return the proper ast object.
Do you export these mermaids with org-export?
If you just want your pages to convert mermaid code to diagrams. You should be able to embed the mermaid.js script on your page, and then run mermaid.initialize() which will transform all mermaid code to diagrams.
uniorg/packages/uniorg-rehype/src/org-to-hast.ts
Line 335 in 466fd42
Currently the export-block supports only HTML. It'd be great if this was extensible so additional backends could be provided and handled. For example, I'd like to be able to use an export block to generate graphs with MermaidJS. It'd be great if we could extend this with an object of other backends and then a function that would return the proper ast object.
The text was updated successfully, but these errors were encountered: