Skip to content

Commit 50be615

Browse files
committedSep 19, 2015
Search content must change if any file changed.
The sitemap changes only if a new file has been added, but we can use these files as dynamic dependencies for the search plugin.
1 parent 466ee25 commit 50be615

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed
 

Diff for: ‎v7/localsearch/localsearch/__init__.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import json
3030
import os
3131

32-
from doit.tools import result_dep
33-
3432
from nikola.plugin_categories import LateTask
3533
from nikola.utils import config_changed, copy_tree, makedirs
3634

@@ -93,11 +91,9 @@ def save_data():
9391
"name": dst_path,
9492
"targets": [dst_path],
9593
"actions": [(save_data, [])],
96-
'uptodate': [config_changed(kw), result_dep('sitemap')]
94+
'uptodate': [config_changed(kw)],
95+
'calc_dep': ['_scan_locs:sitemap']
9796
}
98-
# Note: The task should run everytime a new file is added or a
99-
# file is changed. We cheat, and depend on the sitemap task,
100-
# to run everytime a new file is added.
10197

10298
# Copy all the assets to the right places
10399
asset_folder = os.path.join(os.path.dirname(__file__), "files")

0 commit comments

Comments
 (0)
Please sign in to comment.