File tree 1 file changed +5
-2
lines changed
nikola/plugins/task/sitemap
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,9 @@ def gen_tasks(self):
140
140
urlset = {}
141
141
142
142
def scan_locs ():
143
+ # No need to run this more than once
144
+ if urlset :
145
+ return True
143
146
"""Scan site locations."""
144
147
for root , dirs , files in os .walk (output , followlinks = True ):
145
148
if not dirs and not files and not kw ['sitemap_include_fileless_dirs' ]:
@@ -290,6 +293,8 @@ def scan_locs_task():
290
293
291
294
return {'file_dep' : file_dep }
292
295
296
+ scan_locs ()
297
+
293
298
yield {
294
299
"basename" : "_scan_locs" ,
295
300
"name" : "sitemap" ,
@@ -298,8 +303,6 @@ def scan_locs_task():
298
303
299
304
yield self .group_task ()
300
305
301
- scan_locs ()
302
-
303
306
for sitemap_path in sorted (urlset .keys ()):
304
307
# TODO: Fix issue #1683
305
308
sitemap = urlset [sitemap_path ]
You can’t perform that action at this time.
0 commit comments