Skip to content

Commit

Permalink
docs(website): add local content search based on lunr plugin (#4348)
Browse files Browse the repository at this point in the history
* docs(website): add local content search based on lunr plugin

* update deps

* check license
  • Loading branch information
m1911star authored Mar 12, 2024
1 parent ae54594 commit bd3b8bd
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 1 deletion.
2 changes: 2 additions & 0 deletions website/DEPENDENCIES.node.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"@docusaurus/[email protected]","MIT","https://github.com/facebook/docusaurus"
"@mdx-js/[email protected]","MIT","https://github.com/mdx-js/mdx"
"[email protected]","MIT","https://github.com/lukeed/clsx"
"[email protected]","MIT","https://github.com/lelouch77/docusaurus-lunr-search"
"[email protected]","MIT","https://github.com/gabrielcsapo/docusaurus-plugin-image-zoom"
"[email protected]","MIT","https://github.com/olivernn/lunr.js"
"[email protected]","MIT","https://github.com/FormidableLabs/prism-react-renderer"
"[email protected]","MIT","https://github.com/facebook/react"
"[email protected]","MIT","https://github.com/facebook/react"
5 changes: 5 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ This command generates static content into the `build` directory and can be serv
## Dependencies

Generate dependencies by `npx license-checker --production --excludePrivatePackages --csv > DEPENDENCIES.node.csv`


## For content search

Since search plugin can not work with `pnpm start`, for testing please run `pnpm build && pnpm serve`.
3 changes: 2 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ const config = {
},
],
},
]
],
require.resolve('docusaurus-lunr-search')
],

themeConfig:
Expand Down
2 changes: 2 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"@docusaurus/preset-classic": "^3.1",
"@mdx-js/react": "^3",
"clsx": "^1.2.1",
"docusaurus-lunr-search": "^3.3.2",
"docusaurus-plugin-image-zoom": "^0.1.1",
"lunr": "^2.3.9",
"prism-react-renderer": "^1.3.5",
"react": "^18",
"react-dom": "^18"
Expand Down
Loading

0 comments on commit bd3b8bd

Please sign in to comment.