Closed hedonhermdev closed 3 years ago
Hi @hedonhermdev 👋,
First of all thanks a lot for contributing. I've not had much time lately to test your code. I will take a look as soon as posible (it will be fast, I promise 🙂)
By the way, what motivated you to change the links 🙂?
Hi @hedonhermdev,
It seems that the changes you added break the links rendering and also delete the button that allows previewing a note in a side panel (see split view)
Links are being rendered in an inconsistent way:
Therefore I can't merge the PR as it is.
Also, in a zettelkasten archive all your notes are supposed to be in the same root folder and note links should be a reference to the note identifier itself. By adding slash support to the regex you basically get a regular markdown link, which misses the point of wikilinks.
If one still wants use folders because of organization reasons there's actually a simpler approach that I consider to work nicely (is the one I'm using for my personal site), in your hugo config.toml
file:
[permalinks]
folder1 = "/notes/:filename"
folder2 = "/notes/:filename"
This way notes in both folders are rendered in the same directory, and you can link notes in folder1 from notes of folder2 (and viceversa) with a regular [[wikilink]].
So I don't think there is really a need for this feature, thererfore I'm closing the PR.
Made some changes to the regex so that nested wikilinks like
[[apple/pen]]
work too along with the backlinks.Also kind of changed the way links are rendered so let me know if you want me to remove that change.