forked from github/pelican
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:
|
||||
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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue