build(docs-infra): ignore `doc.basePath` when generating keywords for each document (#39409)

The `generateKeywords` dgeni processor automatically generates keywords
for each document by extracting words from each string property of a
`doc` object.

This commit adds `basePath` to the list of ignored properties, so that
it is _not_ considered when generating keywords. `basePath` mostly
contains the path to some root directory (such as
`/home/circleci/ng/packages`) and as such it does not contain useful
keywords.

For example, searching for `circleci` will match all API docs, because
it happens to be in the `basePath`:
https://v10.angular.io/?search=circleci

PR Close #39409
This commit is contained in:
George Kalpakas 2020-10-24 14:07:46 +03:00 committed by Alex Rickabaugh
parent 2b09f5b2ce
commit 35fdc6d92f
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ module.exports = new Package('angular-base', [
generateKeywordsProcessor.ignoreWordsFile = path.resolve(__dirname, 'ignore.words');
generateKeywordsProcessor.docTypesToIgnore = ['example-region'];
generateKeywordsProcessor.propertiesToIgnore = ['renderedContent'];
generateKeywordsProcessor.propertiesToIgnore = ['basePath', 'renderedContent'];
})
// Where do we write the output files?