diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index 95164354..0e1fad7a 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -95,13 +95,12 @@ def livereload(c): from livereload import Server build(c) server = Server() - deploy_path = CONFIG['deploy_path'] - content_path = SETTINGS['PATH'] + # Watch content source files content_file_extensions = ['.md', '.rst'] - for file_extension in content_file_extensions: - content_blob = '{0}/**/*{1}'.format(content_path, file_extension) + for extension in content_file_extensions: + content_blob = '{0}/**/*{1}'.format(SETTINGS['PATH'], extension) server.watch(content_blob, lambda: build(c)) - server.serve(root=deploy_path) + server.serve(root=CONFIG['deploy_path']) {% if cloudfiles %} @task