fix(seo): SEO 优化:修复 canonical 冲突、添加结构化数据、补充多语言 description、优化 sitemap 和更新时间#100
Open
live-alife wants to merge 31 commits into
Open
fix(seo): SEO 优化:修复 canonical 冲突、添加结构化数据、补充多语言 description、优化 sitemap 和更新时间#100live-alife wants to merge 31 commits into
live-alife wants to merge 31 commits into
Conversation
- 修复 canonical URL,从固定指向根目录改为指向当前页面 - 动态生成 hreflang 标签,指向当前页面的各语言版本 - 新增 x-default hreflang,无匹配语言时默认展示英文版本
- 删除 KEYWORDS 常量定义 - 从 metadata 中移除 keywords 字段 - 主流搜索引擎已不再使用 keywords 标签
- quickstart: 5 分钟入门指南 - common-workflow: 常见工作流概览 - integration-vscode: VS Code 扩展介绍 - integration-zed: Zed 编辑器集成 - integration-jetbrains: JetBrains IDE 集成 - integration-github-action: GitHub Actions 自动化
- 每个 description 包含品牌词 Qwen Code + 页面主旨 - 加入行动号召词、长尾关键词提升搜索点击率 - 控制长度在 150-160 字符以内 - 涵盖: approval-mode, arena, channels, checkpointing, code-review, commands, dual-output, followup-suggestions, headless, hooks, language, lsp, mcp, memory, sandbox, scheduled-tasks, skills, status-line, sub-agents, tips, token-caching, tool-use-summaries
- configuration/: auth, model-providers, qwen-ignore, settings, themes, trusted-folders - extension/: introduction, getting-started-extensions, extension-releasing - reference/: keyboard-shortcuts - support/: tos-privacy, troubleshooting, Uninstall - 每个 description 包含品牌词 + 页面主旨 + 行动号召词
- design/ 目录 16 个文件:涵盖内存系统、频道设计、紧凑模式、子代理、命令重构等技术设计文档 - developers/ 目录 27 个文件:涵盖架构概览、贡献指南、SDK 文档、工具参考等开发者文档 - plans/ 目录 1 个文件:Agent Tool Display 实现计划 - 所有 description 包含品牌词 Qwen Code、页面主旨、行动号召词和长尾关键词 - 跳过隐藏的 examples/ 目录(sidebar 中设为 hidden)
- 将 markdown 图片语法 ![] 改为 HTML <video> 标签 - 添加 controls 属性允许用户控制播放 - 添加 width 属性控制视频宽度 - 添加浏览器不支持时的降级文本 - 解决了 alt 文本为空的 SEO 问题
- 添加 aria-label 无障碍描述属性 - 添加 margin-top 样式解决与代码块间距过近问题 - 移除浏览器不支持的降级文本(2026年已无必要)
- 新增 og-blog.svg、og-showcase.svg 专属图片 - 新增 og-fallback-brand.png 作为其他目录的兜底图片 - 更新 page.jsx 的 OG 图片映射逻辑,支持按目录自动选择
- 新增 getGitLastModified() 函数获取文件最后 git commit 时间 - 每个文档页面的 lastModified 现在反映真实修改时间 - 帮助搜索引擎更准确判断页面更新频率
- 在跳转页面添加 <link rel="canonical"> 标签 - 明确告诉搜索引擎 qwen.ai/qwencode 是真正的首页 - 帮助权重传递,改善 SEO 友好度
- 移除全局默认 canonical,避免首页生成重复规范链接 - 使用页面级 metadata 声明 qwen.ai/qwencode 为首页 canonical - sitemap 支持 .mdx 内容,补齐博客和 showcase 收录入口 - 移除根路径跳转页,减少搜索引擎抓取噪音
- 新增 withBasePath 工具,统一生成带部署子路径的资源地址 - 修复 favicon 和 manifest 在 /qwen-code-docs 子路径下的引用 - 更新导航 logo 资源路径,避免生产环境请求到域名根目录 - 保持本地开发环境继续使用根路径资源
- 在页面缺少 frontmatter description 时从正文提取摘要 - 跳过 frontmatter、代码块、导入语句、图片和组件内容 - 同步补齐 openGraph 和 twitter 的描述信息 - 将重复使用全站默认描述的页面数量从 591 降至 24
- 为第一批核心入口页补充手写 SEO description - 保留已有英文页面描述,不覆盖既有优化内容 - 确保新增描述包含 Qwen Code 品牌词和页面主旨 - 覆盖文档首页、IDE 集成、展示页和中文高意图功能页
- 为德法俄日葡 5 种语言的核心入口页补充手写 SEO description - 覆盖首页、快速开始、认证、设置、MCP、Skills、命令、IDE、博客和展示页 - 确保新增描述包含 Qwen Code 品牌词,并匹配各页面主旨与搜索意图
- 为中德法俄日葡 6 种语言的功能关键词页补充手写 SEO description - 覆盖 Hooks、Sandbox、Headless、Code Review、Checkpointing、Sub Agents、定时任务、模型提供方和主题页 - 保留英文已有描述不变,确保新增描述包含 Qwen Code 品牌词并匹配长尾搜索意图
- 为中德法俄日葡 6 种语言的开发者与扩展核心页补充 SEO description - 覆盖架构、贡献指南、Python SDK、TypeScript SDK、MCP Server 和 Extensions 入门页 - 保留英文已有描述不变,确保新增描述包含 Qwen Code 品牌词并面向贡献者搜索意图
- 为各语言 blog 和 showcase 索引页补充包含 Qwen Code 的清晰标题 - 优化英文博客页 description,增强产品更新、AI coding 和开发者指南关键词 - 移除语言布局调试日志,减少本地开发和 CI 构建输出噪音
- 为全站注入 Organization 和 WebSite JSON-LD,增强品牌与站点实体识别 - 为文档页生成 BreadcrumbList,帮助搜索引擎理解多语言页面层级 - 为博客详情页添加 BlogPosting,补充标题、描述、日期、作者和发布者信息
- 为 sitemap metadata route 补充静态参数,修复 output export 下的访问错误 - 删除静态导出不支持的 middleware,避免本地和 CI 日志持续告警 - 已通过 npm run build 验证静态页面、robots 和 sitemap 可正常生成
为 4 个组件文件中的 5 个 <video> 标签添加 aria-label, 使用已有的 title 数据自动生成,覆盖 Hero 视频、弹窗播放器、 showcase 详情页和 IDE 集成演示。
- 为 sandbox 多语言文档补充本地化 description,并提升标题层级补齐 H1 - 修复英文 overview 的 description 被徽章链接误抓取的问题 - 新增 favicon.ico,并在开发环境禁用 Pagefind 加载以避免静态资源 500
- 为博客索引组件增加多语言 H1 和页面描述 - 仅在博客索引页隐藏 Nextra 面包屑,保留具体文章页导航 - 将各语言根路径定向到对应的 users/overview 页面,并同步 canonical 与 hreflang
- 删除 6 种语言 weekly-update-2026-05-21.mdx 末尾泄漏的 shell 输出 - 补全 ru/developers/tools/introduction.md 俄语翻译
- 将 OG 默认图片、博客图片、showcase 图片从 SVG 替换为 PNG - 更新 page.jsx 中 OG_IMAGE_MAP 和 DEFAULT_OG_IMAGE 的文件扩展名 - 结构化数据中 WebSite.url 由写死的完整域名改为使用 siteUrl 参数动态拼接,避免部署域名变化时产生不一致
- 文档页 hreflang 只输出真实存在且非空的语言版本,语言首页 canonical 指向 overview - sitemap 按 Git 记录生成每个内容文件的 lastModified,避免全部回退为构建当天 - 博客索引列表标题层级从 h3 调整为 h2,并同步 translator 模板 canonical/hreflang
GitHub Actions 默认浅克隆(fetch-depth: 1),导致构建时所有文件的 最后修改时间都变成 push 当天。设置 fetch-depth: 0 拉取完整历史, 使 Nextra 能获取每个文件真实的 git 最后提交时间。
channels-weixin-launch-announcement.mdx 同时使用了 BlogPostHeader 组件(h1)和 Markdown # 标题(h1),导致页面出现两个 h1。 删除 Markdown 中的 # 标题,保留组件渲染的 h1。覆盖 7 种语言。
- 为 39 个偏短 description 页面补充品牌词 Qwen Code 和页面主旨 - 将 description 控制在 150-160 字符,覆盖场景、痛点和点击意图 - 仅修改 frontmatter description,不调整正文内容
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.
概述
对文档站进行系统性的 SEO 优化,涵盖元数据修复、结构化数据、多语言 description、sitemap 优化和无障碍改进,共修改 333 个文件。
主要改动
Canonical 和 hreflang
页面 Description
OG 图片
Sitemap 优化
结构化数据(JSON-LD)
无障碍和语义化
静态导出适配
CI/CD 优化
其他修复
修改的文件
测试
影响范围