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

Fix live reload #1174

Merged
merged 1 commit into from Mar 20, 2017

Conversation

Projects
None yet
2 participants
@jeffreytolar
Contributor

jeffreytolar commented Mar 20, 2017

Live reload (with mkdocs serve) is broken in 0.16.2; saving a file triggers a reload, but the page contents doesn't change because the server returns a 304 Not Modified.

I did a bit of testing, and it looks like efbc789 (#1141) is the suspect commit. The _get_handler method introduced in that PR inherits from tornado.web.StaticFileHandler. livereload has a slightly customized StaticFileHandler which disables 304's: https://github.com/lepture/python-livereload/blob/master/livereload/handlers.py#L151-L153

This fixes the issue by using the correct StaticFileHandler

Fix live reload
This fixes a regression caused by efbc789 (#1141).

@jeffreytolar jeffreytolar force-pushed the jeffreytolar:fix-livereload branch from 78bef2e to 7607bea Mar 20, 2017

@waylan

This comment has been minimized.

Member

waylan commented Mar 20, 2017

Awesome. Thanks. I noticed some weirdness the other day when I was working on something else. But of course, I didn't investigate because I was working on something else at the time.

@waylan waylan merged commit 199195b into mkdocs:master Mar 20, 2017

3 checks passed

codecov/project 93.44% (target 90%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment