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

Automatically refresh documentation when using mkdocs serve #163

Closed
d0ugal opened this issue Oct 17, 2014 · 7 comments · Fixed by #420 or #433
Closed

Automatically refresh documentation when using mkdocs serve #163

d0ugal opened this issue Oct 17, 2014 · 7 comments · Fixed by #420 or #433

Comments

@d0ugal
Copy link
Member

d0ugal commented Oct 17, 2014

This would make the eediting experience really neat. @ericholscher had an idea for a GUI app that could do this, but this approach might be enough.

One possible approach - inject some JavaScript that either polls or uses web sockets to be notified of an update.

@ericholscher
Copy link
Contributor

sphinx-autobuild does this with websockets. It's pretty nifty.

On Fri, Oct 17, 2014 at 3:45 AM, Dougal Matthews notifications@github.com
wrote:

This would make the eediting experience really neat. @ericholscher
https://github.com/ericholscher had an idea for a GUI app that could do
this, but this approach might be enough.

One possible approach - inject some JavaScript that either polls or uses
web sockets to be notified of an update.


Reply to this email directly or view it on GitHub
#163.

Eric Holscher
Maker of the internet residing in Portland, Or
http://ericholscher.com

@d0ugal d0ugal added this to the 0.11.0 milestone Oct 18, 2014
@ngzhian
Copy link
Contributor

ngzhian commented Nov 3, 2014

looks like sphinx-autobuild uses python-livereload, which in turn relies on livereload.
I tried my hands on livereload, pretty cool and it works simply from the command line (you need to install the extension for your browser first though)
Looking at the way sphinx-autobuild does it scares me a little. I went ahead to look at the source of python-livereload and figured that for our use case, it is a simple case of serving out of our temp build directory.
This was problematic due to an issue, details here, hopefully that is resolved soon and I will have a PR for this.

@ngzhian
Copy link
Contributor

ngzhian commented Nov 3, 2014

The author of python-livereload has confirmed that this is a bug, and proceeded to fix it up really quickly. The fix will propagate to pypi in a couple of days.

@lepture
Copy link

lepture commented Nov 3, 2014

BTW. python-livereload has a built-in static server.

It would be a little off topic, maybe you will be interested in https://github.com/lepture/mistune. It is the fastest markdown parser in pure Python.

@d0ugal
Copy link
Member Author

d0ugal commented Nov 4, 2014

Intresting, I'll check out livereload but I really don't like the idea of requiring a plugin. I can't see why that is needed?

@lepture thanks, speed isn't an issue for us at the moment. It is interesting to know alternatives are available. Thankfully docs building doesn't need to scale far ;)

@lepture
Copy link

lepture commented Nov 4, 2014

@d0ugal You don't need a plugin. This python-livereload will inject the javascript automatically.

@d0ugal
Copy link
Member Author

d0ugal commented Nov 4, 2014

Oh, sorry, I must have totally missread something. I can't even see where I got that from :) So yeah, we should totally look into trying that out. I'll have a go with it. Thanks.

@d0ugal d0ugal modified the milestones: 0.12.0, 0.11.0 Nov 14, 2014
@d0ugal d0ugal removed this from the 0.12.0 milestone Dec 16, 2014
d0ugal pushed a commit to d0ugal/mkdocs that referenced this issue Apr 4, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 4, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 4, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 4, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 4, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 6, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 8, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 8, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
d0ugal added a commit to d0ugal/mkdocs that referenced this issue Apr 10, 2015
Use python-livereload to automatically refresh your browser.

Closes mkdocs#163
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants