Skip to content

Commit

Permalink
move to pagefind based search
Browse files Browse the repository at this point in the history
  • Loading branch information
yujonglee committed Oct 18, 2024
1 parent c229903 commit bfd9ce5
Show file tree
Hide file tree
Showing 3 changed files with 279 additions and 2 deletions.
23 changes: 22 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,28 @@ module.exports = {
},
],
],
themes: [
[
// https://getcanary.dev/docs/local/integrations/docusaurus#configuration
require.resolve('@getcanary/docusaurus-theme-search-pagefind'),
{
styles: {
'--canary-color-primary-c': 0.015,
'--canary-color-primary-h': 200,
},
includeRoutes: [
'**/docs/**',
'**/blog/**',
'**/guides/**',
'**/success-stories/**',
],
tabs: [
{ name: 'Docs', pattern: '**/{docs,guides}/**' },
{ name: 'Articles', pattern: '**/{blog,success-stories}/**' },
],
},
],
],
plugins: [
[
require.resolve('docusaurus-gtm-plugin'),
Expand Down Expand Up @@ -325,7 +347,6 @@ module.exports = {
archiveBasePath: null,
},
],
['@easyops-cn/docusaurus-search-local', {}],
require.resolve('docusaurus-plugin-image-zoom'),
[
'@docusaurus/plugin-client-redirects',
Expand Down
255 changes: 255 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@easyops-cn/docusaurus-search-local": "0.45.0",
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-client-redirects": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@getcanary/docusaurus-theme-search-pagefind": "^1.0.2",
"@getcanary/web": "^1.0.10",
"@mdx-js/react": "3.0.1",
"@scalar/docusaurus": "0.4.115",
"clsx": "2.1.1",
Expand Down

0 comments on commit bfd9ce5

Please sign in to comment.