mkdocs-literate-nav icon indicating copy to clipboard operation
mkdocs-literate-nav copied to clipboard

nav_file doesn't work with hidden files

Open jaklan opened this issue 3 years ago • 1 comments

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.

jaklan avatar Oct 03 '21 08:10 jaklan

References to relevant code:

https://github.com/oprypin/mkdocs-literate-nav/blob/1b02eb7412666a2150338b78522b205d07f06a8d/mkdocs_literate_nav/plugin.py#L63

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.

oprypin avatar Oct 06 '21 21:10 oprypin