My understanding is that DEVONthink has support for wiki-links in the form: ‘[[DocumentNameOrAlias]]
’, with associated support for automatically creating new documents when clicking on <DocumentNameOrAlias>
when in Markdown edit mode.
Additionally, DEVONthink supports the (more verbose) Markdown syntax for links: ‘[Text](DocumentName)
’. While ‘<DocumentName>
’ can include the file extension (e.g. “.md”), this is optional. However, there doesn’t seem to be support for document aliases when employing this syntax. This is not entirely surprising given that these are generic Markdown links to external documents, that can be used for all kinds of documents (including Web URLs), and they can also employ absolute or relative paths. However, it would be nice to have the alias concept supported in the Markdown links in DEVONthink.
1. Are there any plans for supporting aliases in Markdown links?
The standard Markdown links also support referring to bookmarks/anchors within documents, in the form: ‘[Text](DocumentName#Bookmark)
’. DEVONthink appears to have support for this, as well (but, there’s a caveat – see below).
I’ve noticed that DEVONthink automatically creates bookmarks/anchors for headings by converting the heading text to lower case and discarding all whitespaces (for example, the automatically generated bookmark for “Heading or Title” is “headingortitle”). While this is consistent with Marked 2, other Markdown editors/processors replace spaces with dashes – which is also the approach taken by GitHub.
2. Would it be possible to provide an option in DEVONthink (e.g under Preferences → Files → Markdown) to allow users to choose the approach taken for generating heading IDs?
The MultiMarkdown syntax has provision for specifying a custom heading ID (i.e. bookmark), by adding the following immediately after the heading (on the same line): ‘{#custom-heading-id)
’, where ‘<custom-heading-id>
’ can be any text that complies with the corresponding HTML requirements. Many Markdown editors have support for custom heading IDs, as does Marked 2. Unfortunately, the Markdown editor in DEVONthink does not seem to have support for custom heading IDs.
3. Are there any plans for supporting custom heading IDs?
While we can use the automatically created bookmarks for headings in Markdown links in DEVONthink, they do not appear to work in wiki-links – i.e. this doesn’t work: ‘[[DocumentNameOrAlias#Bookmark]]
’. This syntax is supported in a wide range of Markdown editors that have wiki support.
I should add that, just like Markdown links can refer to bookmarks located in the current document without having to specify the document name (i.e. ‘[Text](#Bookmark)
’), other Markdown editors that have wiki support employ the following syntax for wiki-links to bookmarks/headings in the current document: ‘[[#Bookmark]]
’.
4. Are there any plans to extend the wiki-links syntax to provide support for bookmarks?
Perhaps I should have split this in two separate posts – one for wiki-links and one for custom heading IDs. However, the topics are very closely related and I would be thrilled to see these enhancements implemented in DEVONthink in the near future.