
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
docusaurus-lunr-search
Advanced tools
Offline Search for Docusaurus V2
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
)
npm i docusaurus-lunr-search --save
npm install
to update, build, and link the packagesnpm install
docusaurus.config.js
module.exports = {
// ...
plugins: [require.resolve('docusaurus-lunr-search')],
}
npm run build
npm run serve
or
npx http-server ./build
Note: Docusaurus search information can only be generated from a production build. Local development is currently not supported.
languages
) in the pluginmodule.exports = {
// ...
plugins: [[ require.resolve('docusaurus-lunr-search'), {
languages: ['en', 'de'] // language codes
}]],
}
Supports all the language listed here https://github.com/MihaiValentin/lunr-languages
Option | Type | Default | Description |
---|---|---|---|
languages | Array | ['en'] | Language codes to use for stemming, Supports all the language listed here https://github.com/MihaiValentin/lunr-languages |
indexBaseUrl | Boolean | false | Base url will not indexed by default, if you want to index the base url set this option to true |
excludeRoutes | Array | [] | Exclude certain routes from the search |
includeRoutes | Array | [] | Include only specific routes for search |
stopWords | Array | [] | Add stop words(words that are exclude from search result) to the search index |
excludeTags | Array | [] | Exclude certain tags from the search |
disableVersioning | Boolean | false | Docs versions are displayed by default. If you want to hide it, set this plugin option to true |
By default the library will search for heading only in the children of .markdown
element.
If you are using a FrontMatter and you have headings that are encapsulated by other elements, such as divs, then add the attribute data-search-children
to the elements having headings.
Check this issue #115 for more detail
Thanks to algolia/docsearch.js
, I modified it to create this search component
And thanks cmfcmf, I used the code from his library docusaurus-search-local for multi-language support.
Checkout the releases page for changelog.
FAQs
Offline search component for Docusaurus V3
The npm package docusaurus-lunr-search receives a total of 35,867 weekly downloads. As such, docusaurus-lunr-search popularity was classified as popular.
We found that docusaurus-lunr-search demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.