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 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).
  • Loading branch information
gkalpak committed Feb 6, 2020
1 parent 3595cee commit dfc5a70
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 dfc5a70

Please sign in to comment.