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

Add ignore case for sorting #112

Merged
merged 7 commits into from
Dec 21, 2024
Merged

Add ignore case for sorting #112

merged 7 commits into from
Dec 21, 2024

Conversation

lcvgit
Copy link
Contributor

@lcvgit lcvgit commented Dec 10, 2024

Added option to ignore case for sorting pages.

Similar to previous PR, but added ignore_case as an option in the Meta and Option classes. Furthermore, modified the _order method so that ignore_case should work for natural and standard sorting.

@lcvgit
Copy link
Contributor Author

lcvgit commented Dec 11, 2024

Resolved these issues and linting passed locally.

Copy link
Owner

@lukasgeiter lukasgeiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Looks pretty good already 👌

mkdocs_awesome_pages_plugin/navigation.py Outdated Show resolved Hide resolved
@lcvgit
Copy link
Contributor Author

lcvgit commented Dec 19, 2024

Are there any further changes you would like to see?

Copy link
Owner

@lukasgeiter lukasgeiter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good, sorry for the delay 👍

@lukasgeiter lukasgeiter merged commit a6ee105 into lukasgeiter:master Dec 21, 2024
@lukasgeiter
Copy link
Owner

Released with v2.10.0

@lcvgit
Copy link
Contributor Author

lcvgit commented Dec 21, 2024

No worries on delay and thanks for the great plugin!

Just installed 2.10.0 locally and added ignore_case: true to the plugin under mkdocs.yml. The sorting appears to be working correctly however, it does produce the following warning:

WARNING -  Config value 'plugins': Plugin 'awesome-pages' option 'ignore_case': Unrecognised configuration name: ignore_case

My apologies, I missed the config_scheme in plugin.py. Assuming we just need to add the following line:

    ("ignore_case", config_options.Type(bool, default=False)),

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

Successfully merging this pull request may close these issues.

2 participants