Skip to content

Commit

Permalink
chore: upgrade [email protected] and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcsapo committed Nov 27, 2024
1 parent fafef98 commit 09f38fb
Show file tree
Hide file tree
Showing 5 changed files with 5,718 additions and 5,729 deletions.
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules
21 changes: 3 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![CI Status](https://github.com/easyops-cn/docusaurus-search-local/workflows/CI/badge.svg?event=push)](https://github.com/easyops-cn/docusaurus-search-local/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/easyops-cn/docusaurus-search-local/badge.svg?branch=master)](https://coveralls.io/github/easyops-cn/docusaurus-search-local?branch=master)

An offline/local search plugin for [Docusaurus v2](https://v2.docusaurus.io/), which supports multiple languages, especially optimized for language of zh.
An offline/local search plugin for [Docusaurus v2](https://v2.docusaurus.io/), which supports multiple languages.

> Originally forked from [cmfcmf/docusaurus-search-local](https://github.com/cmfcmf/docusaurus-search-local).
>
Expand Down Expand Up @@ -43,32 +43,20 @@ module.exports = {
plugins: [
// ... Your other plugins.
[
require.resolve("docusaurus-plugin-search-local"),
require.resolve('docusaurus-plugin-search-local'),
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
// When applying `zh` in language, please install `nodejieba` in your project.
},
],
],
};
````

> Notice!
>
> When applying `"zh"` in language, please also install `nodejieba` in your project, it became a peer dependency since v0.7.0.
```shell
npm install nodejieba
# or
yarn add nodejieba
```

## Plugin Options

| Name | Type | Default | Description |
Expand Down Expand Up @@ -136,7 +124,7 @@ E.g.:
--search-local-highlight-color: #5468ff;
}

html[data-theme="dark"] {
html[data-theme='dark'] {
--search-local-highlight-color: #d23669;
}
```
Expand All @@ -156,9 +144,6 @@ In case some specific errors occurred:
- Try using docusaurus-plugin-search-local >= v0.16.0 with Docusaurus >= v2.0.0-alpha.73
- Try using docusaurus-plugin-search-local between v0.14.0 and v0.15.1 with Docusaurus between v2.0.0-alpha.68 and v2.0.0-alpha.72
- Or try using docusaurus-plugin-search-local <= v0.13.1 with Docusaurus <= v2.0.0-alpha.66
- `Error: Command failed with signal "SIGSEGV"`:
- This is probably caused by a [known issue](https://github.com/yanyiwu/nodejieba/issues/187) introduced by `[email protected]`, if you enabled language of zh.
- Try downgrading `nodejieba` to `2.4.2` and it will work again, see discussions in [#47](https://github.com/easyops-cn/docusaurus-search-local/issues/47).

## Further Reading

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Once the prep work is completed, the actual release is straight forward:
* First, ensure that you have installed your projects dependencies:

```sh
npm install
yarn install
```

* Second, ensure that you have obtained a
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
},
"volta": {
"node": "18.18.2",
"yarn": "3.8.0"
"yarn": "4.5.3"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
Loading

0 comments on commit 09f38fb

Please sign in to comment.