portray icon indicating copy to clipboard operation
portray copied to clipboard

Automatic Reload

Open WaylonWalker opened this issue 5 years ago • 4 comments

Is it possible to add automatic reload to Portray?

WaylonWalker avatar Sep 20 '19 14:09 WaylonWalker

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")

sindrehan avatar Oct 01 '19 13:10 sindrehan

Thanks for the suggestoin @sindrehan I will definitely try that out!

WaylonWalker avatar Oct 05 '19 15:10 WaylonWalker

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?

kootenpv avatar Dec 29 '19 10:12 kootenpv

This feature will be added by #62

ucodery avatar Oct 16 '20 17:10 ucodery