@@ -142,7 +142,7 @@ const config: Config = {
142142 routeBasePath : '' ,
143143 } ,
144144 theme : {
145- customCss : require . resolve ( './src/css/custom.css' ) ,
145+ customCss : [ './src/css/custom.css' , './src/css/local-search.css' ] ,
146146 } ,
147147 } satisfies Preset . Options ,
148148 ] ,
@@ -173,6 +173,40 @@ const config: Config = {
173173 color : '#5bbad5' ,
174174 } ,
175175 ] ,
176+ plugins : [
177+ [
178+ '@cmfcmf/docusaurus-search-local' ,
179+ {
180+ indexDocs : true ,
181+ indexDocSidebarParentCategories : 0 ,
182+ includeParentCategoriesInPageTitle : false ,
183+ // whether to index blog pages
184+ indexBlog : true ,
185+
186+ // whether to index static pages
187+ // /404.html is never indexed
188+ indexPages : false ,
189+
190+ // language of your documentation, see next section
191+ language : 'en' ,
192+
193+ // setting this to "none" will prevent the default CSS to be included. The default CSS
194+ // comes from autocomplete-theme-classic, which you can read more about here:
195+ // https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-theme-classic/
196+ // When you want to overwrite CSS variables defined by the default theme, make sure to suffix your
197+ // overwrites with `!important`, because they might otherwise not be applied as expected. See the
198+ // following comment for more information: https://github.com/cmfcmf/docusaurus-search-local/issues/107#issuecomment-1119831938.
199+ maxSearchResults : 10 ,
200+ lunr : {
201+ tokenizerSeparator : / [ \s \- ] + / ,
202+ titleBoost : 5 ,
203+ contentBoost : 1 ,
204+ tagsBoost : 3 ,
205+ parentCategoriesBoost : 2 , // Only used when indexDocSidebarParentCategories > 0
206+ } ,
207+ } ,
208+ ] ,
209+ ] ,
176210 markdown : {
177211 // https://docusaurus.io/docs/migration/v3#using-the-mdx-extension
178212 mdx1Compat : {
0 commit comments