How can I create/use links to local Markdown files in Marked 3

Viewed 13

Can someone provide an example of how they create links to loacal Markdown files that work with Marked 3?

Also: are the links clickable/followable in the same Marked preview window?

I have tried this before while setting up a Zettelkasten system of Markdown files linked using relative paths (for portability & cross-platform compatibility), but I could not figure out how to make it work.

1 Answers

You can create links using standard Markdown syntax.

If your file is in the same directory, just use the filename:

[My file](my-file.md)

You can also use a relative path like [My file](subdir/my-file.md) or an absolute path like [My file](~/Desktop/my-file.md).

When you click it, you'll be offered a window to open it in Finder, in a new window, or in the current window. If you open in the current window, you can use the History menu at the top to navigate forward and backward when following links.

You can also use [[WikiLinks]]. This requires that files are in the same directory, but [[MyFile]] will link to a file named my-file.md or My File.md or MyFile.md. If you include the extension, it will look for exact matches.

Thank you so much for taking the time to answer my question. I was able to get this working using your examples (and I figured out what I was doing wrong!). This is a fantastic improvement in the way I will manage the Markdown files in my Zettelkasten going forward.

Again, thank you kindly for taking the time to answer my question—and promptly! It means so much to me and makes this crazy world seem like a little nicer place. :0)

Out of curiosity, how were you doing it before? Is there another way I should make Marked capable of handling?