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:
parent
bb7cdc6d44
commit
6b211bf008
3 changed files with 560 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue