Hacker News new | ask | show | jobs
by wcrichton 1506 days ago
I originally tried using MDX. But in my experience, JSX syntax is better suited for writing websites than writing documents. The <Tag></Tag> syntax is more verbose than @Tag{}. I ended up having to do lots of raw string embedding too, like <Component>{r`content...`}</Component> which is even worse. Basically you either had a really concise syntax for special Markdown-supported operations, or you had a really annoying syntax for non-special operations. Nota instead provides a uniform somewhat-nice syntax for both.

Additionally, I found the composition semantics between Markdown and JSX somewhat confusing. Random whitespace and newlines would sometimes have a very significant effect on the resulting document. It wasn't really clear when you would be in Markdown mode vs. JSX mode.

FWIW the Nota React components (e.g. @Definition and @Ref) could be used with MDX. The Nota syntax and Nota runtime are separate.