mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
## 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]>