Backlinks, Roam & Obsidian

Hi Maxence,

Thanks for letting me know your thoughts.
I understand the wiki-style linking would be useful for you and some people.
But Inkdrop is meant to be a Markdown note-taking app which should not break the compatibility with CommonMark in the first place.
Note-taking is like a private blog, but it looks like you want something like a private wiki.
The difference is completely based on a personal preference as we got a lot of similar apps out there.
If you really want it in Inkdrop, you can make a plugin for it, which does:

  1. extend Markdown syntax like math plugin
  2. search with note title
  3. create a note if not existing, or open a note

If I find it’s necessary for me, I’ll be happy to consider supporting it. But, to be honest, not necessary at the moment.

2 Likes

I am too interested in adding Roam-like functionality to inkdrop but I totally understand your explanation why this is not feasible for you. I really like the idea of adding plugins to Inkdrop to extend it with Roam features and whoever needs it can install it and use it. I have the following questions:

  • Is it possible to create a customized sidebar on the left-hand side that would allow displaying something similar to Roam sidebar?
  • Is it possible to use plugins in the mobile app?
  • Is it possible to create a plugin that offers shortcuts if I press a predefined key? like I am entering the / and it offers me all the shortcuts that Roam does?

Thanks for your help in advance :slight_smile:

Krisztian

Hi @anon82042760,

Great to hear that you are interested in creating a plugin for this.

Is it possible to create a customized sidebar on the left-hand side that would allow displaying something similar to Roam sidebar?

Yes, you can add custom panes:

Is it possible to use plugins in the mobile app?

Please read the documentation here:

Is it possible to create a plugin that offers shortcuts if I press a predefined key? like I am entering the / and it offers me all the shortcuts that Roam does?

Please read the Keymaps section in the plugin dev tutorial here:

I am working on a plugin for Wiki style links, but having a weird issue with the parser.

Here is the text I have:

[[Welcome]]


[[Foo]]


[[barzzz]]

[[foo]]





[[foo]]
[[foo]]



[[bar]]

[[laett]]

The first linkReference is picked up correctly, but it gets weird with the second one:

How do I get it to parse the whole document correctly. I am guessing the existing link or linkReference parsing is interfering in some way. Here is my plugin so far (which was inspired by inkdrop-math):

Hi @Ryan_McQuen,

Oh great! I would be happy to help you.
Maybe you can use remark-wiki-link instead of implementing it yourself.

Note that I’m planning to migrate the current markdown parser from remark to micromark in the near future.
Micromark is the new version of remark built by the same developer, which has a better extensibility.
Looks like remark-wiki-link already supports micromark in v1.x, but you have to use v0.x at the moment.

1 Like

Great! I will try it out. I don’t mind implementing against remark and then upgrading with Inkdrop!

@craftzdog, what version of Remark does Inkdrop currently use?

Here:

    "unified": "^9.2.0",
    "remark-parse": "^8.0.3",
    "remark-rehype": "^7.0.0",
    "rehype-raw": "^4.0.2",
    "rehype-react": "^6.0.0",
1 Like

@craftzdog, I am making more progress. For some reason though, the onClick property gets removed from the node. Any ideas there?

Hi Ryan,
Good to hear you make more progress.
That’s because Inkdrop renders it in React as you can see it uses rehype-react.
You have to override "a" tag behavior.
Please read the documentation here:

An example plugin toc:

1 Like

@anon47729901
@anon80522486
@anon82042760

My wiki_links plugin is live!

https://my.inkdrop.app/plugins/wiki_links

2 Likes

Great work, Ryan!

1 Like

Great work! I installed the plugin and tried to create the links by just simply typing [[MyLink]] but when I am clicking on it nothing happens. What am I doing wrong here?

Are you clicking it in preview mode?

Of course, not. :frowning: I tried with preview and it works as expected. Thank you. This is a great plugin.
I am not sure how hard to implement this, but it would be super nice if the created note would include all the documents that are linking to the current document. I think they call it reverse links in Roam.

Or this should be a different plugin?

1 Like

I am glad you like it!

That’d be expensive and pretty tricky (you’re scanning content of all notes, with a lot of notes, that might get pretty gnarly). It is not impossible though, but beyond that you would need somewhere to store that metadata on a note and I’m not sure if Inkdrop currently has arbitrary fields where we could put that.

My current priorities on the plugin are:

  • Figuring out if I can do anything for mobile (the current plugin uses db commands which do not work on mobile).
  • Adding autocomplete after the user types [[ to bring up a list of notes and then being able to tab complete note titles. @ebigram offered to help here, and he’s already done a great job with autocomplete on his emoji plugin.

After those, I’m not sure how much I would add to this specific plugin. But there could be other plugins used in conjunction with this that would do the reverse linking thing.

I just noticed some bugs with standard links. I did a bunch of cleanup and also switched to using span tags (instead of anchors). This fixed another bug where Inkdrop’s own link handling would cause an error because I was overriding behavior. They don’t need to be anchors anyway …

Moral of the story, I would recommend upgrading. :slight_smile:

Autocomplete has landed!

5 Likes

I still wish this was implemented natively, being able to do wikilinks in the editor mode and auto update when the title updates kind of like Obsidian would be really helpful for my workflow.

No, I’m not planning to support it natively. I’m focusing on improving the core features.