# docusaurus-lunr-search-ko

> Offline search component for Docusaurus V2 Korean supported

Latest version **2.1.20** (published 2022-08-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install docusaurus-lunr-search-ko
pnpm add docusaurus-lunr-search-ko
yarn add docusaurus-lunr-search-ko
bun add docusaurus-lunr-search-ko
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.20 |
| Published | 2022-08-26 |
| First published | 2022-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.10.0 |
| Dependencies | 14 |
| Unpacked size | 88.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Praveen N |
| Maintainers | kylianju |
| Keywords | docusaurus, lunr, offline-search, documentation, korean |

## Links

- npm: https://www.npmjs.com/package/docusaurus-lunr-search-ko
- Repository: https://github.com/bclabs-kylian/docusaurus-lunr-search-ko
- Homepage: https://github.com/bclabs-kylian/docusaurus-lunr-search-ko#readme
- Issues: https://github.com/bclabs-kylian/docusaurus-lunr-search-ko/issues
- npm.io page: https://npm.io/package/docusaurus-lunr-search-ko

## Dependencies (14)

- [lunr](https://npm.io/package/lunr.md) ^2.3.8
- [gauge](https://npm.io/package/gauge.md) ^3.0.0
- [unified](https://npm.io/package/unified.md) ^9.0.0
- [hogan.js](https://npm.io/package/hogan.js.md) ^3.0.2
- [to-vfile](https://npm.io/package/to-vfile.md) ^6.1.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [rehype-parse](https://npm.io/package/rehype-parse.md) ^7.0.1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [unist-util-is](https://npm.io/package/unist-util-is.md) ^4.0.2
- [lunr-languages](https://npm.io/package/lunr-languages.md) npm:@eastuni/lunr-languages-ko@^1.4.0
- [autocomplete.js](https://npm.io/package/autocomplete.js.md) ^0.37.0
- [hast-util-select](https://npm.io/package/hast-util-select.md) ^4.0.0
- [hast-util-to-text](https://npm.io/package/hast-util-to-text.md) ^2.0.0

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 2.1.20 (latest) — 2022-08-26
- 2.1.19 — 2022-08-26
- 2.1.18 — 2022-08-26
- 2.1.17 — 2022-08-26
- 2.1.16 — 2022-08-26

## README

Modification of [docusaurus-lunr-search](https://github.com/praveenn77/docusaurus-lunr-search)

Thanks to : [@eastuni/lunr-languages-ko](https://github.com/eastuni/lunr-languages)

Similar Plugin
https://github.com/easyops-cn/docusaurus-search-local

# docusaurus-lunr-search-ko
Offline Search for Docusaurus V2 Korean supported

[Demo Website](https://lelouch77.github.io/docusaurus-lunr-search-multilang/)

[![MIT Licence](https://img.shields.io/github/license/lelouch77/docusaurus-lunr-search)](#)

[![npm version](https://badge.fury.io/js/docusaurus-lunr-search.svg)](https://www.npmjs.com/package/docusaurus-lunr-search)

## Sample
<p align="center">
  <img width="460" height="300" src="https://raw.githubusercontent.com/lelouch77/docusaurus-lunr-search/master/assets/search-offline.png">
</p>


## Prerequisites
`worker_thread` is needed, suggested node version > 12.X
For older version of node use `docusaurus-lunr-search` version `2.1.0`
(`npm i docusaurus-lunr-search@2.1.0`)

## How to Use ?
1. Install this package
```
yarn add docusaurus-lunr-search-ko
```
2. Then run `npm install` to update, build, and link the packages
```
yarn install
```
3. Add the docusaurus-lunr-search-ko plugin to your `docusaurus.config.js`
```
module.exports = {
  // ...
    plugins: [require.resolve('docusaurus-lunr-search-ko')],
}
```
4. Then run docusaurus swizzle
```
yarn run swizzle docusaurus-lunr-search-ko SearchBar -- --danger
```
5. Then build your Docusaurus project
```
yarn build
```
6. Serve your application
```
npx http-server ./build
```

Note: Docusaurus search information can only be generated from a production build. Local development is currently not supported.

## Language options
```
module.exports = {
  // ...
    plugins: [[ require.resolve('docusaurus-lunr-search-ko'), {
      languages: ['en', 'ko'] // language codes
    }]],
}
```
Supports all the language listed here https://github.com/eastuni/lunr-languages

## Other options

### excludeRoutes

You can exclude certain routes from the search by using this option:

```
module.exports = {
  // ...
    plugins: [
    [require.resolve('docusaurus-lunr-search-ko'), {
        excludeRoutes: [
            'docs/changelogs/**/*', // exclude changelogs from indexing
        ]
    }]
  ],
}
```
### indexBaseUrl
Base url will not indexed by default, if you want to index the base url set this option to `true`
```
module.exports = {
  // ...
    plugins: [
        [require.resolve('docusaurus-lunr-search-ko'),
            {
                indexBaseUrl: true
            }
        ]
    ],
}
```
Thanks to [`algolia/docsearch.js`](https://github.com/algolia/docsearch), I modified it to create this search component 

And thanks [cmfcmf](https://github.com/cmfcmf), I used the code from his library [docusaurus-search-local](https://github.com/cmfcmf/docusaurus-search-local) for multi-language support.

---
_Source: https://npm.io/package/docusaurus-lunr-search-ko · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
