Obsidian and link support
There's an interesting open-source project called Obsidian that allows users to create a kind of personal wiki based on a simple directory of Markdown files.
To allow linking between different files, Obsidian uses a syntax that looks like [[foo]]
(for links within a document) and ![[foo]]
for links to other documents.
Even if it's not possible to extend Marked 2 to handle linking, it might be nice if the Marked 2 renderer could present Obsidian links in a slightly more attractive way (currently, they're simply rendered as literal text).
Obsidian does include its own preview renderer for Markdown, but Marked 2's rendering is more attractive, so sometimes it might be nice to be able to read Obsidian documents using Marked 2.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 21 Feb, 2021 01:11 PM
Hi Angus,
Marked does not function well as a wiki, but it's entirely possible to extend it to recognize the link syntax using custom preprocessors. It's unlikely I'll make the additional syntax part of the core installation, though.
nvUltra, my upcoming notes app, also recognizes Wiki links, as does nvALT before it. But they make sense in apps like that which can handle them internally. Marked would never know for sure what to do with them. Add an MD extension? Assume a rendered HTML file? Is the target relative to the document? What if we're in a streaming preview without base url? Too many inconsistencies between implementations to make any assumptions.
As I mentioned, though, a few lines in a custom preprocessor script could not only make them look better, but render them to link in just the way you expect them to. If I find time, I'll write one up, but if you have any scripting knowledge, it's just a simple regex replacement.
- Brett