@easyops-cn/docusaurus-search-local 0.48.3 → 0.48.5
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.48.5](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.48.4...v0.48.5) (2025-02-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* fix contextual search, closes [#380](https://github.com/easyops-cn/docusaurus-search-local/issues/380) ([2a6d9d4](https://github.com/easyops-cn/docusaurus-search-local/commit/2a6d9d4f6ad7daea4f2c3c41604494a6a94492f3))
|
|
11
|
+
|
|
12
|
+
## [0.48.4](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.48.3...v0.48.4) (2025-01-20)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* handle keywords stemmer, fix [#487](https://github.com/easyops-cn/docusaurus-search-local/issues/487) ([23ba48d](https://github.com/easyops-cn/docusaurus-search-local/commit/23ba48deef88b6dc081b986bda47c938bec26119))
|
|
18
|
+
|
|
5
19
|
## [0.48.3](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.48.2...v0.48.3) (2025-01-16)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -70,8 +70,14 @@ export default function SearchBar({ handleSearchBarToggle, }) {
|
|
|
70
70
|
const search = useRef(null);
|
|
71
71
|
const prevSearchContext = useRef("");
|
|
72
72
|
const [searchContext, setSearchContext] = useState("");
|
|
73
|
+
const prevVersionUrl = useRef(baseUrl);
|
|
73
74
|
useEffect(() => {
|
|
74
75
|
if (!Array.isArray(searchContextByPaths)) {
|
|
76
|
+
if (prevVersionUrl.current !== versionUrl) {
|
|
77
|
+
// Reset index state map once version url is changed.
|
|
78
|
+
indexStateMap.current.delete("");
|
|
79
|
+
prevVersionUrl.current = versionUrl;
|
|
80
|
+
}
|
|
75
81
|
return;
|
|
76
82
|
}
|
|
77
83
|
let nextSearchContext = "";
|
|
@@ -9,7 +9,7 @@ function parseDocument($) {
|
|
|
9
9
|
const $pageTitle = $("article h1").first();
|
|
10
10
|
const pageTitle = $pageTitle.text();
|
|
11
11
|
const description = $("meta[name='description']").attr("content") || "";
|
|
12
|
-
const keywords = $("meta[name='keywords']").attr("content") || "";
|
|
12
|
+
const keywords = ($("meta[name='keywords']").attr("content") || "").replace(/,/g, ", ");
|
|
13
13
|
const sections = [];
|
|
14
14
|
const breadcrumb = [];
|
|
15
15
|
const navbarActiveItem = $(".navbar__link--active");
|