jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 64 forks source link

Support Wiki and Obsidian cross-reference syntax `[[ target | alternative title ]]` #1144

Open choldgraf opened 7 months ago

choldgraf commented 7 months ago

In the wiki and the Obsidian world, they use a bracket-style syntax for cross references within and between pages. These are roughly the links I'm talking about:

Here is documentation on Obsidian link syntax

This is very similar to the markdown-based link syntax we already use (structured like [Displayed name](link target#id)), so perhaps we can parse this Wiki-style link into the MyST document model in the same way.

Benefit to users

While the syntax provides redundant functionality with markdown style links, it would make it much easier to interoperate with Obsidian and Wiki-style documents. Given that MyST has a similar kind of use-case, this could be useful either as a two-way street (e.g. using Obsidian to author documents that you then build with MyST) or as a one-way street (e.g., making it easier to convert a Wiki document to a MyST document). These are both very popular and well-used systems so this could be a bridge into a fairly large community without adding too much extra complexity to the MyST document engine.

Additional references

agoose77 commented 7 months ago

On the one hand, I'm worried about having multiple ways to do things in MyST. On the other, I think this is a nice change. Having raised a concern, I do think that our current link-handling is scheme-based, which doesn't feel like custom syntax such that really this suggested change leaves us with only 1.5 ways to add links ;)

I wonder how we'd tie-in xrefs - should they still be autolinks with special schemes? Probably ...

fperez commented 6 months ago

As a recent Obsidian convert who thinks we should have closer integration with Obsidian-like workflows in the Jupyter ecosystem, I'd love some of this. I haven't yet thought through the implications enough to advocate about specifics, but I'm here to brainstorm together, as I generally would love to be able to have Jupyter and Obsidian "coexist" more closely...

The fact that Jupyter lets you work off regular files à la Obsidian and shares some of its philosophy makes them in my mind natural companions, so I'm happy helping explore the possibilities... I suspect @colliand might be interested in this discussion too...

gsuarezr commented 1 month ago

I think this would be great! A major reason that I'm not using myst more often is that I'm lacking an ecosystem to keep my notes, link them, render todos and so on. For that I use obsidian, it would be great if myst could be seamlessly integrated into notetaking apps (or alternately to have a myst notetaking app ). I know curvenote is out there, but it would be great to have something that is local

fperez commented 1 month ago

I'm in the same boat @gsuarezr - using Obsidian for everything else, and feeling the disconnect between these two ecosystems (Jupyter/Obsidian). So close, yet so far :)