Foam: Feature-request: Alternate Names for Entries in a Knowledge Graph

Created on 28 Jun 2020  路  3Comments  路  Source: foambubble/foam

Right now, it seems the Knowledge Graph is mapped 1-1 with the file name. Oftentimes, the same note may be associated with multiple topics in the knowledge graph. It would be useful to support some markdown metadata where additional tags or alternate names for the knowledge graph and other documents to use to refer to the document. In wiki-syntax, referring to an alternative name would take you to the same file. I don't know how this would affect performance though, and it might not be worth it.

enhancement

Most helpful comment

Hi! Author of Markdown Links here (which is used for graph visualisation).

To be precise, the label displayed in the graph is the main title (# This one) from the file. When I started this extension I was using 1:1 mapping of file name and I could miss some aspects of the problem.

I am not sure if I understand the problem, though. By supporting metadata you mean some UI options for filtering nodes in the graph by a tag present in, for example, YAML preamble? I am afraid it is quite far from common conventions in Markdown and would be hard to justify in a general extension aiming for various Markdown use cases. So if @jevakallio is interested in going in this direction it would most likely end up being a fork under foambubble with conventions established there.

Regarding alternative names, it is absolutely not a problem, but how would those names be matched with files? If you mean this syntax: [[Alternative to display|Real title which is hidden]] then it is a matter of parsing.

It is also supported in two ways by native Markdown syntax, since both links and references allow to define display text in separation from the actual link.

All 3 comments

Hi! Author of Markdown Links here (which is used for graph visualisation).

To be precise, the label displayed in the graph is the main title (# This one) from the file. When I started this extension I was using 1:1 mapping of file name and I could miss some aspects of the problem.

I am not sure if I understand the problem, though. By supporting metadata you mean some UI options for filtering nodes in the graph by a tag present in, for example, YAML preamble? I am afraid it is quite far from common conventions in Markdown and would be hard to justify in a general extension aiming for various Markdown use cases. So if @jevakallio is interested in going in this direction it would most likely end up being a fork under foambubble with conventions established there.

Regarding alternative names, it is absolutely not a problem, but how would those names be matched with files? If you mean this syntax: [[Alternative to display|Real title which is hidden]] then it is a matter of parsing.

It is also supported in two ways by native Markdown syntax, since both links and references allow to define display text in separation from the actual link.

The syntax above looks good. Based on what the graph parses, in each file, it may represent the file as different nodes in the graph.

There will be hooks in the Foam graph in the future (which should take shape in the upcoming weeks). I will close this issue for now, feel free to open a new one (or contribute the feature) once the new graph API has been published. You can also comment on the RFC that will be published here soon (in the form of an issue on this repo)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lsx7 picture lsx7  路  7Comments

jetk picture jetk  路  6Comments

jsjoeio picture jsjoeio  路  6Comments

amorriscode picture amorriscode  路  6Comments

coffenbacher picture coffenbacher  路  5Comments