Skip to content

Docs search functionality and UI cleanup#2

Merged
frectonz merged 6 commits intofrectonz:mainfrom
yofabr:ui-cleanup
Mar 28, 2026
Merged

Docs search functionality and UI cleanup#2
frectonz merged 6 commits intofrectonz:mainfrom
yofabr:ui-cleanup

Conversation

@yofabr
Copy link
Copy Markdown
Contributor

@yofabr yofabr commented Mar 28, 2026

This PR introduces 2 things.

1. UI Cleanup

Fixed some minor UI issues and added error handler utilities:

  • Added 404 error page with automatic 10-second redirect to dashboard
  • Added user-friendly error messages with accordion dropdown details when Penny server is not running
Screenshot from 2026-03-28 18-16-13

2. Docs Search Functionality

Added full-text search to the documentation site using Orama search engine:

  • Advanced search mode with structured data indexing
  • Breadcrumb navigation showing document hierarchy in search results
  • Highlighted matches using <mark> tags to highlight search terms
  • Content previews showing relevant snippets from matching pages
  • Keyboard shortcut support (Cmd+K / Ctrl+K) to open search
Screenshot from 2026-03-28 21-12-14

Technical Details

  • Created /api/search route with Orama integration
  • Built custom search dialog component with Fumadocs UI components
  • Implemented async page data loading for proper structuredData extraction

@yofabr
Copy link
Copy Markdown
Contributor Author

yofabr commented Mar 28, 2026

@frectonz waiting for your your response.

@frectonz
Copy link
Copy Markdown
Owner

Since the docs page is deployed on Cloudflare Pages, we can't include API routes, so the search endpoint you added won't work.

@frectonz
Copy link
Copy Markdown
Owner

The changes to the dashboard UI are good though. I will merge those if you remove the search tool additions.

@yofabr
Copy link
Copy Markdown
Contributor Author

yofabr commented Mar 28, 2026

Yeah. that's true for static pages. But I made a way for it to generate the static search.json file with datas at /out/api/search.json (which can be accessed in static pages aka cloudflare pages) during build time.

And I tested them out locally with wrangler (Cloudflare Pages local testing)

@yofabr
Copy link
Copy Markdown
Contributor Author

yofabr commented Mar 28, 2026

Static mode (staticGET) generates a static search index during build

@frectonz
Copy link
Copy Markdown
Owner

oh ok nice didn't notice the staticGET

@frectonz frectonz merged commit fecabf0 into frectonz:main Mar 28, 2026
5 of 6 checks passed
@frectonz
Copy link
Copy Markdown
Owner

Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants