Add support for link types

You can in fact create a “supertag”-like structure in Obsidian by using the “Metadata-Menu” plugin. There is even a Video on youtube where it is explained, how … LOOK!

1 Like

Also waiting for support of link types. :slight_smile:

3 Likes

+1 for link types!

1 Like

Would be a great feature. especially if one can filter the graph view based on link types.

To push it further, the syntax could be something like [[Berlin]]{type: capital}, which would allow to attach any metadata to the link, not just a type.

4 Likes

As someone who utilizes the graph view a lot for visualising the relationships between my notes, I would absolutely love this!

Even just something simple like being able to specify different coloured lines for different types of links would be so good since most of my notes resemble different ‘ideas’ and the links are how they are related.

I would probably utilize it by doing like the default colour for positive relationships (“these two ideas are related/depend on each other some way”), yellow for comparisons (“this is similar to this idea”), and red for negative relationships (“this idea is the opposite of this other idea”)

7 Likes

I would LOVE this feature. Has anyone developed it as a community plugin?

+1 for link types. I really need this functionality.

Another idea with link types is to additionally have link weights, where stronger links (e.g. 1.0) get a multiplier to their link force on the graph view to make them appear closer together, while weaker links (e.g. 0.2) might have a negative multiplier.

The idea here is you could differentiate something that is extremely closely related vs something more tangential by just looking at the graph. This way, you could make “clusters” of closely-related information and have external links to other clusters. I would be really excited to see something like this.

3 Likes

I we are to add “weights”, i would prefer to generalize the idea that links between notes can have attributes/properties (like in all graph databases). This makes it easy for example to link a project and a person note with a role name, collaboration dates etc. That would be an important step toward the “link as first class citizen” paradigm

3 Likes

I like the concept of assigning weights, the direct method would force me to think and describe the weight (subjective). Indirect pulls from somewhere else and involves a “third party” weighting.

For some contexts, a simple argument type is perfect (contradicts, supports, expands on, etc).

But for more complex relationships and topics, the type varies from my subjective weight to more semantic weighting based on the words, phrases, concepts shared between the two notes.

Can you folks elaborate more about assigning a “weight” from your perspective.

Boiling this conversation down into a design for development will be a challenge :slight_smile:

At a basic level for most users and uses a simple argument link type is sufficient but for more complex analysis there would have to be a whole collection of methods and related meta data; especially if notes are atomic.

1 Like

Hmm, the simple argument is also a really good idea, though I think not all of the links will always be used and some people might want their own link types.

I think the best solution might be to have templates. Where you could have words that are associated with each weighting, which also lets users create their own link types and/or adjust the attributes of the other link types.

Additionally, perhaps another point of discussion would be whether to make the links:

  • conversational
    • e.g. Within an “Agonist Drugs” note, you have “[[[contradicts|0.5,red]]] [[Antagonist Drugs]]” which links to the note. I used ‘[[[’ and ‘]]]’ to designate the link but something else could be used
  • or more embedded within the link
    • e.g. you have “contradicts [[Antagonist Drugs||0.5,red]]” (I just used a ‘||’ to designate the link details but it could be something else)
    • this one is probably easier to implement but I suppose might be more tedious for the user when writing the link
    • to activate a template, I’m thinking that upon writing ‘||’ it would suggest some templates and then the user selects the one they want (‘contradicts’) and it puts in what they want, though this could feel a little slow or clunky to do since you need to select which template to do in a list.
      • Though, perhaps a better method is to intelligently look for keywords before the link itself and then auto-complete the corresponding link attributes when the user creates the link (and then the user can also customise this list of keywords so that, for example, writing the phrase ‘partially related’ will load the same template as ‘somewhat related’)
2 Likes

There is already a syntax that is used to add properties to links that is used for image width or link to a PDF specific page, so it could also be used for key-value associated with a link. I prefer a key-value system because not everyone will be interrested by colors or weights or a limited set of relation kind, I feel it’s important to offer flexibility there for people to have their own attribute.

Yes, exactly. A generic key-value system would be great. Further above in this thread, I’ve advocated an inline syntax that supports multiple type elements per link (delimited by double colons) as well as key:value elements, e.g.:

[[based on::extends::LINK_ID]]
[[evidenced by::weight:10::LINK_ID]]

Here’s an example screenshot to further illustrate this (the link type colors come from a global definition to avoid repetition within the notes):

20231128-Keypoints-01-LinkTypes

1 Like

@bojangles - this resonates and it only took 178 responses for me to get here :slight_smile:

In today’s parlance considering our upcoming database future, each link:

  • is an object (just like a note)
  • has properties (hopefully, just like a note)
  • has inheritance (a parent note and its properties)
  • has offspring (anywhere it is instantiated)
  • is unique at each instantiation - so it has it’s own context ( @bojangles template )
  • has time properties - created, modified (will they be static or dynamic?)
  • has place properties - where created - a note in either a local vault or a published place
  • has “who and how” properties - me or code creating or modifying it and by what manner and UI gesture
  • can be reusable - a templated link, if you will

We have at least four players (objects) in the linking game: note, link, offspring, and place. Each has it’s own set of properties.

The game starts with creating a link in a local vault (instantiation). What would that UI gesture look like?

2 Likes

New-timer to this discussion, though I relate to your concerns. Perhaps this will help to disambiguate that which is not inherently ambiguous, reveal that which is extant in each note, etc. and ease your saltiness!
GraphLinkTypeDemo

Share & Showcase Thread
Github Link

I’ve been working on this - let me know what y’all think!

3 Likes

I followed the link but it seems to only affect the visual representation in the node graph. I for one don’t use that graph at all. I really want the note model itself used by obsidian to associate links with an optional type/attributes, so that those can used in queries, in search, or any other plugin via the obsidian API.

Even if a plugin were to implement all those features, it would still not live in the core and so other plugins won’t be able to use those informations. So unless it makes its way into the core, it will belong to the realm of metadatas.

Yeah, I get what you mean - it would be awesome if they were to implement them into the core.

For anyone looking for anything resembling the OP idea - that is, naming relationships between notes, here’s a dataviewJS script that does something resembling that.

It lists all notes that link to this note, while also stating their relationship.

var list = dv.pages('[[]]').sort(p => p.file.path, 'desc').map(p => p.file.link + " _" + p.file.outlinks.filter(
	outlink => outlink.path == dv.current().file.path
).map(link => dv.func.default(link.subpath, 'no annotation')) + "_")

dv.header(2, "Related")
dv.list(list)

image

To use this feature, link your notes like this:
[[note#your-relationship]]

For example:
[[concept#disproves]]

P.S I do not think I have to explain that it overrides the standard use-case of using # as linking to specific headers in a note. It’s a sacrifice I’m willing to make for myself at least.

How to Make Personal Knowledge Graph in Obsidian | by Volodymyr Pavlyshyn | Mar, 2024 | Medium now it is possible with graph type links plugin

@vop super interesting graph view!, an excellent example of how link types can improve the general experience.

As food for thought or inspiration for a plugin, I leave this video about graph exploration:

It makes use of link-types. For example, a link type that describes a Category, shows concepts on the left, and so on…

1 Like