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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c56078135c93bf9dc5852c25f576013894c2b6ba
4
- data.tar.gz: 4c9584eb6fd646b8c407f79d44fb5e8139fceba9
3
+ metadata.gz: 99c36fd28462afe4004e574518dec5529c39261b
4
+ data.tar.gz: 8a7d278d7ca3b340aa0fcaec1ae9a9562257f24e
5
5
  SHA512:
6
- metadata.gz: 0567a65feb14a67a1f3aee5f0c68cb9158ba7deb161a4eb93327f4fa77f922603462649ec718ad7231d3fc35429761dedb721fe2822eb98599ee21fd232da21d
7
- data.tar.gz: c8a5f056c64fa7182d7b77ca0ae63f7b5fedfa53696187534590b3d5a8b36419a963c2877bb03c5ce4c2cb047c85489c349d720d4bfd6fc096975db6bb4e7961
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
- dest_path = File.join(File.expand_path("search", site.dest), @filename)
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
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module LunrJsSearch
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-lunr-js-search-plusplus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian