portray
portray copied to clipboard
Automatic Reload
Is it possible to add automatic reload to Portray?
This would be a great feature to get in!
As a temporary measure one can use livereload to monitor the filesystem and rerender the html when the docs change, like this
import livereload
import portray
def render_as_html():
portray.as_html(overwrite=True)
server = livereload.Server()
server.watch("README.md", render_as_html)
server.watch("docs/**", render_as_html)
server.serve(root="site")
Thanks for the suggestoin @sindrehan I will definitely try that out!
I'm wondering if it would be possible to also only regenerate somehow the file only? Maybe @timothycrosley has an idea whether portray as python module could have some caching in combination with mkdocs?
This feature will be added by #62