Expand the plugin surface by using MDX

Hi there,

First of all, awesome work! Obsidian looks and feels great :slight_smile:

I was first attracted to this project because I thought that using markdown documents was a brilliant idea. I already had a lot of notes in markdown so I didn’t have to migrate data to start getting value out of Obsidian. I love knowing that those are my notes and that because they are just markdown files they will be useful beyond the future of Obsidian.

That being said, I’m a bit concerned about the limitations of markdown. I see that Roam releases new “components” such as range sliders, but in order to extend obsidian with such features it would need to deviate from markdown. I see some extensions such as using marmaid by using ``` blocks, but I’m not sure that’s the best API for adding capabilities to markdown.

I’m writing this post to propose https://mdxjs.com, a superset of markdown that allows to embed JSX. Since it’s a superset (imagine what Typescript is to Javascript) it means that anyone that comes to Obsidian with their markdown notes will have a good experience.

This proposal is two-fold: On one hand Obsidian could expose the primitive components (https://mdxjs.com/table-of-components) which would allow for themes to go beyond CSS personalization. On the other hand, by having JSX, users could author components (such as the range slider) to extend markdown capabilities.

Thoughts?

6 Likes

I’ve wired up an Obsidian vault to a static site generator with a MDX Renderer and let me tell you it’s incredible what you can do. Basically Wordpress-style shortcodes that = React components.

Agree with the author that there is potential in BOTH importing a default components library via MDX and also allowing each user to author their own stuff.

1 Like