Skip to content

Commit

Permalink
feat: use indexPages for docusaurus-search-local (#123)
Browse files Browse the repository at this point in the history
Enables `indexPages` but seems like theres some tweaks on it. I have
found this issue:
easyops-cn/docusaurus-search-local#220

Where a user from 2022 using the same library had similar problems to
us, the thing is that FAQ contents are not being listed as part of
search bar results.

I will merge this as part of config and to test in production, but we
are likely to follow up with package maintainers and get back to this.
  • Loading branch information
LeoBorai authored Jul 23, 2024
1 parent 0883552 commit ff62b1f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
7 changes: 1 addition & 6 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,9 @@ const config: Config = {
require.resolve("@easyops-cn/docusaurus-search-local"),
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
{
// ... Your options.
// `hashed` is recommended as long-term-cache of index file is possible.
hashed: true,
// For Docs using Chinese, The `language` is recommended to set to:
// ```
// language: ["en", "zh"],
// ```
docsRouteBasePath: "/",
indexPages: true,
},
],
],
Expand Down
8 changes: 4 additions & 4 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 @@ -18,7 +18,7 @@
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-content-blog": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@easyops-cn/docusaurus-search-local": "^0.44.0",
"@easyops-cn/docusaurus-search-local": "^0.44.4",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^2.3.0",
Expand Down

0 comments on commit ff62b1f

Please sign in to comment.