docs: tighten the gt guides and the cli wiring

The workflow example had no trigger, so Gitea would reject it as written.
The guides now merge the small account sections and point users at the
nightly builds they describe. Comments and READMEs no longer mention the
dropped reference generator or list the runner as the only hand written
sidebar product, and the sidebar lookup drops a key the fallback covers.

Co-Authored-By: Claude (Opus 5.5) <[email protected]>
This commit is contained in:
silverwindandClaude committed 2026-10-22 22:06:45 +02:00
1 parent 31cd47a65c
commit 8594d73ccd
10 files changed
+46 -55

No files matched your search

+10 -10
View File
@@ -1,15 +1,15 @@
# Astro + Starlight site
Renders the gitea documentation with [Starlight](https://starlight.astro.build):
the docs (6 versions x 3 languages), the runner docs (4 series), the gt (Gitea
CLI) docs and the api reference (7 swagger documents). The enterprise docs stay in their own
deployment and are linked from the header.
the docs (6 versions x 3 languages), the runner docs (4 series), the cli docs
and the api reference (7 swagger documents). The enterprise docs stay in their
own deployment and are linked from the header.
The content directories are the ones the site has always used — `docs/`,
`versioned_docs/`, `i18n/`, `runner-docs/`, `runner-docs_versioned_docs/`,
`cli-docs/` and
`versioned_docs/`, `i18n/`, `runner-docs/`, `runner-docs_versioned_docs/` and
`static/swagger-*.json` (plus `static/openapi3-*.json` since gitea 1.27) — so
the release scripts and the translation workflow stay unchanged.
the release scripts and the translation workflow stay unchanged. The cli docs
in `cli-docs/` follow the layout of the runner docs.
## Running it
@@ -74,10 +74,10 @@ instead of warning.
The docs are the site itself, so their language comes first: `/zh-cn/1.26/`.
The runner, the cli and the api are separate products and keep their language
inside the product, `/runner/zh-cn/3/`, which is reserved: all are published in
english only today. Starlight builds a fallback page in every configured language for
every english page, so `/zh-cn/runner/` would exist; the post build integration
removes those directories and `cloudflare/_redirects` sends them to the
english page.
english only today. Starlight builds a fallback page in every configured
language for every english page, so `/zh-cn/runner/` would exist; the post build
integration removes those directories and `cloudflare/_redirects` sends them to
the english page.
The version served at the root of a product has no number in its url: docs 1.27
is `/`, runner 3 is `/runner/` and api 1.27 is `/api/`. `/1.27/`, `/runner/3/`
+3 -3
View File
@@ -11,9 +11,9 @@ import { defaultLocale, locales, products, type LocaleId } from '@gitea-docs/con
* generated as `/api/126/`. The directories are renamed and the links inside
* the build are rewritten.
* - starlight builds a fallback page in every configured language for every
* english page. That is what we want for the docs, but the runner and the api
* are separate products with their own language list, so `/zh-cn/runner/` has
* to go; `cloudflare/_redirects` sends it to the english page.
* english page. That is what we want for the docs, but the other products
* have their own language list, so `/zh-cn/runner/` has to go;
* `cloudflare/_redirects` sends it to the english page.
*/
export function giteaPostBuild(): AstroIntegration {
return {
+1 -1
View File
@@ -90,7 +90,7 @@ function addScopeToggle(root: HTMLElement, onChange: (allVersions: boolean) => v
/**
* While all versions are searched the same page shows up once per version, so
* the version (and the product, for the api and the runner) is appended to the
* the version (and the product, for every product but the docs) is appended to the
* title of a result.
*/
function labelResult(result: PagefindResult): void {
+1 -1
View File
@@ -53,7 +53,7 @@ function sidebarSources(): Map<string, SidebarSourceItem[]> {
for (const [key, file] of Object.entries(files)) {
const config = read(file);
const items = config && (config.docs ?? config.runner ?? config.cli ?? Object.values(config)[0]);
const items = config && (config.docs ?? config.runner ?? Object.values(config)[0]);
if (items) sidebars.set(key, items);
}
return sidebars;