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

Validate website locally #20

Open
cdeil opened this issue Dec 7, 2017 · 1 comment
Open

Validate website locally #20

cdeil opened this issue Dec 7, 2017 · 1 comment

Comments

@cdeil
Copy link

cdeil commented Dec 7, 2017

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?

@bartdag
Copy link
Owner

bartdag commented Dec 7, 2017

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.

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