moonming opened a new pull request, #2087: URL: https://github.com/apache/apisix-website/pull/2087
An SEO audit of the live site found the Chinese tree's indexing polarity inverted: the pages that deserve to rank were suppressed, and near-duplicates were promoted. Three fixes, all verified against live URLs. ## Chinese plugin docs canonicalised to a page with no Chinese edition `/zh/docs/apisix/plugins/limit-count/` serves `lang="zh-CN"` with 3,052 CJK characters — a real translation — and carried: ```html <link rel="canonical" href="https://docs.api7.ai/hub/limit-count"> ``` `https://docs.api7.ai/zh/hub/limit-count` returns **404**. So the page was telling search engines to index an English page instead of itself, and nothing exists to rank in its place for Chinese queries. A developer searching "APISIX limit-count 限流" cannot find the translation that exists. They now canonicalise to `docs.apiseven.com`, the Chinese edition of the same hub. Verified: all six sampled targets return 200 and serve `lang="zh"` with Chinese content (`/hub/limit-count` has 3,308 CJK characters). **English pages are unchanged** — that policy is deliberate and works, because the English target exists. This also fixes the one canonical pointing at a dead URL: `docs.api7.ai/hub/feishu-auth` is 404; `docs.apiseven.com/hub/feishu-auth` is 200. ## 18 untranslated Chinese learning-center articles Every one of the 18 was English text in a Chinese wrapper. Measured across all of them: | | | |---|---| | CJK characters in body | 18–26 (all from the UI chrome) | | English words | 1,127–2,622 | | Title vs the English page | **byte-identical, 18/18** | | canonical | self-referential | | In `/zh/sitemap.xml` | yes | Three costs: they were near-duplicate competitors to the site's highest-value commercial pages (`apisix-vs-kong`, `what-is-an-api-gateway`, `kubernetes-api-gateway`); Chinese readers who landed on one got English prose; and `lang="zh-CN"` told browsers and AI assistants the page was already Chinese, so they would not offer to translate it — worse than serving the English URL outright. The pages are no longer built. `/zh/learning-center/` still exists, lists the English articles, and says so in its subtitle. The indexed URLs 301 to their English equivalents, so nothing 404s. ## Docs images caused layout shift `/docs/apisix/plugins/openid-connect/` emitted eight `<img>` tags with no dimensions and no loading hint — 235 KB of diagrams, all fetched eagerly, each shifting the article as it landed. Blog and learning-center images are already 100% dimensioned; this was specific to the markdown→HTML docs path. A remark plugin adds `loading="lazy"` and `decoding="async"`. Remote images have no build-time intrinsic size, so `.prose img` reserves a 16/9 block, overridden when an image declares its own `width`/`height`. ## Verification Built locally: zh canonical → `docs.apiseven.com` ✅, EN unchanged ✅, 8/8 docs images lazy ✅, zh learning-center down to the index alone with 9/9 cards linking to English ✅, `/zh/sitemap.xml` 599 → 581 URLs (exactly the 18 removed) ✅, and the 301 pattern tested to leave `/zh/learning-center/` itself untouched. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
