100 Commits
Author SHA1 Message Date
Lunny Xiaoandbircni 3258717d62 fix(api): show the name of a type in the reference, document the gmail app password (#541)
Two unrelated but small fixes, closes #258 and closes #32.

**The reference does not name its types (#258)**

Since the api reference is rendered from the openapi 3.0 document, a field of type `ReviewStateType` is rendered as the bare string enum the `$ref` points at: starlight-openapi dereferences everything and the schema has no `title`, so the name of the type is nowhere on the page. Searching the current reference for `ReviewStateType` returns nothing, which is what the issue reports (the plugin also has no route for `components/schemas`, so there is no page per type either).

`normalizeSchema()` now titles every named schema of an openapi 3.0 document with its own name, which the plugin renders next to the type of a field:

- before: `state` · `string` · Allowed values: APPROVED …
- after: `state` · `ReviewStateType` · `string` · Allowed values: APPROVED …

The go doc comments start with the name of the type, so the description would repeat it ("ChangeFilesOptions — ChangeFilesOptions options for creating …"); a leading `<name> ` is stripped from the description.

For the record, how the three generations of documents describe that type:

| Versions | Type name | Allowed values |
| --- | --- | --- |
| 1.22 – 1.25 (swagger, `ReviewStateType` definition without `enum`) | shown | missing |
| 1.26 – 1.27 (swagger, enum inlined upstream) | missing | shown |
| 1.27, next (openapi 3.0, with this change) | shown | shown |

The released swagger documents are frozen, so 1.22 – 1.26 keep what they have; from 1.27 on the reference answers the question the issue asks.

**Gmail needs an app password (#32)**

The configuration in the guide is still correct after Google turned off password-only access, because it already asks for an app password. What was missing is why there is no alternative: Gitea's mailer authenticates with `CRAM-MD5`, `PLAIN` or `LOGIN` and has no XOAUTH2, so "Sign in with Google" is not an option. Added that, together with the two things people run into — an app password needs 2-step verification and a Workspace administrator can disable app passwords for the domain — and the `587` + `smtp+starttls` variant.

Verified by building the api and the next docs: the type names show up on the operation pages, the descriptions are not duplicated, and 1.26 and older are unchanged. `pnpm check` passes.

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

---------

Co-authored-by: bircni <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/541
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-09-12 11:27:21 +00:00
Lunny Xiao 9a6d0d90bf docs(lfs): document the sha the contents API expects for LFS files (#542)
Closes #243.

The `sha` of the contents API is compared against the ID of the blob the commit has at that path, and for a file tracked by Git LFS that blob is the pointer file. Sending the `lfs_oid` or a checksum of the file content fails with `sha does not match`, and nothing in the documentation said so.

Adds a section to the LFS page: use the `sha` from `GET /repos/{owner}/{repo}/contents/{filepath}`, not `lfs_oid`, and note that the API does turn the content into an LFS object by itself when `.gitattributes` tracks the path (`modifyFile()` stores the object and commits the pointer), so nothing else has to be done differently.

The swagger comments upstream are being fixed in https://github.com/go-gitea/gitea/pull/38915, which will reach `/api/next/` through the scheduled job and the released reference with 1.28. The documents of 1.22 – 1.27 are frozen, so the guide is the only place where readers of the current release can find it.

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/542
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-09-12 11:16:22 +00:00
Lunny Xiao e1136a791d Show product navigation in the mobile sidebar (#539)
Show product navigation in the mobile sidebar (gitea/docs#539)
2026-09-08 15:01:21 +00:00
Lunny Xiao 6f4164726b update to 1.27.3 (#532)
<!-- cloudflare-preview --> Preview: https://pr-532.docs-gitea-com.pages.dev

Reviewed-on: https://gitea.com/gitea/docs/pulls/532
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-29 19:59:27 +00:00
Lunny Xiao 09a3500b62 Update packages/content-loader/src/products.ts (#529)
<!-- cloudflare-preview --> Preview: https://pr-529.docs-gitea-com.pages.dev

Reviewed-on: https://gitea.com/gitea/docs/pulls/529
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-24 05:13:34 +00:00
Lunny Xiao 9a34857df9 Remove AWS S3/CloudFront deployment from the publish workflow (#518)
The docs site is served by Cloudflare Pages now, so the AWS deployment path is redundant.

- Drop the AWS CLI installation step.
- Drop the `configure-aws-credentials` step and the `aws s3 sync` + CloudFront invalidation step.
- Keep only the Cloudflare Pages deploy, and simplify the `_headers` / `_redirects` comment since it no longer needs to explain S3 ordering.

The AWS_* secrets are no longer used by this workflow and can be removed from the repository settings.

Reviewed-on: https://gitea.com/gitea/docs/pulls/518
Reviewed-by: silverwind <[email protected]>
2026-08-18 06:05:26 +00:00
Lunny Xiaoandbircni 96c0486a19 Delete the Cloudflare Pages preview when a pull request is closed (#517)
The `checks` workflow deploys a Cloudflare Pages preview to the `pr-<number>` branch of the `docs-gitea-com` project for every pull request, but nothing ever removed it. Closed and merged pull requests therefore keep an alias and a growing list of deployments around.

This adds a `cleanup preview` workflow that runs when a pull request is closed (merged or not), lists the deployments of the project through the Cloudflare API and deletes the ones whose trigger branch is `pr-<number>`. `force=true` is used so the deployment the branch alias points at is removed as well.

Pull requests from forks do not receive the secrets, so the cleanup is skipped there, exactly like the preview deployment itself.

---------

Co-authored-by: bircni <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/517
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-15 09:24:14 +00:00
Lunny Xiao 106a813e08 docs: postgres example version, SELinux, OAuth2/OIDC, IIS host rewrite and ACME in containers (#513)
Five documentation fixes that do not depend on anything upstream.

**PostgreSQL version in the docker guide** (closes #224)

The compose example pinned `postgres:14`, the oldest version Gitea still tests against, and PostgreSQL does not upgrade its data directory on its own, so every new deployment that copies the example is one major upgrade behind from day one. The example now uses `postgres:18`, with a note about why the major version is pinned and a pointer to the supported range.

**SELinux** (closes #211)

`setcap 'cap_net_bind_service=+ep'` is what the docs suggest for binding to a port below 1024, but it is denied under SELinux depending on the label of the binary, and it is lost on every upgrade because the capability lives in an extended attribute of the file. A new page describes granting the capability through the systemd unit instead (`AmbientCapabilities`, plus `PrivateUsers=false` when the sandboxing gets in the way), the `semanage fcontext` / `restorecon` labels for the binary and the data directory, and how to read the denials with `ausearch` and `audit2allow`. It is linked from the binary and source installation pages and from the `gitea web` notes.

**OAuth2 and OpenID Connect** (closes #106)

The authentication page documented LDAP, PAM, SMTP, FreeIPA, SPNEGO and the reverse proxy, but not that Gitea can log users in against an external OAuth2 or OpenID Connect provider, which made it look like the only OAuth2 support is Gitea acting as the provider. The new section covers the fields of the authentication source, the callback URL to register at the provider, the group and claim mappings, and the `[oauth2_client]` settings, and separates it from the older OpenID 2.0 sign-in.

**IIS reverse proxy** (closes #39)

Application Request Routing rewrites the host of the `Location` header back to the internal one while "Reverse rewrite host in response headers" is on, which sends the browser to `127.0.0.1:3000` after a sign-in. The IIS section now says to turn it off and where the setting lives.

**ACME in containers** (closes #292)

`ACME_DIRECTORY` defaults to the relative path `https`, which is resolved against the working directory of the process. In the official image that is `/app/gitea`, outside the `/data` volume, so a recreated container asks the CA for a new certificate and runs into the Let's Encrypt limit of 5 certificates per week for the same domains. The HTTPS page now warns about it and shows an absolute path inside the volume; the cheat sheet entry points at the warning. The default itself is being changed in https://github.com/go-gitea/gitea/pull/35851, the note stays useful for every released version.

Only `docs/` is touched, the released versions keep their content.

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/513
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-15 09:18:00 +00:00
Lunny Xiao 4e38ace168 feat(api): render and publish the openapi 3.0 documents (#514)
Closes #37.

Gitea generates an OpenAPI 3.0 document since 1.27 (`templates/swagger/v1_openapi3_json.tmpl`, renamed to `templates/swagger/v1-openapi3.generated.json` on main, served by an instance at `/openapi3.v1.json`), but this site never picked it up and still published Swagger 2.0 only. That is what the issue is about: code generators such as `openapi-python-client` reject the document with "You may be trying to use a Swagger document; this is not supported by this project".

**What this does**

- `update_api_docs.sh` downloads the OpenAPI 3.0 document next to the Swagger 2.0 one, rewrites the same placeholders (they sit in `servers` instead of `basePath`) and writes `static/openapi3-latest.json` and `static/openapi3-<minor>.json`. Versions that do not have one (1.26 and older) are skipped with a message and keep their Swagger 2.0 document.
- The OpenAPI 3.0 document is rendered where it exists (`/api/` and `/api/next/`), the older versions keep rendering Swagger 2.0. Both documents describe the same api and carry the same operation ids, so no url of an operation page changes; the `basePath` normalization is now only applied to the Swagger 2.0 documents, since a full url in `servers` is valid.
- The overview page of each version links both documents for download, which is what the issue actually needs: `https://docs.gitea.com/openapi3-27.json` for the current release, `https://docs.gitea.com/openapi3-latest.json` for gitea main.
- The scheduled workflow now refreshes and proposes both documents of gitea main.

**Verification**

- `pnpm dlx @redocly/cli lint static/openapi3-latest.json`: valid, only content warnings that come from upstream (missing 4xx responses, ambiguous paths).
- `openapi-python-client generate --path static/openapi3-latest.json`, the tool from the issue, generates a client. The only warning left is `POST /markdown/raw`, whose request body is `text/plain`.
- Operation ids of `static/swagger-27.json` and `static/openapi3-27.json` are identical (481 on both sides), so the operation pages keep their urls.
- Built the api product and compared a rendered operation page against the Swagger 2.0 one: same sections, the request body is now marked required where the document says so.

The released Swagger 2.0 documents are kept: they are the only description 1.26 and older ever produced, and some tooling still expects them.

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/514
Reviewed-by: bircni <[email protected]>
2026-08-14 18:31:00 +00:00
Lunny Xiao 63e1faa63c fix(search): scope the results to the version being read (#512)
Closes #146.

The published site runs pagefind, not docsearch: `PUBLIC_DOCSEARCH_APP_ID` and `PUBLIC_DOCSEARCH_API_KEY` are not set, so `astro.config.mjs` falls back to `pagefind: true`, and a page of docs.gitea.com ships starlight's `#starlight__search` with the `/pagefind/` bundle. The version scoping we have is only implemented for docsearch (`docsearch:product` / `docsearch:version` meta tags plus `facetFilters` in `src/config/docsearch.ts`), so nothing consumes it today.

Pagefind builds one index for the whole site, partitioned only by the html language, and nothing tags the pages with a version, so a search started in the 1.23 docs answers with every version of the same page and the latest one usually wins. That is what the issue reports; the original cause (the docusaurus search plugin) is gone, this one replaced it.

**What this does**

- `src/components/MarkdownContent.astro` wraps the content in two `data-pagefind-filter` elements, `product` and `version`, so the filters land in the index. One filter per element on purpose: pagefind reads the whole attribute as a single `name:value` pair, a comma separated value ends up as one filter named `product` with the value `docs,version:1.26`.
- The same scope is written to a `gitea:search-filters` meta tag next to the docsearch ones (`src/lib/search.ts`).
- Starlight builds the search ui from a build time configuration and has no option for per page filters, so its `@pagefind/default-ui` import is redirected to a subclass in `src/lib/pagefind-ui.ts` by the `gitea-pagefind-filters` plugin in `astro.config.mjs`, the same approach the `gitea-openapi-overview` plugin already uses. The subclass selects the filters of the page the modal was opened on.
- A "Search all versions" checkbox below the search input drops the filters again and labels each result with the version (and the product for the api and the runner) it comes from, so the duplicates are distinguishable. Translated into 简体中文 and 繁體中文.
- Pagefind's own filter panel is hidden, it is redundant next to the checkbox and starlight does not style it. The checkbox gets its native rendering back, pagefind resets everything it renders with `all: unset`.
- A `gitea-pagefind-filters-check` integration fails the build if the redirect did not run, so a starlight upgrade that moves the import cannot silently bring back an unscoped search.

`@pagefind/default-ui` is added to `sites/docs/package.json`; it was only reachable as a transitive dependency of starlight, and the version is the one already in the lockfile.

**Verification**

Built the whole site and drove the search with a headless browser against `astro preview` (the search does not run in `pnpm dev`):

| Page | Query | Results |
| --- | --- | --- |
| `/1.23/usage/actions/comparison/` | email | only `/1.23/...` |
| `/usage/actions/overview/` | email | only the version served at the root |
| `/runner/registration/` | label | only `/runner/...` |
| `/api/operations/tags/issue/` | label | only `/api/...` |
| `/zh-cn/1.26/usage/actions/overview/` | email | only `/zh-cn/1.26/...` |
| `/1.23/...` with the checkbox ticked | email | every version, results labelled `... · API 1.25`, `... · next` |

`pnpm check` passes. The docsearch path is unchanged: when the credentials are set the plugin takes over, the redirect does not run and the check integration skips.

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/512
2026-08-14 04:19:47 +00:00
Lunny Xiao 362878dfba Redirect the legacy docs urls the s3 bucket used to serve (#507)
## Problem

`https://docs.gitea.com/help/seek-help` returns 404. It is still linked as the
*Support* item of the blog.gitea.com navbar, and it is not the only url in that
state: `/usage/webhooks`, `/usage/agit`, `/usage/protected-tags` and
`/usage/repo-mirror` are linked from gitea itself and 404 as well.

## Root cause

Not a rendering problem of the new site: those pages were moved years ago.
`docs/help/seek-help.md` became `docs/help/support.md` in 2023 (`slug: support`),
and the flat `/usage/<page>`, `/advanced/<page>`, `/developers/<page>` layout of
1.19 and 1.20 was reorganized into `usage/repository/`, `administration/` and
`development/`.

The old urls kept working because the site was published to S3 with
`aws s3 sync` **without** `--delete`: every page built before a move stayed in
the bucket and CloudFront kept serving it. The archived copy of
`/help/seek-help` still carries `last-modified: Wed, 12 Jul 2023` - the file was
six years stale but reachable.

The Astro deployment publishes to Cloudflare Pages, which only serves what the
current build emits, so all of those leftovers disappeared at once.

I crawled the urls the Wayback Machine has for `docs.gitea.com` and checked them
against the live site: 335 non-removed-version urls 404 today, and they are all
of this kind.

## Fix

301s in `cloudflare/_redirects`, from every legacy url that has a current
equivalent to that page, generated for the root, the `zh-cn` and `zh-tw`
prefixes and the `next` (develop) version. Also the runner docs that were
published under a full version number (`/runner/0.2.11/`, `/runner/1.0.8/`) and
`/runner/next/`, which is `/runner/develop/` now.

Checked while generating them, against a full local build:

- no rule shadows a page that exists today - the zh translations of `usage/agit`
  and `usage/profile-readme` were never moved, so they are still served at the
  old path and are left alone
- every target resolves to a page that exists, in the language and version the
  rule redirects within
- no duplicated source, 417 static and 10 dynamic rules, well inside the
  Cloudflare Pages limits (2100 / 100)

## Out of scope

- `/contributing/*`, `/developers/guidelines-*` and `/developers/hacking-on-gitea`
  404 too, but those pages moved to the gitea repository, there is nothing on
  docs.gitea.com to point them at.
- The `aliases:` frontmatter of the sources (`/en-us/seek-help`, `/webhooks`,
  ...) is a leftover of the Hugo site. Docusaurus ignored it and so does the
  Astro build; those urls have been 404 for years and are not resurrected here.
- The blog.gitea.com navbar should link to `/help/support` directly, that needs a
  pull request against gitea/blog.

Reviewed-on: https://gitea.com/gitea/docs/pulls/507
Reviewed-by: bircni <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-13 08:41:39 +00:00
Lunny Xiao 6e06ee3216 update runner version (#506)
Replace `3.x` to the latest version of that series.

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/506
Reviewed-by: Zettat123 <[email protected]>
2026-08-12 20:32:47 +00:00
Lunny Xiaoandbircni b137a0e0e1 Rebuild the site with Astro and Starlight (#496)
Replace [#307](https://gitea.com/gitea/docs/issues/307)
Closes [#237](https://gitea.com/gitea/docs/issues/237)

## Summary

Rebuilds docs.gitea.com with [Astro](https://astro.build) and [Starlight](https://starlight.astro.build), replacing Docusaurus. Every
published url keeps working and no content file was moved: the site is a new rendering layer over the existing `docs/`, `versioned_docs/`, `i18n/`, `runner-docs/` and `static/swagger-*.json` trees.

For the first time the API reference is part of the site rather than a Redoc
bundle: all seven swagger documents are rendered into real pages, one per
operation, so they are linkable, crawlable and searchable.

## Why

- the Docusaurus build needs an 8 GB heap and about 2 minutes for 2478 pages;
  the Astro build produces 5751 pages, API reference included, in about 100
  seconds
- the API reference was a single client rendered Redoc page per version, absent
  from the site search and from search engines
- sidebars, version lists and language lists were configured in three different
  places and drifted apart

## What is in here

- **`packages/content-loader`** — the product × version × language matrix
  (`products.ts`) and an Astro content loader that reads the existing markdown
  trees directly. The matrix is the single source of truth: content loading,
  sidebars, the version and language pickers, the version banner, the search
  facets and the API schemas are all derived from it.
- **Content compatibility** — frontmatter `slug`, `sidebar_position` and
  `sidebar_label` keep working, `_category_.json` still drives sidebar labels,
  order and the generated category pages, `@version@` style release variables are
  still substituted, `:::note` admonitions become Starlight asides and the 2778
  relative `*.md` links are rewritten to urls while the site is built.
- **API reference** — `starlight-openapi` renders the seven swagger documents.
  Operation urls are hyphenated (`/api/operations/list-admin-workflow-jobs/`),
  the sidebar shows the operations of the version being read with a coloured
  HTTP method badge, and the overview page links to one page per tag instead of
  repeating all 484 operations.
- **Navigation** — a version picker that follows the reader to the same page in
  another version, a language picker that only offers the languages the current
  product is published in, and product links for Docs, API, Runner and
  Enterprise.
- **Theme** — the light and dark palettes of about.gitea.com, mapped onto the
  Starlight variables.
- **Search** — Pagefind by default; Algolia DocSearch takes over when
  `PUBLIC_DOCSEARCH_APP_ID` and `PUBLIC_DOCSEARCH_API_KEY` are set. Every page
  carries `docsearch:product`, `docsearch:version` and `docsearch:language` meta
  tags, so a search stays inside what is being read.
  `cloudflare/docsearch-crawler.json` holds the crawler configuration.

## Bugs fixed along the way

- `GET /user/applications/oauth2` and `GET /user/applications/oauth2/{id}` have
  operation ids that only differ in case, so they collapsed onto the same url
  and one of the two pages was silently dropped. They are now
  `user-get-oauth2-application` and `user-get-oauth2-application-by-id`.
- The API overview and every tag page were all titled "Overview".

## Url compatibility

The routes of both builds were compared page by page during the migration with
`scripts/url-diff.mjs`:

```
identical: 2368, missing: 0, accepted: 110, added: 3292
```

The 110 accepted ones are all redirected in `cloudflare/_redirects`: the
localized copies of the English-only API and Runner docs, the Docusaurus search
page, and `/1.27/`, `/runner/3/`, `/api/1.27/` which are aliases of the versions
served at the product root. The added ones are the API operation and tag pages
plus the routes the Starlight language fallback serves in English when a
translation is missing — Docusaurus answered those with a 404.

## Workflows

- `checks` builds the site and type checks it on every pull request
- `Build and Publish Docs site` publishes `sites/docs/dist` to S3/CloudFront and
  to Cloudflare Pages, and copies `cloudflare/_headers` and
  `cloudflare/_redirects` into the deployment
- `update swagger files` and `update runner reference` are unchanged, they only
  touch content
- `make cut-version PRODUCT=docs VERSION=1.28` replaces
  `docusaurus docs:version`

## Removed

`docusaurus.config.js`, the swizzled theme under `src/`, and the Docusaurus UI
translations (`i18n/*/code.json`, `i18n/*/docusaurus-theme-classic/`). The
strings those carried — the product names, the footer column titles and the
outdated translation notice — were ported to
`sites/docs/src/config/strings.ts`; Starlight ships the rest of its interface in
both Chinese locales. The documentation content itself is untouched.

## Follow ups

- nine relative links are broken in the sources and reported by every build, the
  same ones Docusaurus warned about; `GITEA_DOCS_STRICT_LINKS=true` turns them
  into an error once they are fixed
- `cloudflare/worker.js` has to be deployed for `/enterprise/` to keep resolving
- the Algolia index has to be created and crawled before the search credentials
  are set

## Testing

```shell
make install
make serve-fast   # english, the version served at the root
make serve        # the whole matrix
make build        # 5751 pages
make check        # 0 errors
make serve-built  # build and serve, the only way to try the search locally
```

## Screenshots

<img width="1371" alt="image.png" src="attachments/69acdd77-cc89-4635-a8bd-1163a34afa86">

<img width="1810" alt="image.png" src="attachments/76212416-4825-4b4d-bf59-3e549900c96f">

<img width="1789" alt="image.png" src="attachments/7be84cda-5abe-48bd-8839-7ae1ee7806e7">

---------

Co-authored-by: bircni <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/496
Reviewed-by: bircni <[email protected]>
2026-08-12 20:03:29 +00:00
Lunny Xiao efd26a3d61 Deploy a Cloudflare Pages preview for pull requests (#498)
Pull requests now get a Cloudflare Pages preview deployment after the site build succeeds, and the preview URL is written back as the last line of the pull request description.

- `concurrency` cancels the previous preview build when a pull request is pushed again.
- After `make build`, the workflow copies `cloudflare/_headers` into `build/` (same as the production deployment, so the file is never published to S3/CloudFront) and runs `wrangler pages deploy build --project-name docs-gitea-com --branch pr-<number>`, then extracts the `*.pages.dev` URL from the wrangler output.

Notes:
- Pull requests from forks do not receive the secrets, in that case the preview steps are skipped with a log message and the build check still runs.
- Requires `CLOUDFLARE_ACCOUNT_ID` / `CLOUDFLARE_API_TOKEN` (Pages edit permission) and `DEPLOY_TOKEN` (pull request write permission).

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

Reviewed-on: https://gitea.com/gitea/docs/pulls/498
Reviewed-by: Zettat123 <[email protected]>
2026-08-10 01:57:33 +00:00
Lunny Xiao 0c62ec4893 Add runner 2 and 3 documentations (#488)
Reviewed-on: https://gitea.com/gitea/docs/pulls/488
Reviewed-by: silverwind <[email protected]>
2026-08-07 21:02:26 +00:00
Lunny Xiao 7629c02a9a Fix missing scrollbar in API search results (#480)
Fixes #257

Co-authored-by: Lunny Xiao <[email protected]>
2026-08-07 16:15:16 +00:00
Lunny Xiao d52470782b chore: update size unit (#485)
Fix #207

Reviewed-on: https://gitea.com/gitea/docs/pulls/485
Reviewed-by: silverwind <[email protected]>
2026-08-03 23:20:33 +00:00
Lunny Xiao f47fdce6c8 chore: update path (#486)
Fix #34

Reviewed-on: https://gitea.com/gitea/docs/pulls/486
Reviewed-by: silverwind <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-08-03 15:39:27 +00:00
Lunny Xiao bc795ac24a Fix the swagger update cron job (#481)
The scheduled `update swagger files` job has failed on **every** run since it was added (I checked the run list on gitea.com, ~250 consecutive failures). Two reasons:

1. Upstream moved the file: `go-gitea/gitea` main no longer has `templates/swagger/v1_json.tmpl`, it is now `templates/swagger/v1-swagger.generated.json`, and the placeholders changed from `{{.SwaggerAppVer}}` / `{{.SwaggerAppSubUrl}}` to `0.0.0+GITEA-API-APP-VERSION` / `/GITEA-API-APP-SUBURL/api/v1`. Because the script used `curl --silent` without `--fail`, the 404 body was written into `static/swagger-latest.json`.
2. `main` is protected (`required_approvals=1`), so the job's `git push` to main could never succeed.

Changes:

- `update_api_docs.sh`: `set -euo pipefail`, download with `--fail` (a broken download now aborts instead of committing garbage), try the new generated json first and fall back to the old template for released tags, handle the 1.28+/1.24+/<1.24 placeholder variants, and add a `--latest-only` flag.
- `Makefile`: new `update-api-docs-latest` target for the cron job; `clean` no longer deletes the committed `static/swagger-*.json` files (deleting them breaks `make build`).
- `.gitea/workflows/update_swagger.yaml`: every 12h (plus `workflow_dispatch`) it regenerates only `static/swagger-latest.json`, verifies no placeholder is left and the file is valid JSON, force pushes to `bot/update-swagger-latest` and opens a pull request via the API (HTTP 409 = a PR is already open, it just now points at the new commit). It skips entirely when the bot branch already carries the same file, so no PR churn.
- `README.md`: document the two make targets and the automation.

`secrets.DEPLOY_TOKEN` must belong to a real user with `write:repository` so the PR checks are triggered; the job fails with a clear message if it is empty.

Tested locally in a scratch clone: `make update-api-docs-latest` produces a valid `dev` spec with no placeholders left, `make update-api-docs` still regenerates all released versions, and the workflow shell logic was simulated against a local bare repo for all three paths (open PR / bot branch already up to date / main already up to date), including a shallow clone to confirm `fetch-depth: 1` force pushes work.

Fixes #454

Reviewed-on: https://gitea.com/gitea/docs/pulls/481
Reviewed-by: techknowlogick <[email protected]>
2026-08-02 23:25:17 +00:00
Lunny Xiao a1ef3a26ef Remove duplicated runner docs (#479)
The `usage/actions/runner` has duplicated runner documentations as `/runner`. This PR remove the duplicated content and leave obtain registry token in `usage/actions/runner` and runner install/configurations in `/runner`.

Reviewed-on: https://gitea.com/gitea/docs/pulls/479
Reviewed-by: silverwind <[email protected]>
2026-08-02 21:53:31 +00:00
Lunny Xiao 42a0f7f45f Fix navbar links and hide runner's development (#477)
Reviewed-on: https://gitea.com/gitea/docs/pulls/477
2026-08-01 19:49:44 +00:00
Lunny Xiao a7e2060a6a 1.27.1 (#476)
1.27.1 (gitea/docs#476)

Co-authored-by: Lunny Xiao <[email protected]>
2026-07-28 17:27:12 +00:00
Lunny Xiao 31c6782d0c Add Cloudflare Pages cache headers for static assets (gitea/docs#473)
Co-authored-by: Lunny Xiao <[email protected]>
2026-07-27 20:30:17 +00:00
Lunny Xiao 02f6e1753a update version 1.27.0 (#464)
Reviewed-on: https://gitea.com/gitea/docs/pulls/464
Reviewed-by: Nicolas <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
2026-07-14 20:06:28 +00:00
965c269495 Update zh tw languages and fix some broken links (#455)
---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: silverwind <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/455
Reviewed-by: silverwind <[email protected]>
2026-07-09 23:41:46 +00:00
Lunny Xiao 6a3f75f060 sync customizing gitea (#458)
Reviewed-on: https://gitea.com/gitea/docs/pulls/458
2026-07-08 04:58:43 +00:00
Lunny Xiao 1033f033bc Add 1.27 rc0 documentation (#453)
Reviewed-on: https://gitea.com/gitea/docs/pulls/453
Reviewed-by: Zettat123 <[email protected]>
2026-07-01 17:14:52 +00:00
Lunny Xiao 7fe73e351f release to cloudflare as well (#448)
Reviewed-on: https://gitea.com/gitea/docs/pulls/448
2026-06-28 03:29:01 +00:00
Lunny Xiao c677b5da29 update 1.26.3 (#442)
Reviewed-on: https://gitea.com/gitea/docs/pulls/442
Reviewed-by: Nicolas <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2026-06-21 07:50:31 +00:00
Lunny Xiao 21aad7f5d1 update 1.26.2 (#424)
Reviewed-on: https://gitea.com/gitea/docs/pulls/424
Reviewed-by: Nicolas <[email protected]>
2026-05-20 21:59:25 +00:00
54af905d63 rename act runner to runner (#390)
Depends on gitea/runner#850

---------

Co-authored-by: Nicolas <[email protected]>
Co-authored-by: silverwind <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/390
Reviewed-by: techknowlogick <[email protected]>
Reviewed-by: silverwind <[email protected]>
Reviewed-by: Nicolas <[email protected]>
2026-05-07 17:18:58 +00:00
Lunny Xiao 14b76120b4 update webhook documentation (#393)
Reviewed-on: https://gitea.com/gitea/docs/pulls/393
2026-05-01 16:40:27 +00:00
Lunny Xiao 49a6f7649a update 1.26.1 2026-04-25 11:28:59 -07:00
Lunny Xiao fd5cb8bb44 Follow blog to use blue color for links (#385)
Reviewed-on: https://gitea.com/gitea/docs/pulls/385
Reviewed-by: silverwind <[email protected]>
2026-04-20 17:36:38 +00:00
Lunny Xiao b5e28002f4 release 1.26.0 (#384)
Reviewed-on: https://gitea.com/gitea/docs/pulls/384
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2026-04-19 00:46:51 +00:00
Lunny Xiaoandsilverwind a7ab7af00f Add v1.26 documentation (#376)
Co-authored-by: silverwind <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/376
Reviewed-by: silverwind <[email protected]>
2026-04-09 19:27:32 +00:00
Lunny Xiao 162127170b upgrade to 1.25.5 2026-03-16 17:06:04 -07:00
Lunny Xiao 066080cf7b Add documentation for ssh keys for http access (#336)
Fix #331

Reviewed-on: https://gitea.com/gitea/docs/pulls/336
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2026-02-08 21:05:42 +00:00
Lunny Xiao feca0d2d17 Update to 1.25.4 2026-01-22 12:18:11 -08:00
Lunny Xiao 0b31573d47 upgrade 1.25.2 -> 1.25.3 2025-12-18 11:09:05 -08:00
Lunny Xiao d4181abf75 Upgrade to 1.25.2 (#306)
Reviewed-on: https://gitea.com/gitea/docs/pulls/306
2025-11-23 19:23:37 +00:00
Lunny Xiao d3d546fa3b Fix updating swagger failure caused by no content to change 2025-11-23 10:59:46 -08:00
Lunny Xiao cd0347dc76 make update_api_docs.sh work for macOS 2025-11-23 10:53:03 -08:00
Lunny Xiao 826ff60fd4 Add missing translations (#305)
Reviewed-on: https://gitea.com/gitea/docs/pulls/305
2025-11-23 07:13:19 +00:00
Lunny Xiao 2e86ec6898 Fix ci 2025-11-22 21:09:13 -08:00
Lunny Xiao ce76fd3b2e Fix ci 2025-11-22 21:04:31 -08:00
Lunny Xiao 4ddfcd6aaf Remove outdated versions and keep the latest 5 versions(include the current developing version and latest 4 stable versions (#304)
Resolve #302

Reviewed-on: https://gitea.com/gitea/docs/pulls/304
Reviewed-by: delvh <[email protected]>
2025-11-22 05:36:55 +00:00
Lunny Xiao df8b7a7581 Upgrade docusarus and fix broken links (#301)
Reviewed-on: https://gitea.com/gitea/docs/pulls/301
2025-11-20 22:02:05 +00:00
Lunny Xiao 9baa98ec3f Move usage directories (#300)
Reviewed-on: https://gitea.com/gitea/docs/pulls/300
2025-11-20 19:49:24 +00:00
Lunny Xiao c05b0cec34 Add protected branches usage documentation (#298)
Fix https://github.com/go-gitea/gitea/issues/35972

Reviewed-on: https://gitea.com/gitea/docs/pulls/298
2025-11-20 18:07:29 +00:00
Lunny Xiao dcb9b9b450 Use category instead of place holder markdown file as directory (#299)
Reviewed-on: https://gitea.com/gitea/docs/pulls/299
2025-11-20 18:02:34 +00:00
Lunny Xiao 7e8cd4df86 upgrade to 1.25.1 2025-11-04 13:21:39 -08:00
Lunny Xiao 7d50e32ba8 Add 1.25.0 documentation (#289)
Reviewed-on: https://gitea.com/gitea/docs/pulls/289
2025-11-01 06:48:53 +00:00
Lunny Xiao cf9b8dce28 uprade 1.24.7 2025-10-25 21:03:20 -07:00
Lunny Xiao de6d4374b0 Upgrade to 1.24.6 2025-09-11 20:20:46 -07:00
Lunny Xiao c699d12a55 upgrade to 1.24.5 2025-08-14 18:52:32 -07:00
Lunny Xiao c13d82ccc3 Update gpg check command to use hkps by default (#260)
Fix #255

Reviewed-on: https://gitea.com/gitea/docs/pulls/260
2025-08-12 16:57:24 +00:00
Lunny Xiao 03c98878cf upgrade to 1.24.4 2025-08-04 17:00:13 -07:00
Lunny Xiao 47594bba97 upgrade gitea to 1.24.3 2025-07-15 09:44:13 -07:00
Lunny Xiao 870f30e886 upgrade to 1.24.2 2025-06-21 10:13:34 -07:00
Lunny Xiao 33ec7a49df upgrade to 1.24.1 2025-06-19 15:31:41 -07:00
Lunny Xiao c8ebd4e896 Fix latest stable version 2025-06-10 15:46:23 -07:00
Lunny Xiao e1ed1a6280 Upgrade Gitea from 1.23.7 -> 1.23.8 2025-05-13 09:51:20 -07:00
Lunny Xiao 6e63ddb901 Add 1.24.0-rc0 documentation (#220)
Reviewed-on: https://gitea.com/gitea/docs/pulls/220
2025-05-05 16:47:20 +00:00
Lunny Xiao 1d51bc6814 Update token scopes example (#215)
Reviewed-on: https://gitea.com/gitea/docs/pulls/215
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-04-26 04:27:13 +00:00
Lunny Xiao eed3454a8a Update token scopes example (#214)
Reviewed-on: https://gitea.com/gitea/docs/pulls/214
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-04-26 04:21:26 +00:00
Lunny Xiao ae186bfdcc Update to 1.23.7 2025-04-07 15:41:45 -07:00
Lunny Xiao abc5be48cc Fix language selection 2025-04-04 18:45:25 -07:00
Lunny Xiao ba60733fd9 upgrade to gitea 1.23.6 2025-03-24 14:53:49 -07:00
Lunny Xiao 41bc13f04f Release of Gitea 1.23.5 (#177)
Reviewed-on: https://gitea.com/gitea/docs/pulls/177
2025-03-05 01:28:46 +00:00
Lunny Xiao 045ad3fd8c Add missing cron items content (#174)
Reviewed-on: https://gitea.com/gitea/docs/pulls/174
2025-02-25 20:13:15 +00:00
Lunny Xiao ed742f54da Fix ci 2025-02-19 15:40:23 -08:00
Lunny Xiao 235e1199d8 Fix ci 2025-02-19 15:37:15 -08:00
Lunny Xiao 674911fecd Fix ci 2025-02-19 11:56:34 -08:00
Lunny Xiao bc2618cea3 Fix ci 2025-02-19 11:37:23 -08:00
Lunny Xiao 88ff15b0f5 Fix ci 2025-02-19 11:30:35 -08:00
Lunny Xiao 04b38c7f3a Fix ci 2025-02-19 11:26:48 -08:00
Lunny Xiao bb149ae308 upgrade to 1.23.4 2025-02-19 11:05:44 -08:00
Lunny Xiao 452b13ec63 upgrade to 1.23.3 (#168)
Reviewed-on: https://gitea.com/gitea/docs/pulls/168
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-02-06 19:34:36 +00:00
Lunny Xiao cea3a053b7 upgrade to 1.23.2 (#166)
Reviewed-on: https://gitea.com/gitea/docs/pulls/166
Reviewed-by: techknowlogick <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-02-05 21:50:46 +00:00
Lunny Xiao bbbb9091bf Update act runner status (#163)
Fix #162

Reviewed-on: https://gitea.com/gitea/docs/pulls/163
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-01-29 05:12:05 +00:00
Lunny Xiao 1ddf6a1822 upgrade to 1.23.1 (#148)
Reviewed-on: https://gitea.com/gitea/docs/pulls/148
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2025-01-10 18:58:33 +00:00
Lunny Xiao e691a131c1 Follow #75 to update all variables (#135)
Reviewed-on: https://gitea.com/gitea/docs/pulls/135
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2024-12-27 00:58:11 +00:00
Lunny Xiaoandkerwin612 433c930127 Introduce runner documentations (#133)
This PR introduces documentation for Runner.

<img width="959" alt="图片.png" src="attachments/5ad6a8af-d799-4718-9d33-56bf91a8852e">

Co-authored-by: kerwin612 <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/133
Reviewed-by: Bo-Yi Wu (吳柏毅) <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2024-12-26 23:44:25 +00:00
Lunny Xiao 2b9cc256ea Remove compare with Gogs because of the Gogs development is almost stopped (#124)
Reviewed-on: https://gitea.com/gitea/docs/pulls/124
Reviewed-by: Bo-Yi Wu (吳柏毅) <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Co-committed-by: Lunny Xiao <[email protected]>
2024-12-16 17:14:08 +00:00
Lunny Xiao dc2b857cac Upgrade to 1.22.6 2024-12-13 00:09:11 -08:00
Lunny Xiao 869fb8d4e5 Upgrade to 1.22.5 2024-12-11 13:05:31 -08:00
Lunny Xiao 3e404a348f Upgrade to 1.22.4 (#109)
Reviewed-on: https://gitea.com/gitea/docs/pulls/109
2024-11-26 04:38:25 +00:00
Lunny Xiao 1edaf07b36 Update comparasion because of merge queue has been implemented. (#104)
Since https://github.com/go-gitea/gitea/pull/9307 and https://github.com/go-gitea/gitea/pull/19648, merge queue has been introduced.

Reviewed-on: https://gitea.com/gitea/docs/pulls/104
2024-11-25 21:10:09 +00:00
Lunny Xiao fc7bdfc7b6 Improve the signing documentations (#108)
Reviewed-on: https://gitea.com/gitea/docs/pulls/108
2024-11-25 05:36:44 +00:00
Lunny Xiao ddc1db3637 Move authentication from usage to administration (#105)
Reviewed-on: https://gitea.com/gitea/docs/pulls/105
2024-11-24 02:32:42 +00:00
Lunny Xiao 8d114d7c6b Add license back following the content when it moved from main repository 2024-11-06 12:04:06 -08:00
Lunny Xiao 05271fd4e6 Update faq for actions to correct wrong documentations. (#85)
- [x] User-level runners are supported from 1.20
- [x] Actions are enabled by default from 1.21

Reviewed-on: https://gitea.com/gitea/docs/pulls/85
2024-10-28 18:04:52 +00:00
Lunny Xiao 5bfca46fd6 Merge branch 'main' into lunny/update_agit_forcepush 2024-10-22 06:42:24 +00:00
Lunny Xiao 5f07f6c79a Update old versions 2024-10-11 00:06:36 -07:00
Lunny Xiao 6fc2decd0c update agit forcepush 2024-10-11 00:02:19 -07:00
Lunny Xiao 610e9d0e1c Disable docusarus cache 2024-10-09 11:36:02 -07:00
Lunny Xiao 16ae5821e7 Fix docuactions cache moved 2024-10-09 11:34:47 -07:00
Lunny Xiao d2ff4a6117 more changes 2024-10-08 23:03:32 -07:00
Lunny Xiao 610b028ba9 upgrade to 1.22.3 2024-10-08 21:39:53 -07:00