Skip to content

Commit

Permalink
Search content must change if any file changed.
Browse files Browse the repository at this point in the history
The sitemap changes only if a new file has been added, but we can use
these files as dynamic dependencies for the search plugin.
  • Loading branch information
punchagan committed Sep 19, 2015
1 parent 466ee25 commit 50be615
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions v7/localsearch/localsearch/__init__.py
Expand Up @@ -29,8 +29,6 @@
import json
import os

from doit.tools import result_dep

from nikola.plugin_categories import LateTask
from nikola.utils import config_changed, copy_tree, makedirs

Expand Down Expand Up @@ -93,11 +91,9 @@ def save_data():
"name": dst_path,
"targets": [dst_path],
"actions": [(save_data, [])],
'uptodate': [config_changed(kw), result_dep('sitemap')]
'uptodate': [config_changed(kw)],
'calc_dep': ['_scan_locs:sitemap']
}
# Note: The task should run everytime a new file is added or a
# file is changed. We cheat, and depend on the sitemap task,
# to run everytime a new file is added.

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

0 comments on commit 50be615

Please sign in to comment.