mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Merge pull request #1001 from russkel/issue927
fix: clear directory before generation of context
This commit is contained in:
commit
a14dc4dad2
1 changed files with 4 additions and 4 deletions
|
|
@ -168,16 +168,16 @@ class Pelican(object):
|
|||
) for cls in self.get_generator_classes()
|
||||
]
|
||||
|
||||
for p in generators:
|
||||
if hasattr(p, 'generate_context'):
|
||||
p.generate_context()
|
||||
|
||||
# erase the directory if it is not the source and if that's
|
||||
# explicitely asked
|
||||
if (self.delete_outputdir and not
|
||||
os.path.realpath(self.path).startswith(self.output_path)):
|
||||
clean_output_dir(self.output_path, self.output_retention)
|
||||
|
||||
for p in generators:
|
||||
if hasattr(p, 'generate_context'):
|
||||
p.generate_context()
|
||||
|
||||
writer = self.get_writer()
|
||||
|
||||
for p in generators:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue