fix(seo): shorten title tag suffix to prevent truncation in search results#2017
Merged
Yilialinn merged 1 commit intoapache:masterfrom Apr 12, 2026
Merged
Conversation
…sults The site title was 'Apache APISIX® -- Cloud-Native API Gateway and AI Gateway' (57 chars), which left almost no room for page-specific titles within Google's ~60 character display limit. Every page title was being truncated in search results, hurting CTR. Before: 'Getting Started | Apache APISIX® -- Cloud-Native API Gateway...' After: 'Getting Started | Apache APISIX' Changes: - Shorten siteConfig.title to 'Apache APISIX' in all 4 Docusaurus configs (website, doc, blog/en, blog/zh) - Add explicit <title> to homepage (index.tsx) to preserve the full keyword-rich title for the homepage specifically - Update contribute.tsx hard-coded <title> to use shorter suffix - Update ai-gateway.tsx og:site_name to match The tagline, meta description, and navbar title are unchanged.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Docusaurus site configuration and select page-level <Head> overrides to shorten the global siteConfig.title suffix (to reduce title-tag truncation in search results), while preserving a longer, keyword-rich homepage title where needed.
Changes:
- Shorten
titlein multiple Docusaurus config files toApache APISIX. - Add an explicit homepage
<title>and adjust select page metadata (contribute,ai-gateway) to align with the new title strategy. - Update AI Gateway
og:site_nameto match the new shortened site title.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| website/src/pages/index.tsx | Adds explicit homepage <title> via <Head> to preserve the long marketing title. |
| website/src/pages/contribute.tsx | Shortens the contribute page <title> suffix. |
| website/src/pages/ai-gateway.tsx | Updates og:site_name to the shortened site title. |
| website/docusaurus.config.js | Shortens global Docusaurus title for the main website. |
| doc/docusaurus.config.js | Shortens global Docusaurus title for the docs site. |
| blog/en/docusaurus.config.js | Shortens global Docusaurus title for the EN blog site. |
| blog/zh/docusaurus.config.js | Shortens global Docusaurus title for the ZH blog site. |
Comments suppressed due to low confidence (1)
website/src/pages/index.tsx:53
<title>andtwitter:titleuse different punctuation (--vs-). This can lead to inconsistent titles between the page title and Twitter cards; align these strings (or generate both from a shared constant) to keep metadata consistent.
<title>Apache APISIX® -- Cloud-Native API Gateway and AI Gateway</title>
<meta
name="twitter:title"
content="Apache APISIX® - Cloud-Native API Gateway and AI Gateway"
/>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Baoyuantop
approved these changes
Apr 10, 2026
Yilialinn
approved these changes
Apr 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shorten the site title from 57 characters to 13 characters so page titles are no longer truncated in Google search results.
Problem
The site title (
siteConfig.title) was:This 57-character string is appended to every page title via Docusaurus' default template:
{pageTitle} | {siteTitle}. Since Google displays ~60 characters for title tags, virtually every page title was truncated:Getting Started | Apache APISIX® -- Cloud-Nat...limit-count | Apache APISIX® -- Cloud-Native...Free tier API with Apache APISIX | Apache API...Truncated titles hurt click-through rates (CTR) because users cannot see the full page title or brand name.
Changes
website/docusaurus.config.jstitle->'Apache APISIX'doc/docusaurus.config.jstitle->'Apache APISIX'blog/en/docusaurus.config.jstitle->'Apache APISIX'blog/zh/docusaurus.config.jstitle->'Apache APISIX'website/src/pages/index.tsx<title>to preserve full keyword-rich homepage titlewebsite/src/pages/contribute.tsx<title>suffixwebsite/src/pages/ai-gateway.tsxog:site_nameto matchResult
Apache APISIX® -- Cloud-Native API Gateway and AI GatewayApache APISIX® -- Cloud-Native API Gateway and AI Gateway(unchanged, explicit)Getting Started | Apache APISIX® -- Cloud-Nat...Getting Started | Apache APISIX(31 chars)Free tier API with Apache APISIX | Apache API...Free tier API with Apache APISIX | Apache APISIX(49 chars)APISIX AI Gateway - LLM Proxy...<title>)The
tagline,meta description, andnavbar.titleare all unchanged.