-
Notifications
You must be signed in to change notification settings - Fork 13
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
Improve the sidebar generator #481
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
67e5c04
to
cf03cc5
Compare
cf03cc5
to
21a3604
Compare
8b08a80
to
a1096ae
Compare
a1096ae
to
e221aa9
Compare
@@ -72,6 +72,39 @@ const getEntryForPath = (fs, filePath) => { | |||
}; | |||
}; | |||
|
|||
const sortByTitle = (a, b) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here describing the algorithm chosen for sorting? "if it includes this, sort alphabetically, otherwise go by title" or whatever
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 52328f0
e221aa9
to
afda6d7
Compare
Improve the sidebar generator to accommodate the reorganized docs site. - Alphabetize auto-generated sidebar entries. The exception is any page that includes "Introduction" or "introduction" in the title. Elevate these to the first entry to avoid a confusing sidebar order. - Show third-level category pages in the sidebar without showing their contents. This way, we can add content one level beyond the level permitted in the sidebar while still showing the category page for that content in the sidebar. - Allow for a category page to be at the same level as its associated subdirectory. This is to accommodate the Terraform Provider reference which, because of the way it's generated, can only include a category page outside of its associated subdirectory. This does not abide by the Docusaurus convention, so we will need to figure out a solution eventually, but this is a quick alternative to tide us over. - Only add ".mdx" files to the sidebar. Otherwise, the generator attempts to add vim swapfiles etc.
afda6d7
to
52328f0
Compare
Improve the sidebar generator to accommodate the reorganized docs site. - Alphabetize auto-generated sidebar entries. The exception is any page that includes "Introduction" or "introduction" in the title. Elevate these to the first entry to avoid a confusing sidebar order. - Show third-level category pages in the sidebar without showing their contents. This way, we can add content one level beyond the level permitted in the sidebar while still showing the category page for that content in the sidebar. - Allow for a category page to be at the same level as its associated subdirectory. This is to accommodate the Terraform Provider reference which, because of the way it's generated, can only include a category page outside of its associated subdirectory. This does not abide by the Docusaurus convention, so we will need to figure out a solution eventually, but this is a quick alternative to tide us over. - Only add ".mdx" files to the sidebar. Otherwise, the generator attempts to add vim swapfiles etc.
Improve the sidebar generator to accommodate the reorganized docs site.
Alphabetize auto-generated sidebar entries.
The exception is any page that includes "Introduction" or
"introduction" in the title. Elevate these to the first entry to avoid
a confusing sidebar order.
Show third-level category pages in the sidebar without showing their
contents. This way, we can add content one level beyond the level
permitted in the sidebar while still showing the category page for
that content in the sidebar.
Allow for a category page to be at the same level as its associated
subdirectory. This is to accommodate the Terraform Provider reference
which, because of the way it's generated, can only include a category
page outside of its associated subdirectory. This does not abide by
the Docusaurus convention, so we will need to figure out a solution
eventually, but this is a quick alternative to tide us over.