feat(docs): dynamic version badge + command-palette search empty state#410
Merged
Conversation
- Hero version badge pulled at build time (latest echo/v5 via Go module proxy, with fallback) instead of hardcoded v5.2 — refreshes via the daily cron. - Replace the empty Pagefind search modal with a command-palette launchpad (Start here / Popular quick links + shortcut footer); shown only while the query is empty, hidden once results appear. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- github.ts: require a 'vX' tag (reject empty/garbage so the badge can't render blank), and add a 5s fetch timeout to both build-time fetches so a hung connection falls back instead of stalling the build. - Search.astro: bound the empty-state MutationObserver with a 10s timeout + dev-only warning, so it can't watch the whole body forever if Pagefind never mounts (dev) or selectors change upstream. Mark decorative icons aria-hidden. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two homepage/UX polish items.
Dynamic version badge
The hero badge was hardcoded
Echo v5.2 — now released. It now pulls the latest releasedecho/v5at build time (via the Go module proxy — canonical and v5-only, with a graceful fallback) insrc/data/github.ts, the same mechanism as the GitHub star count. The daily deploy cron keeps it fresh. (Live latest is currentlyv5.2.1.)Command-palette search empty state
The Pagefind search modal showed a large empty void before typing. Replaced it with a launchpad (the Algolia/cmdk pattern — research showed the empty state should give fast access to content, not just a hint):
↵open ·↑↓navigate ·escclose)Injected via a
Searchcomponent override; shown only while the query is empty (keyed off Pagefind'spagefind-ui__hidden), hidden the moment results appear.Verified (production build + preview)
🤖 Generated with Claude Code