@easyops-cn/docusaurus-search-local 0.44.4 → 0.44.6
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.44.6](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.44.5...v0.44.6) (2024-10-08)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* use `require.resolve` for generated js, fixes [#459](https://github.com/easyops-cn/docusaurus-search-local/issues/459) ([4728b28](https://github.com/easyops-cn/docusaurus-search-local/commit/4728b2820d42458673ef35e87f70ec44242f69cf))
|
|
11
|
+
|
|
12
|
+
## [0.44.5](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.44.4...v0.44.5) (2024-08-12)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* update cheerio to 1.0.0, closes [#444](https://github.com/easyops-cn/docusaurus-search-local/issues/444) ([0d70f63](https://github.com/easyops-cn/docusaurus-search-local/commit/0d70f63cb170bac2b51461c0dd6f66a53dff4483))
|
|
18
|
+
|
|
5
19
|
## [0.44.4](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.44.3...v0.44.4) (2024-07-19)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -21,7 +21,7 @@ function generate(config, dir) {
|
|
|
21
21
|
contents.push(`require(${JSON.stringify(require.resolve(`lunr-languages/lunr.${lang}`))})(lunr);`);
|
|
22
22
|
}
|
|
23
23
|
if (language.includes("zh")) {
|
|
24
|
-
contents.push(
|
|
24
|
+
contents.push(`require(${JSON.stringify(require.resolve("@easyops-cn/docusaurus-search-local/dist/client/shared/lunrLanguageZh"))}).lunrLanguageZh(lunr);`);
|
|
25
25
|
}
|
|
26
26
|
if (language.length > 1) {
|
|
27
27
|
contents.push(`require(${JSON.stringify(require.resolve("lunr-languages/lunr.multi"))})(lunr);`);
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parse = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const cheerio = tslib_1.__importStar(require("cheerio"));
|
|
6
6
|
const parseDocument_1 = require("./parseDocument");
|
|
7
7
|
const parsePage_1 = require("./parsePage");
|
|
8
8
|
function parse(html, type, url, { ignoreCssSelectors, forceIgnoreNoIndex }) {
|
|
9
9
|
var _a;
|
|
10
|
-
const $ =
|
|
10
|
+
const $ = cheerio.load(html);
|
|
11
11
|
const robotsMeta = $('meta[name="robots"]');
|
|
12
12
|
if (!forceIgnoreNoIndex && ((_a = robotsMeta.attr("content")) === null || _a === void 0 ? void 0 : _a.includes("noindex"))) {
|
|
13
13
|
// Unlisted content
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyops-cn/docusaurus-search-local",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.6",
|
|
4
4
|
"description": "An offline/local search plugin for Docusaurus v3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@docusaurus/utils-validation": "^2 || ^3",
|
|
38
38
|
"@easyops-cn/autocomplete.js": "^0.38.1",
|
|
39
39
|
"@node-rs/jieba": "^1.6.0",
|
|
40
|
-
"cheerio": "^1.0.0
|
|
40
|
+
"cheerio": "^1.0.0",
|
|
41
41
|
"clsx": "^1.1.1",
|
|
42
42
|
"debug": "^4.2.0",
|
|
43
43
|
"fs-extra": "^10.0.0",
|