eleventy-plugin-rangefind 0.3.0 → 0.3.1
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.
- package/index.js +9 -1
- package/package.json +2 -2
- package/src/render_markup.js +1 -1
package/index.js
CHANGED
|
@@ -36,6 +36,12 @@ export default function rangefindPlugin(eleventyConfig, options = {}) {
|
|
|
36
36
|
assetsDir = "_rangefind",
|
|
37
37
|
// URL prefix/origin baked into indexed result URLs.
|
|
38
38
|
baseUrl = "/",
|
|
39
|
+
// Rangefind config overrides merged into the crawler's generated config
|
|
40
|
+
// (e.g. { targetPostingsPerDoc, analysis, meta, vectors }).
|
|
41
|
+
config = null,
|
|
42
|
+
// Optional async hook run between crawl and build: enrich the crawled
|
|
43
|
+
// documents with computed fields (e.g. embeddings for semantic search).
|
|
44
|
+
enrich = null,
|
|
39
45
|
// Shortcode defaults (overridable per call site).
|
|
40
46
|
src = "/rangefind/",
|
|
41
47
|
assetsBase = "/_rangefind",
|
|
@@ -68,7 +74,9 @@ export default function rangefindPlugin(eleventyConfig, options = {}) {
|
|
|
68
74
|
root: outputRoot,
|
|
69
75
|
scanDir: outputRoot,
|
|
70
76
|
output: join(outputRoot, outputDir),
|
|
71
|
-
baseUrl
|
|
77
|
+
baseUrl,
|
|
78
|
+
config,
|
|
79
|
+
enrich
|
|
72
80
|
});
|
|
73
81
|
|
|
74
82
|
// 2. Copy the client assets next to the site.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eleventy-plugin-rangefind",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Eleventy plugin that indexes your built site with Rangefind (static index + HTTP Range requests, no search server) and drops in the search Web Component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"url": "git+https://github.com/xjodoin/rangefind.git",
|
|
41
41
|
"directory": "packages/eleventy-plugin-rangefind"
|
|
42
42
|
},
|
|
43
|
-
"homepage": "https://
|
|
43
|
+
"homepage": "https://rangefind.dev/docs/plugins/",
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/xjodoin/rangefind/issues"
|
|
46
46
|
}
|
package/src/render_markup.js
CHANGED
|
@@ -25,7 +25,7 @@ export const PART_CLASS_ATTRS = [
|
|
|
25
25
|
export const KNOWN_ATTRS = new Set([...CONFIG_ATTRS, ...PART_CLASS_ATTRS]);
|
|
26
26
|
|
|
27
27
|
// Keys that control markup structure rather than element attributes.
|
|
28
|
-
const CONTROL_KEYS = new Set(["src", "assetsBase", "theme"]);
|
|
28
|
+
const CONTROL_KEYS = new Set(["src", "assetsBase", "theme", "__keywords"]); // __keywords: Nunjucks kwargs marker
|
|
29
29
|
|
|
30
30
|
// camelCase / snake_case -> kebab-case, so `pageSize`, `page_size`, and
|
|
31
31
|
// `page-size` all resolve to the `page-size` attribute the element observes.
|