No worries mate!
There is also this - https://validator.w3.org/checklink
I donāt know how to integrate into a CI pipeline though.
Just to add an additional alternative. Iāve been looking for solutions using Python scripts, this is one https://pypi.python.org/pypi/LinkChecker
Thatās been my alternative to xenu since I switched to Linux. Works fine.
I found nice link check tools written in golang.
And, I released GitHub Actions for above tools.
The following action runs hugo server &
and muffet http://localhost:1313
The htmltest
tool by @wjdp has been working great for me for few years now. Iād suggest everyone to try that out too.
I had tried muffet when I was testing various link checking solutions, but while it proved to be āfastā, it gave a loooot of false failures.
htmltest
is fast too, and it is spot-on.
I confirm. htmltest is in our CI workflow ā¦
All awesome news. Will definitely give this a shot. But still think there is value in checking within Hugo. Link checking is table stakes at this point in terms of content management systemsā¦
Iād love it to be included. Iām migrating a site to Hugo and it would be a big help.
Peeking at its readme, the htmltest tool linked above is simple to install and use.
Fair enough, but I really love the watch mode of Hugo, and internal link checking would fit right in there.
Also it panics on my current site. Have not yet been able to narrow down what triggers it.
Seems like an overkill for the watch mode and I know that speed is critical for @bep (and all Hugo users, of course). Itās amazing that Hugo keeps getting faster and faster and faster.
I was thinking this would be something built into the hugo
build command with a specific flag that would write broken links to a file for better content management.
htmltest also doesnāt (yet) support baseUrl. Any other suggestions for link checkers? Iāve switched to using {{< ref >}} for my internal links which picks up most, but it doesnāt seem to validate #
references, which htmltest does.
Sorry, Iād like to embed the check of a url inside my blog when its online instead of checking the links while creation of the page. Lets say I have a link example.com
and I want to embed a short notice inside my page if example.com
is online.
How do I achieve such a thing in Hugo? For me itās not relevant which tool I use, simplicity is preferred over rich features.
Archiving this thread. @tinfoil-hat, youāll need to search elsewhere, Hugo doesnāt have that functionality, and isnāt intended to. Good luck!