1
0
Fork 0
forked from github/pelican

check also the theme dir in autoreload mode

This commit is contained in:
derdon 2011-05-15 12:14:03 +02:00
commit 0bbdc6bc00

View file

@ -140,7 +140,13 @@ def main():
if args.autoreload:
while True:
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()
time.sleep(.5) # sleep to avoid cpu load
except KeyboardInterrupt: