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

fix: Alphabetized API Structures sidebar #422

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

abhishekgite446
Copy link

Fixing the Issue 408

Alphabetized API Structures sidebar ✅

@abhishekgite446
Copy link
Author

Retrieved the hardcoded changes made in the first commit and added a function to sort the sidebar sub-elements in API tab.

WebSource.Object._.Electron.-.27.June.2023.mp4

Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

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

sidebars.js is generated by scripts/tasks/create-sidebar.ts, so it is not the correct place to put these changes.

@abhishekgite446
Copy link
Author

Hi @dsanders11, thanks for letting me know. I was having a look at the file scripts/tasks/create-sidebar.ts and observed that when I disabled/commented out the if condition mentioned below in the same file and executed the command yarn pre-build then the sidebar.js was overwritten with 'API Structures' sorted in alphabetical array.

I reverted my changes from scripts/tasks/create-sidebar.ts as the sidebar.js is already sorted and going ahead if a new api is added in the folder docs/latest/api/structures then the yarn pre-build command should add that in sidebar.js in sorted order.

Would love to know your thoughts on it.
image

@MarshallOfSound MarshallOfSound temporarily deployed to electronjsorg-new-pr-422 May 7, 2024 19:30 Inactive
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.

3 participants