jekyll-lunr 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 99de89a4844d015535858ea0b3d9eefba9731e69badfd8325f89bce839353772
4
- data.tar.gz: 9fbc8df12f97766dec1dc04947a39cfc1e8f9e16e329933345040ba637f60f56
3
+ metadata.gz: d1638c072050e84916f892bb0f1db712e1dec6f17e65447d56e26200b2c26f73
4
+ data.tar.gz: 60638fd94b811724c149a93f9c5a3f3863ae7717b09c3dad4faecaba75f18a58
5
5
  SHA512:
6
- metadata.gz: c92b4f62e2fc76768c849b68f4ffad6387db238b8d6eecf050456b66e000b0ee7fd81c52c499a8c9c18a0381912d19c2f8a1ee84e34d62afc541a39c674f6adf
7
- data.tar.gz: a4a5aed2d731cce40975f7505b6aaf23309c37d2337da3f445916c92fb85262f45e0c3594acf39a01e8916135dec7cf4186b04d4dd34c1733b8ceb1bee7a4812
6
+ metadata.gz: 3f79f6f47efd9717a470d3bb798922b37eb57cf9574ad7d2d46c634aad54e0e17f79ca335791300ab9eb3f7305af5dad415c695d7f14c671f7b63b8fcf6e55d3
7
+ data.tar.gz: 29a76ac9fa8a33f5225b922bfd1baa8c3b95682444373dd5d8409f45c8ca89df8ee9d7b427ecc40ceb8e8327d306e902e989fe72f028f949c7995ca1e187b4c1
data/README.md CHANGED
@@ -23,6 +23,12 @@ Or install it yourself as:
23
23
 
24
24
  $ gem install jekyll-lunr
25
25
 
26
+ Also, add the node packages to your site source:
27
+
28
+ ```bash
29
+ yarn add lunr lunr-languages
30
+ ```
31
+
26
32
  ## Usage
27
33
 
28
34
  Add the plugin to the plugins array in `_config.yml`:
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ['lib']
32
32
 
33
+ spec.add_dependency 'loofah', '~> 2.4'
33
34
  spec.add_development_dependency 'bundler', '~> 2.0'
34
35
  spec.add_development_dependency 'rake', '~> 10.0'
35
36
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'json'
4
4
  require 'open3'
5
+ require 'loofah'
5
6
 
6
7
  module Jekyll
7
8
  module Lunr
@@ -22,7 +23,7 @@ module Jekyll
22
23
  @data ||= documents.map do |doc|
23
24
  doc.data.dup
24
25
  .keep_if { |k,_| fields.include? k }
25
- .merge(content: doc.content,
26
+ .merge(content: Loofah.fragment(doc.content).to_text,
26
27
  url: doc.url,
27
28
  id: doc.url,
28
29
  year: doc.date.year)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Lunr
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-lunr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-05 00:00:00.000000000 Z
11
+ date: 2020-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: loofah
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.4'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -81,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.7.6.2
98
+ rubygems_version: 3.0.3
86
99
  signing_key:
87
100
  specification_version: 4
88
101
  summary: Lunr indexer for Jekyll