htmx icon indicating copy to clipboard operation
htmx copied to clipboard

Fix google search syntax from search bar

Open Telroshan opened this issue 9 months ago • 0 comments

Description

Using the website's search bar currently includes any subdomain in the search results, including the htmx 1 docs, which can be confusing.

This issue had been discussed in #2813 at the time where we still had extensions on a separate website, making it hard to figure out a proper google search syntax. Now that extensions are back to the main website, we can use the syntax that @MichaelWest22 had suggested (+[inurl:https://htmx.org]) at the time, to only include search results from the main website while including extensions.

Corresponding issue: resolves #2813

Testing

  • Search for websocket on the htmx website, which redirects to https://www.google.com/search?q=site%3Ahtmx.org&q=websocket , see how the v1 docs appear at the top
  • Using this new syntax instead, redirects to https://www.google.com/search?q=%2B%5Binurl%3Ahttps%3A%2F%2Fhtmx.org%5D&q=websocket which only includes the search results we want

Checklist

  • [x] I have read the contribution guidelines
  • [x] I have targeted this PR against the correct branch (master for website changes, dev for source changes)
  • [x] This is either a bugfix, a documentation update, or a new feature that has been explicitly approved via an issue
  • [x] I ran the test suite locally (npm run test) and verified that it succeeded

Telroshan avatar Feb 23 '25 12:02 Telroshan