-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to hide a single file from nav? #102
Comments
Not really. The regex might be able to do the trick, but it's not what it was designed for. Can you describe your use-case for hiding a single file? |
I have some extra documents as supplementary readings, they do not and should not belong to the docs of my project. I only want to reference them from a Markdown file using the Markdown link syntax I might hide more files and expect a mechanism that works in the similar way as |
@madjxatw nav:
- ... | home/** # first in the nav order is the 'Home' tab
- ... | regex=^(?!index\.md$).* # then, all paths that are not exactly "index.md" of the root But for your use-case, why can't you put all the files you want to hide into a directory and then just hide this directory? |
@VladimirFokow, it sounds a good workaround to have a dedicated directory if there is no other better way, thanks! |
@lukasgeiter , another use case is when blog pattern is enabled, a |
@madjxatw , as far as I understand, you specify plugins:
- tags:
tags_file: tags.md only once - in If you want to exclude this page from nav - also put it into that hidden folder? |
@VladimirFokow , I am currently using dedicated directories as you suggested for what to be hidden in nav. My site has a complex directory structure, so I create a "hidden" folder in each subdirectory (section) as needed for better organization and managment. Really appreciate your suggestion and awesome-pages plugin! BTW, I still kind of expect that MkDocs itself offers a feature similar to |
Thanks for helping out @VladimirFokow! Indeed, at the moment a hidden folder is the easiest solution. I've been playing with the thought of adding exclude patterns before, so it's good to know that there's a need for that 👍 |
I see that
hide: true
could hide a directory from the navigation, but is there any simple way to hide a single file? Theregex
syntax might be used to filter out a file with a specific name, but I couldn't find an example. Please advice, thanks.The text was updated successfully, but these errors were encountered: