Skip to content

Instantly share code, notes, and snippets.

@pelid
Last active August 1, 2017 15:18
Show Gist options
  • Save pelid/87d6ea28b263fd729a8c76bc8e0d040f to your computer and use it in GitHub Desktop.
Save pelid/87d6ea28b263fd729a8c76bc8e0d040f to your computer and use it in GitHub Desktop.
Example of livereload integration for Devman 19_site_generator challenge
from livereload import Server
def make_site():
# TODO convert markdown to html, create site
if __name__ == '__main__':
server = Server()
server.watch('templates/*.html', make_site)
# TODO watch for changes in markdown articles
server.serve(root='site/') # folder to serve html files from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment