Check links in static site on disk?
emiltin opened this issue · 1 comments
emiltin commented
I'm using Jekyll with GitHub Pages. Jekyll produces a folder with static files. How can I validate links in this static site?
I tried to mount the folder in the container and point to it, but it looks like it does not recognize an url in the form of file://path.
% docker run --rm -v /absolute/path/_site:/_site tennox/linkcheck -d file://_site
Reading URLs:
http://file://_site
Crawl will start on the following URLs: [http://file//_site]
...
The http://file://_site
in the output looks wrong.
hugo-sid commented
I also have a similar use case. I didn't find any documentation regarding this on the repo's readme.
In case linkcheck
doesn't support testing static files, I have a workaround in mind:
- Install Apache Web Server
- Move static files (web pages and assets) to
/var/www/html
- Run
linkcheck
with URLhttp://127.0.0.1/
I have not yet tested this with GitHub action yet.