bridgetown-quick-search 1.0.2 → 1.0.3

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: 3da48f55807b448a214b1c99fed1edf922f6148447651322799c77e300622023
4
- data.tar.gz: 783c276837de361f97849a5f9157bc282cff59174d65ad4b089e60dc22c2039d
3
+ metadata.gz: 4c3e3b71c451c83d2de5f5142453a9f35179b8cca8614a9bce57ffb4ac045738
4
+ data.tar.gz: e77614c353e513793f7c7c9c501d02267cc3918f96233d38d442d5e1154ae75e
5
5
  SHA512:
6
- metadata.gz: 4ad04f2a59cb58f40b2758b75c5855c8c040f14ef65b87b70e936f623cc7cdf7d5db2db77d0105d1adf9d76a46a5a591428e1a0034388dee64fcf01c2caaca4c
7
- data.tar.gz: d4ba6f96e445a9b3b9373c19bbd4b4e9f72d0a2c5b8735fb3287b5752a877ddc560ddf78c99c24a99d96a6da10f861e66ab50d64374fd93f0141cf1787224a45
6
+ metadata.gz: 0ce5a7ca6f45d3d599694a0e03f47d49e545477e3feb26e931c2949f9a667051dab5e3a1b8b27b42cc863ee2892c0106eb0b6e06e07c64dc94cc1a2212d7464e
7
+ data.tar.gz: 4acc808775a1ec7dfa7329d4a803f2997860503c75aa4c5401a46c19a58626443e4a8553120fc807d7daa75516407505f3d07a4e41612fc5f8ca33cebe00bf00
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  ---
3
3
  [
4
+ {%- assign looped = false %}
4
5
  {%- for document in site.documents %}
5
6
  {%- if document.title %}
6
7
  {%- unless document.exclude_from_search %}
8
+ {%- if looped %},{% endif %}
7
9
  {
8
10
  "id": "{{ document.url | slugify }}",
9
11
  "title": {{ document.title | jsonify }},
@@ -17,8 +19,26 @@
17
19
  "tags": {{ document.tags | join: ", " | jsonify }},
18
20
  "url": {{ document.url | jsonify }},
19
21
  "content": {{ document.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
20
- }{% unless forloop.last %},{% endunless %}
22
+ }
23
+ {%- assign looped = true %}
21
24
  {%- endunless %}
22
25
  {%- endif %}
23
26
  {%- endfor %}
27
+ {%- for document in site.pages %}
28
+ {%- if document.name contains ".md" or document.name contains ".html" %}
29
+ {%- if document.title %}
30
+ {%- unless document.exclude_from_search %}
31
+ {%- if looped %},{% endif %}
32
+ {
33
+ "id": "{{ document.url | slugify }}",
34
+ "title": {{ document.title | jsonify }},
35
+ "categories": {{ document.categories | join: ", " | jsonify }},
36
+ "tags": {{ document.tags | join: ", " | jsonify }},
37
+ "url": {{ document.url | jsonify }},
38
+ "content": {{ document.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
39
+ }
40
+ {%- endunless %}
41
+ {%- endif %}
42
+ {%- endif %}
43
+ {%- endfor %}
24
44
  ]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bridgetown
4
4
  module QuickSearch
5
- VERSION = "1.0.2"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgetown-quick-search",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "frontend/javascript/index.js",
5
5
  "repository": {
6
6
  "type": "git",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-quick-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-29 00:00:00.000000000 Z
11
+ date: 2020-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -125,7 +125,7 @@ homepage: https://github.com/bridgetownrb/bridgetown-quick-search
125
125
  licenses:
126
126
  - MIT
127
127
  metadata:
128
- yarn-add: bridgetown-quick-search@1.0.2
128
+ yarn-add: bridgetown-quick-search@1.0.3
129
129
  post_install_message:
130
130
  rdoc_options: []
131
131
  require_paths: