【问题标题】:Unable to generate sitemap.xml for angular 6 build project using Google Sitemap Generator(chrome extension)无法使用 Google Sitemap Generator(chrome 扩展)为 Angular 6 构建项目生成 sitemap.xml
【发布时间】:2019-02-28 13:27:35
【问题描述】:

Google 站点地图生成器仅在 Angular 6 构建项目中为主页生成 sitemap.xml 文件。无法为其他路由url路径整体生成。

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.XXXXXXXX.com/home</loc>
</url>
</urlset>

【问题讨论】:

  • 你找到解决办法了吗?
  • 是的。我手动生成了 url,我的意思是在客户端并以 xml 的形式将它们发送到后端。我知道这不是最终的解决方案,但它对我有用。
  • 感谢分享。
  • 不客气。

标签: angular6 xml-sitemap


【解决方案1】:

您需要手动添加所有其他页面

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.XXXXXXXX.com/home/abc</loc>
</url>
</urlset>

【讨论】:

  • 谢谢,但我需要它自动。
猜你喜欢
  • 2022-07-04
  • 2018-10-31
  • 1970-01-01
  • 1970-01-01
  • 2021-11-06
  • 2020-10-12
  • 1970-01-01
  • 2011-12-31
  • 1970-01-01
相关资源
最近更新 更多