Add search suggestions (with configurable engine) and configurable shortcuts
Summary
• Enhanced search widget with configurable shortcuts for quick site navigation and fuzzy matching • Added search suggestions integration with popular search engines (Google, DuckDuckGo, Bing, Startpage) • Navigate directly to URLs, bypassing search engine
Features Added
Shortcuts System:
- Fuzzy matching against shortcut titles and optional alias text
- Dropdown interface with keyboard navigation (arrow keys, tab, enter)
- Exact match prioritization for immediate navigation (e.g. type
gm, thenEnterto go directly to Gmail)
shortcuts:
- title: Gmail
url: https://mail.google.com
alias: gm
- title: GitHub
url: https://github.com
Search Suggestions:
- Suggestions from configured search engines with debouncing
- Automatic fallback to main search engine if not specified
- Support for custom suggestion endpoints
- New /api/search/suggestions endpoint to handle requests
suggestions: true
suggestion-engine: duckduckgo # or google, bing, startpage
Direct URL Navigation:
- Detects when the query is a URL and takes the user there instead of searching for it
- Supports standard URLs (
google.com,www.google.com), HTTP(S) prefixes (https://google.com), localhost (localhost:3000) and IP addresses (192.168.1.1), all with optional ports
Keyboard Navigation:
- ↓/Tab and ↑/Shift+Tab for dropdown navigation
- Enter to select highlighted item or perform search
- Click support for all dropdown items
- Maintains existing bang functionality and keyboard shortcuts
This is similar to #702, but with some extra features. Also relates to issue #700
Good work @kylerm42, that's what I was trying to go for! Nice to see that we had the same idea :)) I would've been happy with a PR on the feature set too, so that you didn't have to start from 0 on the features.
Thanks @rhijjawi! I was actually going to work off yours but I'm new to Go, so at this point writing is easier than reading and understanding. Definitely open to bringing in anything from that PR over here though, or vice versa!
Amazing feature
Great feature
has this been implemented?
has this been implemented?
@beatrizq The pull request is still open and not merged so I don't think so