From c8b0b52d4e8f76bfd9bd59cb0a6bb4cf0d697b5c Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Thu, 20 Jun 2019 08:12:14 +0200 Subject: [PATCH] Use port settings in Invoke livereload task Instead of using LiveReload's default port 5500, use the existing `port` value from the task's CONFIG dictionary, which defaults to 8000. --- pelican/tools/templates/tasks.py.jinja2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index 0e1fad7a..7922aa9a 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -100,7 +100,8 @@ def livereload(c): for extension in content_file_extensions: content_blob = '{0}/**/*{1}'.format(SETTINGS['PATH'], extension) server.watch(content_blob, lambda: build(c)) - server.serve(root=CONFIG['deploy_path']) + # Serve output path on configured port + server.serve(port=CONFIG['port'], root=CONFIG['deploy_path']) {% if cloudfiles %} @task