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 -2
View File
@@ -1,6 +1,6 @@
/**
* Rewrites the relative markdown links of the sources to the urls of the built
* site. Docusaurus resolved `../administration/config-cheat-sheet.md` against
* site. A link such as `../administration/config-cheat-sheet.md` is resolved against
* the directory of the file it appeared in; astro serves urls, so the target
* has to be looked up in the route table of the version.
*/
@@ -35,7 +35,7 @@ function rewriteTarget(target: string, context: LinkContext): string {
const [pathname = '', hash = ''] = splitHash(target);
if (!/\.mdx?$/.test(pathname)) return target;
// docusaurus resolved a link against the directory of the file first and
// a link is resolved against the directory of the file first and
// against the root of the version second, both spellings are in the sources
const route =
context.resolve(normalize(`${context.dir}/${pathname}`)) ?? context.resolve(normalize(pathname));