docusaurus-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 +8 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -32,6 +32,11 @@ module.exports = function rangefindPlugin(context = {}, options = {}) {
|
|
|
32
32
|
const theme = options.theme !== false;
|
|
33
33
|
const assetsDir = options.assetsDir || DEFAULT_ASSETS_DIR;
|
|
34
34
|
const outputDir = options.outputDir || DEFAULT_OUTPUT_DIR;
|
|
35
|
+
// Rangefind config overrides merged into the crawler's generated config,
|
|
36
|
+
// and an optional enrich hook — an async function(docs) or a path to an
|
|
37
|
+
// ES module default-exporting one — run before indexing (embeddings, …).
|
|
38
|
+
const crawlConfig = options.config || null;
|
|
39
|
+
const enrich = options.enrich || null;
|
|
35
40
|
|
|
36
41
|
// Base URL for the injected asset tags. Prefer an explicit override, then the
|
|
37
42
|
// site's own configured baseUrl so the tag src matches the deployed prefix.
|
|
@@ -70,7 +75,9 @@ module.exports = function rangefindPlugin(context = {}, options = {}) {
|
|
|
70
75
|
root: outDir,
|
|
71
76
|
scanDir: outDir,
|
|
72
77
|
output,
|
|
73
|
-
baseUrl: crawlBaseUrl
|
|
78
|
+
baseUrl: crawlBaseUrl,
|
|
79
|
+
config: crawlConfig,
|
|
80
|
+
enrich
|
|
74
81
|
});
|
|
75
82
|
|
|
76
83
|
// Copy the two client assets next to the site. Paths resolve through the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "docusaurus-plugin-rangefind",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Docusaurus plugin that indexes your built site with Rangefind (static search over HTTP Range requests, no server) and injects the drop-in <rangefind-search> web component.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Xavier Jodoin <xavier@jodoin.me>",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "git+https://github.com/xjodoin/rangefind.git",
|
|
38
38
|
"directory": "packages/docusaurus-plugin-rangefind"
|
|
39
39
|
},
|
|
40
|
-
"homepage": "https://
|
|
40
|
+
"homepage": "https://rangefind.dev/docs/plugins/",
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/xjodoin/rangefind/issues"
|
|
43
43
|
}
|