refactor: drop the remaining docusaurus names from identifiers and comments (#589)

Follow-up to #588.

- rename `DocusaurusSidebarItem` -> `SidebarSourceItem`, `fromDocusaurus` -> `fromSidebarSource`, `docusaurusSidebars` -> `sidebarSources`
- reword comments and READMEs that described behaviour by comparison with docusaurus; fix the stale note in `sites/docs/src/config/api.ts`
- drop `.docusaurus/` from `.gitignore`

No functional change. `pnpm check` has 0 errors and `pnpm build` still builds 6690 pages.

<!-- cloudflare-preview --> Preview: https://pr-589.docs-gitea-com.pages.dev

Reviewed-on: https://gitea.com/gitea/docs/pulls/589
Reviewed-by: silverwind <[email protected]>
This commit is contained in:
Lunny Xiao committed 2026-10-15 17:39:24 +00:00
1 parent 2275bef3bd
commit b555a247e0
15 files changed
+46 -48

No files matched your search

+2 -3
View File
@@ -84,7 +84,7 @@ export function segmentOf(segments: Segment[], file: string): Segment | undefine
}
/**
* Route id of a source file, mirroring the docusaurus routing rules:
* Route id of a source file, following these rules:
* `index` files address their directory, a relative `slug` replaces the last
* path segment and `slug: /` addresses the root of the version.
*/
@@ -106,8 +106,7 @@ export function routeSuffix(segment: Segment, file: string, slug?: string): stri
/**
* Route id of a source file. Translations follow the route of their english
* counterpart, a translated `slug` never moves a page, which is how docusaurus
* treated the localized trees as well.
* counterpart, a translated `slug` never moves a page.
*/
export function routeIdOf(segment: Segment, suffix: string[]): string {
// the data store rejects empty ids, starlight maps `index` to the root