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

[feature] Add a sorting option for *include #124

Open
adainese opened this issue Jan 23, 2024 · 0 comments
Open

[feature] Add a sorting option for *include #124

adainese opened this issue Jan 23, 2024 · 0 comments

Comments

@adainese
Copy link

Summary

Request to add a sorting option when including folders through the *include syntax

Details

When including a set of folder using the *include syntax, they are added to the nav in lexicographic (default order of ls, I think).
I'd like to have some way to sort the entries in a different order, a couple of simple flags should be enough.

Proposal

Just as an example, I can suggest something like this:

# /mkdocs.yml
site_name: Cats System

nav:
  - Intro: 'index.md'
  - Components: '*include -n -r ./components/*/mkdocs.yml'

Where -n means using numerical order and -r means reverse order (same flags as ls)

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

1 participant