sillsdev / docu-notion

Download Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.
MIT License
145 stars 26 forks source link

Feature: mermaid conversion #28

Open dionjwa opened 1 year ago

dionjwa commented 1 year ago

Notion has recently added pretty awesome integration with mermaid:

image

What is also super great that I used is that you can add click handlers in the mermaid definition that link directly to other notion documents, creating visual, clickable dependencies between documents.

I create these diagrams as "synced blocks" allowing me to embed the same diagram in the relevant notion documents.

What I would like, and can make an attempt to implement this myself, is:

  1. Process notion mermaid code blocks, extract the mermaid definition, and convert to markdown. This is actually super basic, it's just directly extracting the mermaid definition and pasting in a markdown mermaid block.

My question is, before I start: would is also be possible to implement the click handlers? The links are notion document URLs, and these would have to be converted to markdown links that works with docusaurus.

hatton commented 1 year ago

Docu-notion does convert notion URLs to ones that work with docusaurus, so there's reason to hope?

dionjwa commented 9 months ago

I published a plugin that exposes a plugin that does this:

https://www.npmjs.com/package/@metapages/docu-notion-plugins