Jekyll 到帖子的内部链接不存在,杰基尔

Jekyll 到帖子的内部链接不存在,杰基尔,jekyll,liquid,html-proofer,Jekyll,Liquid,Html Proofer,我运行了htmlproofer,结果失败了 内部链接到/posts/title,该链接不存在 如何修复jekyll中的liquid标记,以便在构建时正确输出HTML 我认为这与index.html <a href="{{ post.url | relative_url }}" title="{{ post.title }}"></a> 当我在这行中添加{{post}}时 这些帖子至少会显示在index.html上,尽管这会让网站看起来很糟糕。当{{post}}被删

我运行了htmlproofer,结果失败了

内部链接到/posts/title,该链接不存在

如何修复jekyll中的liquid标记,以便在构建时正确输出HTML

我认为这与
index.html

<a href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>

当我在这行中添加
{{post}}


这些帖子至少会显示在
index.html
上,尽管这会让网站看起来很糟糕。当
{{post}}
被删除时,主页看起来正常,但当点击帖子时,它们会导致404…

HTMLProofer应该检查位于
\u site
目录下的生成站点。此文件夹包含由Jekyll处理的网站生成的文件,这样HTMLPROFITER将正确检查失败的链接

例如:

htmlproofer --check-html \
        --internal-domains localhost:4000 \
        --assume-extension \
        --disable-external \
        _site

尝试使用
并在
\u config.yml
中设置属性:baseurl=“”–或
生成的指向404页面的url是什么?example.com/projectname/year/month/title或。我无法从
index.html
打开博客帖子,我刚刚下载了你的网站并为我工作,CI失败了吗?我的
\u config.yml
permalinks设置为
permalink:/:year/:month/:slug
,看起来permalinks有一些问题(现在已经发布了,如果你将
.html
添加到你的博客文章中,它可以工作,但不应该是必需的)。我把它改为
permalink://:year/:month/:title.html
,现在帖子打开了。即使将
permalink:/:title.html
添加到about page.repository url,我的about页面似乎也不会生成
.html