mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
check also the theme dir in autoreload mode
This commit is contained in:
parent
93d0ad25d1
commit
0bbdc6bc00
1 changed files with 7 additions and 1 deletions
|
|
@ -140,7 +140,13 @@ def main():
|
||||||
if args.autoreload:
|
if args.autoreload:
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
if files_changed(pelican.path, pelican.markup):
|
# Check source dir for changed files ending with the given
|
||||||
|
# extension in the settings. In the theme dir is no such
|
||||||
|
# restriction; all files are recursively checked if they
|
||||||
|
# have changed, no matter what extension the filenames
|
||||||
|
# have.
|
||||||
|
if files_changed(pelican.path, pelican.markup) or \
|
||||||
|
files_changed(pelican.theme, ['']):
|
||||||
pelican.run()
|
pelican.run()
|
||||||
time.sleep(.5) # sleep to avoid cpu load
|
time.sleep(.5) # sleep to avoid cpu load
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue