Alternate href urls breaks sitemap

未关闭
#4 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
typescript
领域
web-dev

调研方向

首先复现 README 中描述的 alternate href 配置,并检查生成的 sitemap XML。将其 namespace 和 link 元素与 Google 的 localized-versions 示例进行比较;当 Google Search Console 接受该 sitemap 且不再出现无效子元素错误时即完成。

由索引模型根据 Issue 内容生成。

描述

Hello !

When i tried with alternate href like in the readme i have the following error on google console:

The element 'url' has invalid child element 'link' in namespace 'http://www.w3.org/TR/xhtml11/xhtml11_schema.html'. List of possible elements expected: any element in namespace 'http://www.google.com/schemas/sitemap-image/1.1, http://www.google.com/schemas/sitemap-mobile/1.0, http://www.google.com/schemas/sitemap-video/1.1'. 

I think it is related to : https://developers.google.com/search/docs/specialty/international/localized-versions#example_2 . They said to Specify the xhtml namespace as follows:

xmlns:xhtml="http://www.w3.org/1999/xhtml"

I did not find a way to make it work with this plugin but maybe that's me who is wrong on my way to do it

主要语言
TypeScript
星标
96
派生
9
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

code-forge-io/seo-tools 的其他 Issue

查看 code-forge-io/seo-tools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。