Docsearch

Pass docsearch to theme default to add a

Docsearch
on navbar

docsearch contain these main props: appId, apiKey,indexName

Complete options can be found

here

All provided by Docsearch.

vite.config.(js|ts)
import { defineConfig  } from 'vite'
import { sveltepress  } from '@sveltepress/vite'
import { defaultTheme  } from '@sveltepress/theme-default'

export default defineConfig ({
  plugins : [
    sveltepress ({
      theme : defaultTheme ({
        docsearch : {
          appId : 'XXX',
          apiKey : 'XXX',
          indexName : 'XXX',
        }
      })
    })
  ]
})
ts
Last update at: 2024/02/24 03:37:18