【发布时间】:2018-02-26 23:22:10
【问题描述】:
我正在尝试在 Google Search Console 中添加站点地图。
我有这个代码:
路线
router.get("/sitemap", function(req, res){
res.render("sitemap.ejs");
});
Sitemap.ejs
<html>
<head>
<title>Sitemap</title>
<link rel="alternate" type="application/rss+xml" title="" href="sitemap.xml" />
</head>
<body>
</body>
</html>
但是当我尝试将站点地图添加到谷歌时,它说站点地图不能是 html 格式。
如何使它对 Google Search Console 有效?
【问题讨论】:
标签: javascript node.js xml sitemap