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

Code to let us sort certain doc categories to top #3399

Merged
merged 17 commits into from
Nov 22, 2024

Conversation

mooreds
Copy link
Contributor

@mooreds mooreds commented Nov 21, 2024

No description provided.

eventually I want to use this functionality for a new category, but don't want to forget the data structure before then

JSON doesn't have comments or I'd leave a valid entry commented out
Copy link
Contributor

@lyleschemmerling lyleschemmerling left a comment

Choose a reason for hiding this comment

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

I was worried that this would ultimately be difficult to maintain as we would now have two different schemes for managing nav order. Since the data structure is already defined and filled out here, we could just mirror it with a definition of the order using an object of the same shape.

This would allow you to specifiy both the entries and the categories where you want to have a definitive ordering in one place, while the fallback behavior to alphabetical would still be there.

Feel free not to use this approach, just a suggestion (I left your code commented out so you can swap it back if you want :) )

@mooreds mooreds merged commit 88a47cd into main Nov 22, 2024
2 checks passed
@mooreds mooreds deleted the mooreds/sort-doc-categories-to-top branch November 22, 2024 21:12
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