pylinkvalidator
pylinkvalidator copied to clipboard
Validate website locally
Is it possible to validate a static website that I have on my local computer?
I naively tried pointing at an index.html file, but that doesn't work:
$ pylinkvalidate.py docs/_build/html/index.html
ERROR Crawled 1 urls with 1 error(s) in 0.01 seconds
Start URL(s): http://docs/_build/html/index.html
error (<class 'urllib.error.URLError'>): <urlopen error [Errno 8] nodename nor servname provided, or not known>: http://docs/_build/html/index.html
If no, would it be a common enough case to add an option for that, or to mention in the README how it can be done?
One thing you can do is start the default Python server:
cd docs/_build/html
# with python3
python3 -m http.server 8080
# with python2
python -m SimpleHTTPServer 8080
And you can now submit http://127.0.0.1/index.html as your root page.