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

Implement live reloading server #12

Open
2 tasks
jhidding opened this issue Aug 28, 2023 · 2 comments
Open
2 tasks

Implement live reloading server #12

jhidding opened this issue Aug 28, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jhidding
Copy link
Contributor

jhidding commented Aug 28, 2023

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.

  • Most solutions work by having the http-server inject a bit of Javascript into pages. Check feasibility of implementing this on top of native http.server. See for instance this gist
  • livereload is an available and ready Python package. The API documentation is a bit minimal. We could run livereload 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.
@jhidding jhidding added the enhancement New feature or request label Aug 28, 2023
@RonnyPfannschmidt
Copy link
Contributor

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

@jhidding
Copy link
Contributor Author

Yes, MkDocs does a lot of what we want, with a few remarks:

  • The watchdog routine is not under our control, even though detecting file changes correctly is a very sensitive part of the user experience. For instance, I've had issues with file saving in Vim not being detected.
  • MkDocs output is very nice, but I want Entangled to work independent from it. Other targets include Julia's Documenter.jl, Rustdoc and last but not least Pandoc, which can also be used to generate PDF for publishing journal papers.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants