Files
mkdocs/docs
Oleh Prypin a444c43474 Reimplement livereload
This discards the dependency on 'livereload' and 'tornado'. This implementation is based on stdlib http.server and is much smaller, while not being a downgrade in any way.

This fixes #2061: multiple file changes no longer cause the site to repeatedly rebuild.
It also makes reloads much more responsive; they're "instant" rather than being on a 1-second polling interval or such.

Each HTML page gets JavaScript injected into it (like before) but now, instead of connecting to WebSocket, it requests a long-polling endpoint, which blocks until a newer version ("epoch") of the site is available - then the page knows to reload itself. After a minute without events, the endpoint will just return the unchanged epoch (to avoid timeouts), then the page requests the same endpoint again. The "downtime" in between requests is not a problem because these are not events that need to be received in real time; the endpoint can instantly report that the latest version is newer than the one the page identified itself as.

The reason to replace WebSocket isn't that it's bad or something, just that stdlib doesn't have it. But long-polling works completely fine here too.
2021-05-25 10:16:31 -04:00
..
2021-05-25 10:16:31 -04:00
2021-04-04 16:14:29 -04:00
2021-05-07 09:57:19 -04:00
2014-01-21 16:46:05 +00:00
2021-05-18 13:13:05 -04:00
2021-04-04 16:14:29 -04:00