gohugoio / hugoBasicExample

MIT License
281 stars 281 forks source link

Htmlproofer suddenly failing due to internal link errors #40

Closed EmielH closed 5 years ago

EmielH commented 5 years ago

Whenever I commit a change to any of my themes, I have TravisCI run htmlproofer on a site generated using hugoBasicExample to check whether the generated HTML is still valid. As I commited a change today, htmlproofer found several broken internal links:

- public/post/goisforlovers/index.html
  *  internally linking to /content/front-matter, which does not exist (line 315)
     <a href="/content/front-matter">front matter</a>
  *  internally linking to /layout/functions, which does not exist (line 127)
     <a href="/layout/functions">Hugo template functions</a>
  *  internally linking to /layout/variables, which does not exist (line 110)
     <a href="/layout/variables">variables</a>
- public/post/migrate-from-jekyll/index.html
  *  internally linking to /doc/shortcodes/, which does not exist (line 108)
     <a href="/doc/shortcodes/">shortcodes</a>
  *  internally linking to /layout/templates/, which does not exist (line 102)
     <a href="/layout/templates/">Hugo’s template</a>
  *  internally linking to /overview/configuration/, which does not exist (line 76)
     <a href="/overview/configuration/">Hugo configuration documentation</a>
htmlproofer 3.10.2 | Error:  HTML-Proofer found 6 failures!

See this log from TravisCI.

I checked the source code of the basic example repo to find that the lines containing these links have not changed in a few years. I also checked the htmlproofer repo and it seems that there haven't been any changes pertaining to internal links there either.

Do you have a clue what might have triggered these errors all of a sudden? Have there been any other changes to hugoBasicExample that may have triggered these?

Thanks for your help!

onedrawingperday commented 5 years ago

As you noticed we haven’t changed these links in years. So we do not know what triggered the errors you experience.

However the HugoBasicExample is in the process of being updated. (You can view the recent commits in the repo).

As a matter of fact its content will be completely overhauled provided that the coming changes are accepted and soon most of these links will not exist anymore.

(Also note that there were some changes with Travis CI itself lately, things do not look to bright for it at the moment -look it up-).

EmielH commented 5 years ago

Alright, thanks a lot for your help! I'm going to look into this a little but further myself.