Skip to content

Commit 1beb582

Browse files
gkalpakdgp1130
authored andcommitted
fix(@angular/cli): fix the URL for doc 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).
1 parent 08ec831 commit 1beb582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular/cli/commands/doc-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class DocCommand extends Command<DocCommandSchema> {
4747
let searchUrl = `https://${domain}/api?query=${options.keyword}`;
4848

4949
if (options.search) {
50-
searchUrl = `https://${domain}/?search=${options.keyword}`;
50+
searchUrl = `https://${domain}/docs?search=${options.keyword}`;
5151
}
5252

5353
// We should wrap `open` in a new Promise because `open` is already resolved

0 commit comments

Comments
 (0)