Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check links in static site on disk? #126

Open
emiltin opened this issue Aug 15, 2023 · 1 comment
Open

Check links in static site on disk? #126

emiltin opened this issue Aug 15, 2023 · 1 comment

Comments

@emiltin
Copy link

emiltin commented Aug 15, 2023

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://_sitein the output looks wrong.

@hugo-sid
Copy link
Contributor

hugo-sid commented Sep 3, 2023

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:

  1. Install Apache Web Server
  2. Move static files (web pages and assets) to /var/www/html
  3. Run linkcheck with URL http://127.0.0.1/

I have not yet tested this with GitHub action yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants