diff --git a/docs/publish.rst b/docs/publish.rst index 197aa779..96d67d58 100644 --- a/docs/publish.rst +++ b/docs/publish.rst @@ -146,6 +146,12 @@ http://localhost:8000/:: invoke serve +To serve the generated site with automatic browser reloading every time a +change is detected, first ``pip install livereload``, then use the +following command:: + + invoke livereload + If during the ``pelican-quickstart`` process you answered "yes" when asked whether you want to upload your site via SSH, you can use the following command to publish your site via rsync over SSH:: diff --git a/pelican/tools/templates/tasks.py.jinja2 b/pelican/tools/templates/tasks.py.jinja2 index 5b27e2b5..ef48e968 100644 --- a/pelican/tools/templates/tasks.py.jinja2 +++ b/pelican/tools/templates/tasks.py.jinja2 @@ -7,7 +7,6 @@ import datetime from invoke import task from invoke.util import cd -from livereload import Server from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer from pelican.settings import DEFAULT_CONFIG, get_settings_from_file @@ -90,6 +89,7 @@ def preview(c): @task def livereload(c): """Automatically reload browser tab upon file modification.""" + from livereload import Server build(c) server = Server() deploy_path = CONFIG['deploy_path'] diff --git a/setup.py b/setup.py index 25e109c4..e8918941 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ from setuptools import setup requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils', 'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4', - 'python-dateutil', 'livereload'] + 'python-dateutil'] entry_points = { 'console_scripts': [