YAML Fields for Link Attributes

It would be wonderful to be able to add attributes/context details to links - be it Parent/Child/Sibling/Jump relations (borrowing TheBrain’s terminology), Compatible/Incompatible idea, Precursor, Conclusion, or whatever else you might want to add. Not only could these attributes be used for styling of the links (different colors, dashes, weights, opacities for different attributes), but they could also be used to filter the graph as well.

Here’s an example from TheBrain where there’s probably 100 links shown and it is completely comprehensible on account of Parent/Child/Sibling relations.

There has been a good discussion on this matter, with lots of links and reference material, with regards to VS Code Foam. The thinking has evolved to store the attribute data in YAML fields, which would be especially important with regards to “portability”.

Attributes could be applied during text entry with a autocomplete pop-up, with this example from my TickTick task manager being an example.

Surely this is something for further down the road, but I’d really love if people could add their thoughts on how to implement something like this as it has potential to be an extremely powerful tool.

7 Likes

+1. I think this could make the Graph view a lot more readable, usable and relevant.

Storing typed links in YAML front-matter is one of options discussed in more general request about typed/labeled/semantic links: Add support for link types
Querying based on link types is possible in Neo4j Graph View Plugin but now it recognizes only one syntax which is different from one requested here.

I am very interested by setting links attributes. I saw many solutions suggest to add these attributes in the Yaml zone.
But I prefer to add these attributes to the link like we do when set width of a picture link.
For ex[[the parent note| #parent]].
The # can be replaced by any free symbol
This is adding attributes “TO the link and not to the end or begin note

The YAML can’t be a replacement for link attributes, because link attributes allows you to have different details on different relations, even though they point to the same note. As mentionned in another thread :

Those kind of use cases are mentionned in a lot of different topics now and can’t be constructed any other way : the syntax must support it, the search must support it, the graph must support it, it’s a concept that’s totally missing at the moment and I think is the one that best embodies “link as first citizen” concept while at the moment links are just hyperlinks like you would find on the internet… Worse actually since you can in HTML use attributes on your links.

1 Like