Skip to content

Commit

Permalink
fix(@angular/cli): fix the URL for doc search
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
gkalpak authored and dgp1130 committed Feb 7, 2020
1 parent 207b2cc commit 5c0fc68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular/cli/commands/doc-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class DocCommand extends Command<DocCommandSchema> {
let searchUrl = `https://${domain}/api?query=${options.keyword}`;

if (options.search) {
searchUrl = `https://${domain}/?search=${options.keyword}`;
searchUrl = `https://${domain}/docs?search=${options.keyword}`;
}

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

0 comments on commit 5c0fc68

Please sign in to comment.