jekyll-client-search 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/README.md +15 -15
- data/lib/jekyll/client_search/related_tag.rb +4 -0
- data/lib/jekyll/client_search/script_tags.rb +9 -5
- data/lib/jekyll/client_search/search_tag.rb +2 -2
- data/lib/jekyll/client_search/version.rb +1 -1
- metadata +9 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2d41bdcd8b525ad91373a75a42687832d709313fb347c818cd4d2b0b729f17a0
|
|
4
|
+
data.tar.gz: aa8971a61b0eb2d38d98e47fa6fe93063f8a3558320fec433d7ea769bf741ced
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8ae1fc4471054e91b1c67221b0dbe5c5b9939bb9fe9960b2cf993bdac5f39b08ff09325c553d5916a38bdbac91232d213416d3b42ae4cd8f5fb0dad30fc9815
|
|
7
|
+
data.tar.gz: 38677eba44dd93575c66c206d47fdd2dc0ae576f224079ccb135dc2a0d7b39f6a3ddc6c411d7fc552b7934b9d2b751ab5c12af0d7c6eeb72ccbd2713a641f75e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2 — 2026-12-03
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- `{% search_form %}` and `{% search_dropdown %}` now emit `<script defer>`
|
|
8
|
+
tags — runtime scripts no longer block HTML parsing. Deferred scripts
|
|
9
|
+
execute in document order after parsing, keeping the engine → runtime
|
|
10
|
+
config → shared → tag → adapter chain intact and guaranteeing the DOM is
|
|
11
|
+
ready when adapters self-invoke. `{% related_articles %}` scripts stay
|
|
12
|
+
synchronous so the documented inline `ClientSearchRelated.run({...})`
|
|
13
|
+
customization pattern keeps working.
|
|
14
|
+
- npm dev-deps: `markdownlint-cli2` 0.24.0 → 0.24.2, `eslint` ~10.14.0 →
|
|
15
|
+
~10.15.0.
|
|
16
|
+
- `jsdom` test-environment bump ^30.1.3 → ^31.0.1 — v31 breaking areas
|
|
17
|
+
(napi-rs canvas backend, CSS engine rewrite, blocking-script parse
|
|
18
|
+
pauses, `load` now window-only, `document.open` listener clearing) are
|
|
19
|
+
unused by the suite; all 156 tests pass.
|
|
20
|
+
- Dev-tooling bumps: `ollama-ruby` 1.26.0 → 1.27.2, `rubocop` 1.92.2 →
|
|
21
|
+
1.92.3 (plus transitive: `infobar` 0.17.0, `complex_config` 0.28.0,
|
|
22
|
+
`excon` 1.12.0, `kramdown` 2.6.1, `parser` 3.3.14.0, `prism` 2.1.0).
|
|
23
|
+
- Development Ruby pin bumped to 3.4.13 (CVE-2026-132825); `ruby/setup-ruby` bumped to v1.343.0.
|
|
24
|
+
- npm override: `cross-spawn` ^7.1.0 — fixes GHSA-ghv9-86vm-4v8m
|
|
25
|
+
(critical, Windows command injection), a transitive eslint dep pinned to
|
|
26
|
+
^7.0.6.
|
|
27
|
+
|
|
28
|
+
## 0.5.1 — 2026-11-10
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- Gemspec `description` now renders as RDoc on rubygems.org — the heredoc
|
|
33
|
+
opens with an `==`-level heading at column 0 so the gem page shows
|
|
34
|
+
headings and bullet lists instead of one plain paragraph.
|
|
35
|
+
|
|
3
36
|
## 0.5.0 — 2026-11-08
|
|
4
37
|
|
|
5
38
|
### Added
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# jekyll-client-search
|
|
1
|
+
# jekyll-client-search <a href="https://gundestrup.github.io/flow/"><img align="right" src="https://gundestrup.github.io/flow/assets/badges/part-of-flow.svg?v=2" alt="Part of Flow software" height="40"></a>
|
|
2
2
|
|
|
3
3
|
[](https://codecov.io/gh/gundestrup/jekyll-client-search)
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://www.ruby-lang.org/)
|
|
11
11
|
[](https://jekyllrb.com/)
|
|
12
12
|
[](LICENSE)
|
|
13
|
-
[
|
|
13
|
+
[<img src="https://devin.ai/assets/askdeepwiki.png" alt="Ask DeepWiki" height="20"/>](https://deepwiki.com/gundestrup/jekyll-client-search)
|
|
14
14
|
[](#testing-strategy)
|
|
15
15
|
[](https://semgrep.dev)
|
|
16
16
|
[](https://www.codefactor.io/repository/github/gundestrup/jekyll-client-search)
|
|
@@ -1075,10 +1075,10 @@ The sections below show the manual `<script>` setup for each engine.
|
|
|
1075
1075
|
<div id="search-status" aria-live="polite"></div>
|
|
1076
1076
|
<div id="search-results"></div>
|
|
1077
1077
|
<script src="https://cdn.jsdelivr.net/npm/minisearch@7.2.0/dist/umd/index.min.js"
|
|
1078
|
-
crossorigin="anonymous"></script>
|
|
1079
|
-
<script src="/assets/search-runtime-config.js"></script>
|
|
1080
|
-
<script src="/assets/client-search-base.js"></script>
|
|
1081
|
-
<script src="/assets/adapters/minisearch.js"></script>
|
|
1078
|
+
crossorigin="anonymous" defer></script>
|
|
1079
|
+
<script src="/assets/search-runtime-config.js" defer></script>
|
|
1080
|
+
<script src="/assets/client-search-base.js" defer></script>
|
|
1081
|
+
<script src="/assets/adapters/minisearch.js" defer></script>
|
|
1082
1082
|
```
|
|
1083
1083
|
|
|
1084
1084
|
### ElasticLunr
|
|
@@ -1091,10 +1091,10 @@ The sections below show the manual `<script>` setup for each engine.
|
|
|
1091
1091
|
<div id="search-status" aria-live="polite"></div>
|
|
1092
1092
|
<div id="search-results"></div>
|
|
1093
1093
|
<script src="https://cdn.jsdelivr.net/npm/elasticlunr@0.9.5/elasticlunr.min.js"
|
|
1094
|
-
crossorigin="anonymous"></script>
|
|
1095
|
-
<script src="/assets/search-runtime-config.js"></script>
|
|
1096
|
-
<script src="/assets/client-search-base.js"></script>
|
|
1097
|
-
<script src="/assets/adapters/elasticlunr.js"></script>
|
|
1094
|
+
crossorigin="anonymous" defer></script>
|
|
1095
|
+
<script src="/assets/search-runtime-config.js" defer></script>
|
|
1096
|
+
<script src="/assets/client-search-base.js" defer></script>
|
|
1097
|
+
<script src="/assets/adapters/elasticlunr.js" defer></script>
|
|
1098
1098
|
```
|
|
1099
1099
|
|
|
1100
1100
|
### Semantic
|
|
@@ -1105,11 +1105,11 @@ only while Jekyll builds the document vectors. The first query downloads the
|
|
|
1105
1105
|
q8 browser model (about 325 MB for EmbeddingGemma); the browser caches it.
|
|
1106
1106
|
|
|
1107
1107
|
```html
|
|
1108
|
-
<script src="/assets/search-runtime-config.js"></script>
|
|
1109
|
-
<script src="/assets/search-embedder-config.js"></script>
|
|
1110
|
-
<script src="/assets/query-embedders/transformers.js"></script>
|
|
1111
|
-
<script src="/assets/client-search-base.js"></script>
|
|
1112
|
-
<script src="/assets/adapters/semantic.js"></script>
|
|
1108
|
+
<script src="/assets/search-runtime-config.js" defer></script>
|
|
1109
|
+
<script src="/assets/search-embedder-config.js" defer></script>
|
|
1110
|
+
<script src="/assets/query-embedders/transformers.js" defer></script>
|
|
1111
|
+
<script src="/assets/client-search-base.js" defer></script>
|
|
1112
|
+
<script src="/assets/adapters/semantic.js" defer></script>
|
|
1113
1113
|
```
|
|
1114
1114
|
|
|
1115
1115
|
The default library is loaded from jsDelivr and the model from Hugging Face.
|
|
@@ -82,6 +82,10 @@ module Jekyll
|
|
|
82
82
|
baseurl.empty? ? "" : "/#{baseurl}"
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
+
# Unlike ScriptTags consumers, these stay synchronous on purpose: the
|
|
86
|
+
# documented customization pattern is an inline
|
|
87
|
+
# `ClientSearchRelated.run({...})` call right after the script tags,
|
|
88
|
+
# which would run before a deferred client-search-related.js.
|
|
85
89
|
def build_scripts(prefix)
|
|
86
90
|
return "" unless @include_scripts
|
|
87
91
|
|
|
@@ -9,15 +9,19 @@ module Jekyll
|
|
|
9
9
|
module ScriptTags
|
|
10
10
|
private
|
|
11
11
|
|
|
12
|
+
# Script order matters (engine -> runtime config -> shared -> tag ->
|
|
13
|
+
# adapter), so `defer` is used rather than `async`: deferred scripts
|
|
14
|
+
# execute in document order after parsing, keeping the chain intact
|
|
15
|
+
# without blocking rendering.
|
|
12
16
|
def script_tags(configuration, prefix, tag_asset, extra: [])
|
|
13
17
|
scripts = []
|
|
14
18
|
engine = engine_script(configuration)
|
|
15
19
|
scripts << engine if engine
|
|
16
|
-
scripts << "<script src=\"#{prefix}/assets/search-runtime-config.js\"></script>"
|
|
20
|
+
scripts << "<script src=\"#{prefix}/assets/search-runtime-config.js\" defer></script>"
|
|
17
21
|
scripts.concat(extra)
|
|
18
|
-
scripts << "<script src=\"#{prefix}/assets/client-search-shared.js\"></script>"
|
|
19
|
-
scripts << "<script src=\"#{prefix}/assets/#{tag_asset}\"></script>"
|
|
20
|
-
scripts << "<script src=\"#{prefix}/assets/adapters/#{configuration.engine}.js\"></script>"
|
|
22
|
+
scripts << "<script src=\"#{prefix}/assets/client-search-shared.js\" defer></script>"
|
|
23
|
+
scripts << "<script src=\"#{prefix}/assets/#{tag_asset}\" defer></script>"
|
|
24
|
+
scripts << "<script src=\"#{prefix}/assets/adapters/#{configuration.engine}.js\" defer></script>"
|
|
21
25
|
scripts.map { |script| " #{script}" }.join("\n")
|
|
22
26
|
end
|
|
23
27
|
|
|
@@ -25,7 +29,7 @@ module Jekyll
|
|
|
25
29
|
url = configuration.engine_url
|
|
26
30
|
return nil unless url
|
|
27
31
|
|
|
28
|
-
attrs = ["src=\"#{CGI.escapeHTML(url)}\""]
|
|
32
|
+
attrs = ["src=\"#{CGI.escapeHTML(url)}\"", "defer"]
|
|
29
33
|
if configuration.engine_crossorigin
|
|
30
34
|
crossorigin = CGI.escapeHTML(configuration.engine_crossorigin)
|
|
31
35
|
attrs << "crossorigin=\"#{crossorigin}\""
|
|
@@ -80,14 +80,14 @@ module Jekyll
|
|
|
80
80
|
def embedder_scripts(configuration, prefix)
|
|
81
81
|
return [] unless semantic_with_embedder?(configuration)
|
|
82
82
|
|
|
83
|
-
scripts = ["<script src=\"#{prefix}/assets/search-embedder-config.js\"></script>"]
|
|
83
|
+
scripts = ["<script src=\"#{prefix}/assets/search-embedder-config.js\" defer></script>"]
|
|
84
84
|
embedder_asset = configuration.query_embedder_asset
|
|
85
85
|
# simplecov:disable branch
|
|
86
86
|
# Defensive guard: semantic_with_embedder? already excludes the "none"
|
|
87
87
|
# type, and both "transformers" and "ollama_api" always return an asset.
|
|
88
88
|
# This branch is unreachable with current embedder types but protects
|
|
89
89
|
# against future types that may have no script asset.
|
|
90
|
-
scripts << "<script src=\"#{prefix}/#{embedder_asset}\"></script>" if embedder_asset
|
|
90
|
+
scripts << "<script src=\"#{prefix}/#{embedder_asset}\" defer></script>" if embedder_asset
|
|
91
91
|
# simplecov:enable branch
|
|
92
92
|
scripts
|
|
93
93
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-client-search
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Svend Gundestrup
|
|
@@ -29,8 +29,14 @@ dependencies:
|
|
|
29
29
|
- - "<"
|
|
30
30
|
- !ruby/object:Gem::Version
|
|
31
31
|
version: '5.0'
|
|
32
|
-
description:
|
|
33
|
-
|
|
32
|
+
description: |
|
|
33
|
+
== Client-side search indexes for Jekyll
|
|
34
|
+
|
|
35
|
+
Generates a configurable JSON search index and ships pluggable browser
|
|
36
|
+
runtime adapters for client-side JavaScript search engines.
|
|
37
|
+
|
|
38
|
+
* Collections, frontmatter fields and output path configurable
|
|
39
|
+
* Client-side runtime stays framework-agnostic
|
|
34
40
|
email:
|
|
35
41
|
- svend@gundestrup.dk
|
|
36
42
|
executables: []
|