When creating Mermaid diagrams with internal links that have long names that I do not want to shorten in the vault, it would be nice to make use of these long links in the diagrams but have them display as shorter versions.
If aliases and/or Custom Link Previews worked in the diagram, this would not be an issue.
Current workaround (optional)
In order to keep the longer note names in the vault but allow for having the shorter working note name internal links in Mermaid diagrams, I simply change the note name to the shorter version and set aliases for the longer version that I want to display in my vault. It is not ideal when retrofitting but it works pretty well. I can use the alias pipe link version with a mass search and replace so that all the long links that get shortened can be switched to the longer alias version.
Even though we can make each node in Mermaid Diagrams an internal link to our note since 0.9.21, we could only use the name of our notes directly as the name of the node in Mermaid. However, since I adopted the Zettelkestan systems in my vault and named each note with the timestamp of its creation (such as “2021010711487”), it makes no sense unless I can use the alias of my notes when I create internal links in Mermaid.
In addition, as I was organizing my notes, I found it is gonna be a very useful feature if we could link the text on an edge in Mermaid to a note in the vault too. For example, in a graph representing how to make carboxylic acids from other functional groups, each nodes can represent a distinct functional group and link to its description, while each text on the edge can represent a method and link to its specific procedure and protocols.
Use alias when creating internal links in Mermaid
Create internal links on both Mermaid nodes and texts on edges.
I currently didn’t find any workaround to my problem.