feat(docs): add local search to Docusaurus site
Add @easyops-cn/docusaurus-search-local (v0.55.1) for offline/local full-text search across all documentation pages. - Search bar appears in the navbar (Ctrl/Cmd+K shortcut) - Builds a search index at build time — no external service needed - Highlights matched terms on target page after clicking a result - Dedicated /search page for expanded results - Blog indexing disabled (blog is off) - docsRouteBasePath set to '/' to match existing docs routing
This commit is contained in:
@@ -26,6 +26,20 @@ const config: Config = {
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
themes: [
|
||||
[
|
||||
require.resolve('@easyops-cn/docusaurus-search-local'),
|
||||
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
|
||||
({
|
||||
hashed: true,
|
||||
language: ['en'],
|
||||
indexBlog: false,
|
||||
docsRouteBasePath: '/',
|
||||
highlightSearchTermsOnTargetPage: true,
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
|
||||
Reference in New Issue
Block a user