retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.02k stars 201 forks source link

Hide folder unless navigated into #588

Open Le0Developer opened 11 months ago

Le0Developer commented 11 months ago

Hey! Wondering if it's possible to hide a folder from the navigation unless the user is currently already in the folder?

For example, imagine the following setup:

// index.md
# Hello world

// private-docs/index.yml
visibility: hidden

// private-docs/first.md
# First

// private-docs/second.md
# Second

When navigated to /, the private-docs folder is not shown in the navigation. However, upon navigating to private-docs/first (by changing the URL), the folder is added to the navigation and you can see the 2nd file and navigate to it in the navigation (the folder is hidden again after navigating outside of it).

geoffreymcgill commented 11 months ago

Interesting idea, although not exactly possible with the current options within Retype. I can flag this as a feature request.

Something kinda similar would be visibility: protected, but those Pages would be visible in the navigation tree. They would require entering a password upon your first navigation to the Page, then the other protected pages would be automatically unlocked.