Closed ptgott closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 1, 2024 7:20pm |
@avatus I've reworked this a little bit to change the expectations for subdirectory pages. I've added the expectation from Docusaurus that a category page have the same title as the parent directory (docs). Docusaurus also allows category pages to be called index.mdx
and README.mdx
, but Alexey advised against using index.mdx
for non-root pages and README.mdx
doesn't seem appropriate.
Add a
config.json
field within eachnavigation
entry calledgenerateFrom
. This designates a relative path fromdocs/pages
from which to generate entries within the sidebar.When generating pages, a function called
generateNavPaths
looks for pages to use as second-level section introductions. These can either be calledintroduction.mdx
or have the same name as a second-level subdirectory.Adding a
generateFrom
field is consistent with the Docusaurus approach to sidebar generation, in which a configuration field indicates which directory to generate a section from. This gives us control over the title and icons we use for navigation sections, which aren't available to fetch from a directory tree alone. It also lets us use the current, hardcodedentries
approach for some sections if we need to.Also un-skips some accidentally skipped tests.