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

+4 -4
View File
@@ -74,7 +74,7 @@ const transformVersion = '2';
/**
* Loads the gitea documentation straight out of the content directories, which
* keep the layout the docusaurus site used, instead of copying them into
* keep their original layout, instead of copying them into
* `src/content/docs`. Every source file is mapped to its final route by the
* product matrix, so the release and translation workflows are untouched.
*/
@@ -190,7 +190,7 @@ async function parseFile(
const substituted = applyVariables(contents, segment.version.variables);
const { frontmatter, body: rawBody } = splitFrontmatter(substituted);
// a translated `slug` moves the page, exactly like it did under docusaurus
// a `slug` moves the page
const id = routeIdOf(segment, routeSuffix(segment, file, asString(frontmatter.slug)));
const { title: headingTitle, body } = extractTitle(rawBody);
const title = asString(frontmatter.title) ?? headingTitle;
@@ -289,7 +289,7 @@ async function renderPage(
return broken;
}
/** The index page docusaurus generated for a category. */
/** The index page generated for a category. */
interface ParsedCategory {
segment: Segment;
id: string;
@@ -301,7 +301,7 @@ interface ParsedCategory {
}
/**
* Recreates the index pages docusaurus generated from `_category_.json`, so
* Recreates the index pages generated from `_category_.json`, so
* that `/category/installation/` and `/usage/actions/` keep resolving.
*/
async function resolveCategories(