【发布时间】:2021-05-04 20:33:10
【问题描述】:
我的 sitemap.xml 和 robots.txt 由 jekyll-sitemap 生成,由于某种原因被包裹在 html 中,这使得它们不符合要求。
我正在使用 jekyll-sitemap 插件,经过验证,它是最新版本 (https://github.com/jekyll/jekyll-sitemap),并尝试了许多其他方法,主要是通过前端和 conf 设置 layout: none 的各种方法。
如果我创建一个随机文本或 xml 文件,它们最终不会被包裹在 html 中。
我还尝试禁用所有插件和默认布局设置以及compress 布局,但找不到原因。
有人遇到过这样的问题吗?有什么想法可以调试吗?
站点地图.xml:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<?xml version="1.0" encoding="UTF-8"?><html><body>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
...
actual sitemap goes here
...
</body></html>
[编辑] 当我创建一个随机文件 with frontmatter 时,它确实被包装了,即使我添加了layout: none。
【问题讨论】:
标签: html xml jekyll sitemap jekyll-extensions