Open VictorKoenders opened 1 year ago
Currently zettels have no way to change their path and no way to check back references.
I propose that when a zettel is saved, we use the existing regex to check for markdown links. Each link gets replaced:
[path]
[path](sys:zettel:<id>)
[text](path)
[text](sys:zettel:<id>)
Note that if a path does not exist, it should not be replaced with sys:zettel:<id>.
path
sys:zettel:<id>
Additionally we should insert all these links in a zettel_links table so we can get back-references.
zettel_links
Currently zettels have no way to change their path and no way to check back references.
I propose that when a zettel is saved, we use the existing regex to check for markdown links. Each link gets replaced:
[path]
becomes[path](sys:zettel:<id>)
[text](path)
becomes[text](sys:zettel:<id>)
Note that if a
path
does not exist, it should not be replaced withsys:zettel:<id>
.Additionally we should insert all these links in a
zettel_links
table so we can get back-references.