markdown-notes-tree icon indicating copy to clipboard operation
markdown-notes-tree copied to clipboard

Enh: auto link the "up" directory

Open gillyspy opened this issue 2 years ago • 6 comments

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)

gillyspy avatar Jun 18 '22 16:06 gillyspy

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?

mistermicheels avatar Jun 18 '22 17:06 mistermicheels

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 avatar Jun 20 '22 19:06 gillyspy

@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?

mistermicheels avatar Jul 09 '22 15:07 mistermicheels

it's all good

gillyspy avatar Jul 20 '22 13:07 gillyspy

@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

mistermicheels avatar Jul 22 '22 16:07 mistermicheels

@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.

mistermicheels avatar Sep 25 '22 09:09 mistermicheels