jekyll-lunr-js-search-plusplus 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll_lunr_js_search/indexer.rb +3 -3
- data/lib/jekyll_lunr_js_search/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99c36fd28462afe4004e574518dec5529c39261b
|
4
|
+
data.tar.gz: 8a7d278d7ca3b340aa0fcaec1ae9a9562257f24e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7773bac093549f4f69478f344158d4ceea697c672e733d9e48b48f46a80137d2c2459c19ed512781929d62a498edf72a2849cbaebe6681481ddfe6d2bd6373d
|
7
|
+
data.tar.gz: 4b9977695386b99f1dcb1bd0e214540c702a25f0e283c12835803da26f8bfb1a69ddee3f211a53003a1e920b61f049293d390aa8b67be4983d0078ec8d02e0b5
|
@@ -37,6 +37,8 @@ module Jekyll
|
|
37
37
|
# Index all pages except pages matching any value in config['lunr_excludes'] or with date['exclude_from_search']
|
38
38
|
# The main content from each page is extracted and saved to disk as json
|
39
39
|
def generate(site)
|
40
|
+
search_json_location = File.join(File.expand_path("search", site.dest), @filename)
|
41
|
+
|
40
42
|
if @dev_mode && File.exist?(search_json_location)
|
41
43
|
search_json = JSON.parse(File.open(search_json_location).read)
|
42
44
|
if search_json["generation_time"] && Date.strptime(search_json["generation_time"], @generation_strftime).day == Time.now.day
|
@@ -84,9 +86,7 @@ module Jekyll
|
|
84
86
|
# Create destination directory if it doesn't exist yet. Otherwise, we cannot write our file there.
|
85
87
|
Dir::mkdir(site.dest) unless File.directory?(site.dest)
|
86
88
|
|
87
|
-
|
88
|
-
|
89
|
-
File.open(dest_path, "w") do |file|
|
89
|
+
File.open(search_json_location, "w") do |file|
|
90
90
|
file.write(JSON.pretty_generate(json))
|
91
91
|
end
|
92
92
|
|