Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign uplive reload when serving locally #60
Comments
This comment has been minimized.
This comment has been minimized.
|
While the web page needs to be refreshed manually, the server doesn't (shouldn't) require to be shut down and restarted as module reloading is in place. Lines 169 to 175 in f5b4a54 If there's a bug somewhere, the |
This comment has been minimized.
This comment has been minimized.
|
Ah I was editing docs for pdoc itself, hence the server wasn't reloading. Still the client-side reload is a nice feature. What do you think? |
This comment has been minimized.
This comment has been minimized.
|
If something can be done in about three lines of WebSocket JS API and maybe twice that on the Python end without heavy extra dependencies, absolutely love to see it. |
kernc
added
enhancement
help wanted
labels
May 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cs01 commentedMay 2, 2019
•
edited by kernc
running
serves the docs locally, but if any changes are made, the server needs to be manually killed and restarted, and the webpage needs to be reloaded.
The PyPI package livereload is built to watch files and reload the web client if a source file changes. This is common in other popular tools such as mkdocs and create-react-app. mkdocs implementation can be used as a guide: https://github.com/mkdocs/mkdocs/blob/master/mkdocs/commands/serve.py.