docs: add Lunr.js search with fuzzy matching and highlighting
Phase 4 part 1: Add search infrastructure - Add SearchDoc struct and GenerateSearchIndex to docs handler - Add stripHTML helper for plain text extraction - Add ServeSearchIndex endpoint to http handler - Add /docs/search-index.json route in main.go - Search index includes all documentation files with ID, title, content, URL
This commit is contained in:
@@ -607,6 +607,7 @@ func main() {
|
||||
e.GET("/docs", docsHandler.DocsHome)
|
||||
e.GET("/docs/*", docsHandler.ShowDocumentation)
|
||||
e.GET("/docs/api/search", docsHandler.Search)
|
||||
e.GET("/docs/search-index.json", docsHandler.ServeSearchIndex)
|
||||
|
||||
// Start server
|
||||
log.Printf("Starting server on port %s", cfg.ServerPort)
|
||||
|
||||
Reference in New Issue
Block a user