-
-
Notifications
You must be signed in to change notification settings - Fork 533
Automatically redirect from the search page #996
Copy link
Copy link
Labels
frontFrontend, DesignFrontend, Designneeds discussionAn idea that needs more discussion to understand the scope and impact.An idea that needs more discussion to understand the scope and impact.
Description
Activity
Metadata
Metadata
Assignees
Labels
frontFrontend, DesignFrontend, Designneeds discussionAn idea that needs more discussion to understand the scope and impact.An idea that needs more discussion to understand the scope and impact.
Currently, even when users want to visit the specific package via keyword search, users need to type package name and click the top result.
The "I'm feeling lucky" mode would work like this:
feeling-lucky=1param to the search URL (example: https://npmx.dev/search?feeling-lucky=1&q=nuxt)exactmatch result, instead of showing the package list, directly navigate users to that package page (example: https://npmx.dev/package/nuxt)exactmatch result, show the search result as is.Users may add two search keywords if they prefer, for example:
npmx <keyword>->https://npmx.dev/search?q=%snpmx! <keyword>->https://npmx.dev/search?feeling-lucky=1&q=%sUsers could add
npmx! <keyword>->https://npmx.dev/package/%sbut this mode can provide a bit more flexible fallback.inspired by this shared post: https://bskye.app/profile/vale.rocks/post/3me3elmhxo22j (via https://discord.com/channels/1464542801676206113/1466869459590451448/1468855092894498877)