Skip to content
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

nav_file doesn't work with hidden files #4

Open
jaklan opened this issue Oct 3, 2021 · 1 comment
Open

nav_file doesn't work with hidden files #4

jaklan opened this issue Oct 3, 2021 · 1 comment

Comments

@jaklan
Copy link

jaklan commented Oct 3, 2021

Hi, I wanted to use the convention known from mkdocs-awesome-pages plugin to put sub-navs into .pages files:

  - literate-nav:
      nav_file: .pages

Unforunately, it doesn't work. If I rename the file and the config to pages or pages.md - everything is okay, so it's clearly related to hidden files.

@oprypin
Copy link
Owner

oprypin commented Oct 6, 2021

References to relevant code:

file = files.get_file_from_path(os.path.join(path, nav_file_name))

https://github.com/mkdocs/mkdocs/blob/1779c181a32b62c89bdfbf888bf7e88a4fce58cf/mkdocs/structure/files.py#L30
https://github.com/mkdocs/mkdocs/blob/1779c181a32b62c89bdfbf888bf7e88a4fce58cf/mkdocs/structure/files.py#L230
https://github.com/mkdocs/mkdocs/blob/1779c181a32b62c89bdfbf888bf7e88a4fce58cf/mkdocs/structure/files.py#L253

Indeed, MkDocs excludes hidden files from the get-go, and mkdocs-literate-nav can't detect such files if it relies on that mechanism.

Thanks for the report. Maybe the implementation for finding the files can be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants