Automatic upstream/downstream YAML plugin

One of the things I’ve been using in my YAML frontmatter is upstream/downstream which comes from the idea of parent-child relations in Notion databases.

So for example, you might have a hierarchy like the following examples:

  • Programming → Programming Languages → TypeScript MOC → TypeScript Functions
  • Evergreen note xxx → Literature Note xxx → Fleeting note xxx
  • Goal xxx → Project xxx → Milestone xxx → Task xxx
  • Folgezettel 1 → Folgezettel 1-1, Folgezettel 1-a

Programming Languages would have a upstream of “Programming” and a downstream of “TypeScript MOC”; Literature note would have a upstream of an evergreen note and a downstream of a fleeting note. The rest are quite self-explanatory.

The issue with that is that YAML is often something like this:

upstream: ["Evergreen note xxx", "Evergreen note yyy"]
downstream: ["Fleeting note xxx", "Fleeting note yyy"]
aliases: [x,y,z]
tags: [tag1,tag2,tag3]
# Literature Note xxx

Links are expressed as [“x”] syntax, not the conventional [[x]] which allows you to establish a link that can be seen in the local graph view, or even a linked mention.

What I’d love to be able to do is whenever I add a link to either upstream or downstream, it automatically updates in the link itself to establish a upstream-downstream relationship.

For example, if I update Literature note xxx by putting Evergreen note xxx in the upstream attribute, then Evergreen note xxx will automatically populate with Literature note xxx in the downstream attribute.

I think this would be really useful in establishing all sorts of parent-child relationships which can then be reflected in dataview/used by other plugins in future.

Just realised there is a way to do this… Breadcrumbs plugin. Do check it out if you guys are interested.