markdown-notes-tree
markdown-notes-tree copied to clipboard
Enh: auto link the "up" directory
it would be nice if one could automatically nav from the current directories README.md up a level. i.e. equivalent of [up](../README.md)
However, no rush as the auto breadcrumbs nav that a lot of markdown situations come with is fine for us.
similar feature would be a [top](../../README.md)
entry
(p.s. promise that is my last issue lol)
Hi @gillyspy, thanks for yet another suggestion for improvement!
What I could do is implement a new flag called includeUpwardNavigation
that adds "Go one level up" and "Go to top level" links at the top of subdirectory README files.
However, by design, markdown-notes-tree
only ever touches the README files and not the actual notes. This means that, once you get to the level of an actual note, you would not have these upward navigation links anymore and you would anyhow need to use a different means of navigation to go back up. Therefore, I'm not sure about the added value of this feature.
For your use case, would you still consider the above proposal (including limitations) to be worthwhile?
I think that's totally fine. I'm making some assumptions when i compose the markdown / markdown templates that the nav readmes will be there and I use relatives links. I can make those assumptions well before markdown-notes-tree. Because markdown-notes-tree can automatically create the missing "nav" files I think it's valuable to have so that I don't have to react /adjust the nav files it has auto-created
@gillyspy as you said "no rush", I'm assuming it's fine for you if I can tackle this one within a few weeks?
Can you wait that long for me to release a non-beta version with the changes I made for #11 and #12, or do you prefer that I already release 1.13.0 with just those changes?
it's all good
@gillyspy I released a new beta version 1.13.0-beta.1 that includes the includeUpwardNavigation
option. Can you give it a go and let me know if it works as you expected?
You can also find examples under test data:
- https://github.com/mistermicheels/markdown-notes-tree/tree/master/test-data/include-upward-navigation/expected
- https://github.com/mistermicheels/markdown-notes-tree/blob/master/test-data/include-upward-navigation-link-to-readme/expected/README.md
@gillyspy any feedback on this?
At the moment, I'm still waiting to release the features you requested in a non-beta 1.13.0 release.