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

No easy way to hide single directory #5

Open
jaklan opened this issue Oct 3, 2021 · 2 comments
Open

No easy way to hide single directory #5

jaklan opened this issue Oct 3, 2021 · 2 comments

Comments

@jaklan
Copy link

jaklan commented Oct 3, 2021

In mkdocs-awesome-pages, we have two ways to exclude a directory:

  1. we can put a .pages file in the folder with hide: true
  2. in the parent folder, we can put a .pages file like:
nav:
  - ... | *.md
  - another-subdir-to-include

To get sth similar with mkdocs-literate-nav, we need to create a SUMMARY.md file like:

- *.md
- [Another subdir to include](another-subdir-to-include/)

This doesn't work:

- *.md
- another-subdir-to-include/

Error:

The problematic item:

<li>another-subdir-to-include/</li>

Afaik - there's no equivalent of hide: true, and also writing a sub-dir nav is not as smooth, because you need to specify all the titles for sub-dirs you want to include, which is quite redundant.

@jaklan
Copy link
Author

jaklan commented Oct 3, 2021

I see there's some workaround:

- *.md
- another-sub*dir-to-include/

This actually works. Note the asterisk - it can be placed in whatever place. But anyway, it should also work without it, because using the asterisk can lead to some unexpected results (imagine you have such folders: subdir, subsubdir, subdir2 and you want to include only subdir: all combinations like sub*dir/, subdir*/ *subdir/ would fail).

@oprypin
Copy link
Owner

oprypin commented Oct 6, 2021

It seems that this report boils down to the overall fact that mkdocs-literate-nav simply doesn't let you omit the title of anything. The overall philosophy is that the literate nav remains as a readable Markdown document itself, and that's also the original rationale. But yes, with the whole thing with wildcards being available, that philosophy isn't satisfiable anymore anyway, so maybe this can be reconsidered.

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