Open jhidding opened 1 year ago
im under the impression that the mkdocs based live server that comes with html rendering and updates does well for that already,
unless there is a intent to replicate the mkdocs featureset partially, it may be best to just integrate
Yes, MkDocs does a lot of what we want, with a few remarks:
We'll only implement this feature now if it helps first user experience and can be done in relatively short amount of time. Seeing that MkDocs is probably the easiest way to start an Entangled project, this issue won't have the highest priority.
Currently a third-party tool is needed to enable live-reloading, which makes it less accessible to novice users. There are plenty Python packages that can do this, but we need to pick the right one that integrates nicely with the event-loop that is already present in Entangled.
http.server
. See for instance this gistlivereload
is an available and ready Python package. The API documentation is a bit minimal. We could runlivereload
from a separate thread and not worry too much about watch duplication. This could cause timing issues, where browsers are reloading before sites are finished rendering. It would be nicer if we can send a signal to the browser when we know its ok to reload.