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

Sub-subdirectories not supported? #104

Open
eXpl0it3r opened this issue Aug 3, 2024 · 4 comments
Open

Sub-subdirectories not supported? #104

eXpl0it3r opened this issue Aug 3, 2024 · 4 comments

Comments

@eXpl0it3r
Copy link

Am I understanding this correctly, that sub-subdirectories are not supported?

For example I'd have the structure:

└───tutorials
    └───2.6
        ├───getting-started
        └───system

How would I address the 2.6 directory?

If I write something like the following, mkdocs just crashes:

nav:
    - Home: index.md
    - Learn:
        - tutorials/2.6
mkdocs_awesome_pages_plugin.navigation.NavEntryNotFound: Nav entry "tutorials/2.6" not found. [.pages]

Using just a subdirectory works:

nav:
    - Home: index.md
    - Learn:
        - tutorials
@k3yss
Copy link

k3yss commented Aug 9, 2024

+1 for this question

@kamilkrzyskow
Copy link
Contributor

kamilkrzyskow commented Aug 9, 2024

I don't think so, as the navigation and meta gathering are processed recursively, so .pages files should only have access to files on their own recursion level 🤔

@k3yss
Copy link

k3yss commented Aug 9, 2024

@kamilkrzyskow is there a workaround for it?

@kamilkrzyskow
Copy link
Contributor

@k3yss I'm not sure what are your requirements. Why can't you simply create a .pages in the tutorials subdirectory that sets its own navigation structure to show 2.6 based on the example above?
If tutorials has exactly one navigation item then you can use collapse: true in the tutorials/.pages file to remove the Tutorials parent section and keep only 2.6.

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

3 participants