Reputation: 93
I ran htmlproofer and got this failure.
internally linking to /posts/title, which does not exist
how do I fix the liquid tags in jekyll so that the HTML outputs correctly when built?
I think it has something to do with this line in index.html
<a href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
when I add {{ post }}
in this line
<a href="{{ post.url | relative_url }}{{ post }}" title="{{ post.title }}">
the posts at least show on the index.html
, even though it makes the site look broken. When {{ post }}
is removed the main page looks normal, but when clicking on posts they lead to a 404...
Upvotes: 4
Views: 1601
Reputation: 23982
HTMLProofer should check the generated site located at _site
directory. This folder contains the generated files of your websites that has been processed by Jekyll, that way the failing links would be checked properly by htmlproofer.
For example:
htmlproofer --check-html \
--internal-domains localhost:4000 \
--assume-extension \
--disable-external \
_site
Upvotes: 3