kometenstaub / linked-data-vocabularies

Add linked data to the YAML of your Obsidian notes.
MIT License
86 stars 2 forks source link

Add setting for linking headings #30

Closed kometenstaub closed 6 months ago

kometenstaub commented 11 months ago

https://github.com/kometenstaub/linked-data-vocabularies/blob/24f03460afd216366f451f61f320bb5692ee5718/src/methods/methods-write.ts#L139

brimwats commented 10 months ago

if I understand this right, I came here to +1 this; I think it means allowing the LCSH to be linked like [[English language--Pronoun]], yeah?

mariomui commented 10 months ago

heading: China--History--An Lushan Rebellion, 755-763

It is hard for other plugins to identify whether or not this heading is a single heading or an array. Well, i know it's a single heading but without the quotes it would be difficult. In fact, it might be easier to default it to an arraw. heading

That implicitly allows outside application to infer that the item is a single item.

mariomui commented 10 months ago

i would also like to code something that would manually parse the heading into broader--related--narrow because not having the same api across the notes makes it difficult for outside apps to hook into the notes.

For instance, Breadcrumbs can establish hierarchies creating an auto discovery tree.

Screen Shot 2023-09-09 at 7 17 45 PM

The note on the left a "browsable" api whereas the note on the right only has "heading". Since the heading encodes the data necessary for creating a hierarchal discovery tree, I cannot automate a majority of my pkm, notes with only the "heading" metadata cannot link to related or narrower disciplines.

kometenstaub commented 10 months ago

if I understand this right, I came here to +1 this; I think it means allowing the LCSH to be linked like [[English language--Pronoun]], yeah?

Yes.

kometenstaub commented 10 months ago

heading: China--History--An Lushan Rebellion, 755-763

It is hard for other plugins to identify whether or not this heading is a single heading or an array. Well, i know it's a single heading but without the quotes it would be difficult. In fact, it might be easier to default it to an arraw. heading

  • ....

That implicitly allows outside application to infer that the item is a single item.

I don’t decide how it is formatted. That’s valid yaml for strings and how Obsidian formats it when using their API. I don’t see a reason to use an array when it can only be one item. That would also be a breaking change.

Edit: I don’t know why it would be hard for other plugins. There should be no issue unless they interpret strings as arrays when certain characters like commas are present. Iirc breadcrumbs does that? Obsidian used to do it, but veered away from it.

kometenstaub commented 10 months ago

i would also like to code something that would manually parse the heading into broader--related--narrow because not having the same api across the notes makes it difficult for outside apps to hook into the notes.

For instance, Breadcrumbs can establish hierarchies creating an auto discovery tree.

Screen Shot 2023-09-09 at 7 17 45 PM

The note on the left a "browsable" api whereas the note on the right only has "heading". Since the heading encodes the data necessary for creating a hierarchal discovery tree, I cannot automate a majority of my pkm, notes with only the "heading" metadata cannot link to related or narrower disciplines.

I don’t understand. Is this related to this issue? Otherwise, please open a new one.

kometenstaub commented 10 months ago

Also to clarify, headings includes the relations in this case. The purpose of this is that it’s possible to navigate the relations without the need of breadcrumbs.

kometenstaub commented 6 months ago

Please tell me if this works as you expect. The feature needs to be enabled and works for broader, narrower and related headings.