-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@angular/cli): change the url for doc search #16846
fix(@angular/cli): change the url for doc search #16846
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
Merged to patch branch 9.0.x as well. |
In angular#16846, the URL for docs search was updated to point to the corresponding vX.angular.io website (with an appropriate query for the search). However, on the archive versions of the website (i.e. versions older than the current stable), non-docs pages (including the home page) are redirected to `/docs` (losing the query params). This commit fixes the URL to include `/docs`, so that it is not redirected (and preserve the query params that will trigger the search).
} | ||
|
||
let searchUrl = `https://${domain}/api?query=${options.keyword}`; | ||
|
||
if (options.search) { | ||
searchUrl = `https://www.google.com/search?q=site%3A${domain}+${options.keyword}`; | ||
searchUrl = `https://${domain}/?search=${options.keyword}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just realized that for archive version (i.e. older than the current stable), non-docs pages (including the home page) are redirected to /docs
(losing the query params). So, this URL should be https://${domain}/docs?search=${options.keyword}
😅
(My bad for suggesting the wrong URL 😇)
I submitted #16856.
In #16846, the URL for docs search was updated to point to the corresponding vX.angular.io website (with an appropriate query for the search). However, on the archive versions of the website (i.e. versions older than the current stable), non-docs pages (including the home page) are redirected to `/docs` (losing the query params). This commit fixes the URL to include `/docs`, so that it is not redirected (and preserve the query params that will trigger the search).
In #16846, the URL for docs search was updated to point to the corresponding vX.angular.io website (with an appropriate query for the search). However, on the archive versions of the website (i.e. versions older than the current stable), non-docs pages (including the home page) are redirected to `/docs` (losing the query params). This commit fixes the URL to include `/docs`, so that it is not redirected (and preserve the query params that will trigger the search). (cherry picked from commit 1beb582)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #16840