Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7e295d46fa51
Choose a base ref
...
head repository: getnikola/plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 197719405a65
Choose a head ref
  • 7 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 22, 2016

  1. Enable filters application in localsearch assets.

    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    6c84525 View commit details
  2. Filters should be applied to the generated json file.

    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    9d28613 View commit details
  3. Adding the timeline so that we regenerate search data when posts are …

    …added.
    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    c28f68c View commit details
  4. Fix misspelled script (From scrip t).

    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    35fa19d View commit details
  5. Unix line endings.

    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    46abc1e View commit details
  6. Do not inline the apply_filters call.

    George Leslie-Waksman committed Jan 22, 2016
    Copy the full SHA
    f68c7b1 View commit details
  7. Merge pull request #127 from gwax/localsearch_fixes

    Various fixes to localsearch plugin
    ralsina committed Jan 22, 2016
    Copy the full SHA
    1977194 View commit details
Showing with 36 additions and 33 deletions.
  1. +6 −3 v7/localsearch/localsearch/__init__.py
  2. +30 −30 v7/localsearch/localsearch/files/tipue_search.html
9 changes: 6 additions & 3 deletions v7/localsearch/localsearch/__init__.py
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
import os

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

# This is what we need to produce:
# var tipuesearch = {"pages": [
@@ -59,6 +59,8 @@ def gen_tasks(self):
kw = {
"translations": self.site.config['TRANSLATIONS'],
"output_folder": self.site.config['OUTPUT_FOLDER'],
"filters": self.site.config['FILTERS'],
"timeline": self.site.timeline,
}

posts = self.site.timeline[:]
@@ -86,17 +88,18 @@ def save_data():
with codecs.open(dst_path, "wb+", "utf8") as fd:
fd.write(output)

yield {
task = {
"basename": str(self.name),
"name": dst_path,
"targets": [dst_path],
"actions": [(save_data, [])],
'uptodate': [config_changed(kw)],
'calc_dep': ['_scan_locs:sitemap']
}
yield apply_filters(task, kw['filters'])

# Copy all the assets to the right places
asset_folder = os.path.join(os.path.dirname(__file__), "files")
for task in copy_tree(asset_folder, kw["output_folder"]):
task["basename"] = str(self.name)
yield task
yield apply_filters(task, kw['filters'])
60 changes: 30 additions & 30 deletions v7/localsearch/localsearch/files/tipue_search.html
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Tipue Search</title>
<meta charset="utf-8">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="assets/css/tipuesearch.css">
<script src="assets/js/tipuesearch_set.js"></script>
<scrip tsrc="assets/js/tipuesearch.js"></script>

</head>
<body>

<div style="float: left;"><input type="text" id="tipue_search_input"></div>
<div style="float: left; margin-left: 13px;"><input type="button" id="tipue_search_button"></div>
<div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
</div>

<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
'mode': 'json',
'contentLocation': 'assets/js/tipuesearch_content.json'
});
});
</script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<title>Tipue Search</title>
<meta charset="utf-8">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="assets/css/tipuesearch.css">
<script src="assets/js/tipuesearch_set.js"></script>
<script src="assets/js/tipuesearch.js"></script>

</head>
<body>

<div style="float: left;"><input type="text" id="tipue_search_input"></div>
<div style="float: left; margin-left: 13px;"><input type="button" id="tipue_search_button"></div>
<div id="tipue_search_content"><div id="tipue_search_loading"></div></div>
</div>

<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch({
'mode': 'json',
'contentLocation': 'assets/js/tipuesearch_content.json'
});
});
</script>
</body>
</html>