Skip to content

Commit

Permalink
feat: improve the search functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr committed Apr 26, 2022
1 parent aa171cb commit fe0047c
Show file tree
Hide file tree
Showing 3 changed files with 174 additions and 77 deletions.
21 changes: 15 additions & 6 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ const config = {
}),

plugins: [
[
require.resolve('@cmfcmf/docusaurus-search-local'),
{
indexBlog: false, // we are not using the blog features.
},
],
[
require.resolve('docusaurus-plugin-drawio'),
{}
Expand All @@ -166,6 +160,21 @@ const config = {
// },
// ],
],
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
{
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
indexDocs: true,
indexBlog: false,
docsRouteBasePath: ['/'],
docsDir: 'docs',
highlightSearchTermsOnTargetPage: true,
language: ['en'],
},
],
]
};

module.exports = config;
228 changes: 158 additions & 70 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"ts:check": "tsc --resolveJsonModule"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^0.10.0",
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/module-type-aliases": "^2.0.0-beta.18",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@docusaurus/theme-live-codeblock": "^2.0.0-beta.18",
"@easyops-cn/docusaurus-search-local": "^0.23.1",
"@mdx-js/react": "^1.6.21",
"@tsconfig/docusaurus": "^1.0.5",
"@types/node": "^17.0.25",
Expand Down

0 comments on commit fe0047c

Please sign in to comment.