Regenerate paths on each change
This is so we can detect new files without having to restart the Pelican server. Computers are fast enough anyway.
This commit is contained in:
parent
d3735aa826
commit
30670d998e
|
@ -97,7 +97,6 @@ def populate_files_and_articles(article_generator):
|
|||
global FILES
|
||||
|
||||
base_path = Path(article_generator.path)
|
||||
if not ARTICLES:
|
||||
articles = base_path.glob('**/*.md')
|
||||
for article in articles:
|
||||
full_path, filename_w_ext = os.path.split(article)
|
||||
|
@ -108,7 +107,6 @@ def populate_files_and_articles(article_generator):
|
|||
globs = [base_path.glob('**/*.{}'.format(ext)) for ext in ['png', 'jpg', 'svg', 'apkg', 'gif']]
|
||||
files = chain(*globs)
|
||||
|
||||
if not FILES:
|
||||
for _file in files:
|
||||
full_path, filename_w_ext = os.path.split(_file)
|
||||
full_path = str(full_path).replace(str(base_path) + '/', '')
|
||||
|
|
Loading…
Reference in New Issue
Block a user