Gathering detailed insights and metrics for @aldridged/docusaurus-plugin-lunr
Gathering detailed insights and metrics for @aldridged/docusaurus-plugin-lunr
Gathering detailed insights and metrics for @aldridged/docusaurus-plugin-lunr
Gathering detailed insights and metrics for @aldridged/docusaurus-plugin-lunr
npm install @aldridged/docusaurus-plugin-lunr
v1.0.0-alpha.10
Published on 06 Jul 2020
v1.0.0-alpha.9
Published on 06 Jul 2020
Bump dependencies
Published on 22 Apr 2020
Minor bugfix release
Published on 19 Feb 2020
Bump Docusaurus dependencies
Published on 19 Feb 2020
Minor bugfix release
Published on 18 Feb 2020
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
50 Stars
25 Commits
5 Forks
3 Watching
21 Branches
2 Contributors
Updated on 11 May 2024
TypeScript (55.48%)
JavaScript (35.45%)
CSS (9.07%)
Cumulative downloads
Total Downloads
Last day
22.1%
166
Compared to previous day
Last week
91.9%
825
Compared to previous week
Last month
-78%
2,290
Compared to previous month
Last year
53.4%
28,522
Compared to previous year
10
3
Docusaurus v2 plugin to create a local search index for use with Lunr.js
Note: This library was created with typescript-starter. Currently, the
test
target fails with Prettier formatting compliance errors. The plugin does build and run, so I'm ignoring Prettier for now.
Install the plugin with npm:
1npm install --save @aldridged/docusaurus-plugin-lunr
Add the plugin do docusaurus.config.js
:
1module.exports = { 2 // ... 3 plugins: [ 4 // ... 5 '@aldridged/docusaurus-plugin-lunr' 6 ] 7};
The plugin watches and processes markdown files in a similar manner to the official
docusaurus-plugin-content-docs plugin. The content is stripped of HTML tags and Markdown formatting,
and the resulting plaintext is added to a Lunr.js index which gets serialized to the standard Docusaurus v2 plugin contentLoaded createData output location (by default, <repo>/.docusaurus/docusaurus-plugin-lunr/search-index.json
).
The index contains the following fields for each document:
null
if no versions are presentThe plugin includes a theme SearchBar theme component which consumes the Lunr index. By including the plugin in the
Docusaurus config, the Navbar will include the SearchBar component which uses the generated search index. This works
because the plugin-generated index is available via import, as the Docusaurus v2 core Webpack configuration configures
an alias for @generated
.
The custom React hook used by the SearchBar component performs a dynamic import via import(@site/versions.json)
. If
a versions.json file is not present at the root of your docs repo, this will throw, and you apparently not catch that
error and use a default empty array. The versions.json file is not created until you use the Docusaurus CLI to archive
a varsion. Note that this plugin does not actually require you to have versions -- it only needs version.json, so the
current suggestion is to manually create the file with emtpy array contents.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More