Closed iam-yan closed 1 year ago
hi Yan, thanks for the note, generally speaking we are trying to add as little semantic to Foam as possible (except some important building blocks). I am trying to better wrap my head around your suggestion, can you give me a longer more tangible example? Let me also know if there is a way to see this feature as a case of a building block (my first reaction here was to create some script that generates the index notes, which seems like a solution you'd want/need anyways here?)
For example, let's say there are notes about github repo.
Currently I will create the notes like this:
// github-repo.md
# Github Repo
- [[metrics]]
- [[best-practices]]
- [[commands]]
// metrics.md
# Metrics
- [[watch]]
- [[star]]
- [[fork]]
- [[issue]]
// watch.md
# Watch
Note about watch in github repos...
In this way I would build a nice graph. However it is troublesome, either to create or to read. I think it would be better if I could create the same graph with the following notes.
// _.md
// The index now is like a book index, rather than a Zettelkasten one.
// However I think it is easier to create and read.
# Github Repo
## Metrics
- [[watch]]
- [[star]]
- [[fork]]
- [[issue]]
## Best Practices
...
## Commands
...
// watch.md
# Watch
Note about watch in github repos...
IMO, it would be great to consider this as a plugin. So users would be able to toggle and config to build a note system better fits their needs. What do you think?
Is it more important to you to influence the graph or the notes itself? In the case of the graph, I'd feel we should look into flexibility, or an option to define a structure/semantics, then taking assumptions on the note structure.
@pderaaij
The graph around an index note is always similar, however currently the note structure behind is inflexible in my opinion. I'd like to have the graph properly represent the structure of a note likes a book's content.
I am not certain if I am following you, but let's give it a go.
As I understand, you preferably would have a single not that you can use as an index note. Each h1 section in this note should in the graph be a different node. For example:
# Index note
# Section A
[[Page A1]]
[[Page A2]]
# Section B
[[Page B1]]
[[Page B2]]
should lead to a graph of:
Index >> Section A >> Page A1
>> Page A2
>> Section B >> Page B1
>> Page B2
I feel this is what you mean, but please comment if I am misinterpreting something here.
The suggestion you propose is to let Foam assign a semantic to an H1 header in a note when represented in the graph. This is a possible solution, but one that could have a lot of (unintended) side effects. A feature that might prevent assigning additional semantics to the note, could be to allow for flexibility in the graph.
In this case I could envision a feature where you can provide interpretation rules for certain notes. For example:
For note [[index]]
Extract each H1 header as a note
For the graph logic, this would require treating the original note as a collection of virtual notes before rendering the graph. No idea if we could make this work. But, I am curious if this would solve your problem?
Thinking of it. Perhaps we should allow graph configuration to be done in the frontmatter part of the note.
Hey @pderaaij , basically yes, with just one difference.
you preferably would have a single not that you can use as an index note. Each h1 section in this note should in the graph be a different node.
Not each h1 section, but each h2, h3 section in this note should in the graph be a different node. I think this makes more sense for representing the relationship of the graph shape.
I am imagining something like this...
// .vscode/settings.json
...
// Add extra rules for how foam should recognize nodes.
"foam.nodeTag": [
{ "_": [ "h2" ] } // Consider h2 section in any _.md file as a node in the graph.
],
...
Would this be possible?
but one that could have a lot of (unintended) side effects.
BTW, what are the possible side effects in your mind?
Closing for inactivity
Problem
In Zettelkasten index notes are clusters of related notes. However when an index note is nested in another, it can be problematic.
Solution
What about:
_.md
as index notes )Then we can rewrite the notes above to:
What do you think?