mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Update livereload Invoke task and add docs
Removes the `livereload` dependency from `setup.py`. Updates the `invoke livereload` task by moving the `livereload` import into the task function since it is now an optional dependency. Updates the Invoke section of the documentaion with instructions on using the `livereload` Invoke task.
This commit is contained in:
parent
28383a6355
commit
ca012bd288
3 changed files with 8 additions and 2 deletions
|
|
@ -146,6 +146,12 @@ http://localhost:8000/::
|
||||||
|
|
||||||
invoke serve
|
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
|
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
|
whether you want to upload your site via SSH, you can use the following command
|
||||||
to publish your site via rsync over SSH::
|
to publish your site via rsync over SSH::
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import datetime
|
||||||
|
|
||||||
from invoke import task
|
from invoke import task
|
||||||
from invoke.util import cd
|
from invoke.util import cd
|
||||||
from livereload import Server
|
|
||||||
from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
|
from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
|
||||||
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file
|
from pelican.settings import DEFAULT_CONFIG, get_settings_from_file
|
||||||
|
|
||||||
|
|
@ -90,6 +89,7 @@ def preview(c):
|
||||||
@task
|
@task
|
||||||
def livereload(c):
|
def livereload(c):
|
||||||
"""Automatically reload browser tab upon file modification."""
|
"""Automatically reload browser tab upon file modification."""
|
||||||
|
from livereload import Server
|
||||||
build(c)
|
build(c)
|
||||||
server = Server()
|
server = Server()
|
||||||
deploy_path = CONFIG['deploy_path']
|
deploy_path = CONFIG['deploy_path']
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -8,7 +8,7 @@ from setuptools import setup
|
||||||
|
|
||||||
requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils',
|
requires = ['feedgenerator >= 1.9', 'jinja2 >= 2.7', 'pygments', 'docutils',
|
||||||
'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4',
|
'pytz >= 0a', 'blinker', 'unidecode', 'six >= 1.4',
|
||||||
'python-dateutil', 'livereload']
|
'python-dateutil']
|
||||||
|
|
||||||
entry_points = {
|
entry_points = {
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue