forked from github/pelican
Add theme templates, CSS, JS to Invoke livereload task
This commit is contained in:
parent
cf2275c3be
commit
a4cecd2d0c
1 changed files with 7 additions and 0 deletions
|
|
@ -102,6 +102,13 @@ def livereload(c):
|
|||
for extension in content_file_extensions:
|
||||
content_blob = '{0}/**/*{1}'.format(SETTINGS['PATH'], extension)
|
||||
server.watch(content_blob, lambda: build(c))
|
||||
# Watch the theme's templates and static assets
|
||||
theme_path = SETTINGS['THEME']
|
||||
server.watch('{}/templates/*.html'.format(theme_path), lambda: build(c))
|
||||
static_file_extensions = ['.css', '.js']
|
||||
for extension in static_file_extensions:
|
||||
static_file = '{0}/static/**/*{1}'.format(theme_path, extension)
|
||||
server.watch(static_file, lambda: build(c))
|
||||
# Serve output path on configured port
|
||||
server.serve(port=CONFIG['port'], root=CONFIG['deploy_path'])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue