feat(sitemap): add ignorePatterns option (#6979)

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
This commit is contained in:
ApsarasX 2022-04-06 21:44:07 +08:00 committed by GitHub
parent bd70cfc1d7
commit 103ea04661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 78 additions and 14 deletions

View file

@ -39,6 +39,7 @@ Accepted fields:
| --- | --- | --- | --- |
| `changefreq` | `string` | `'weekly'` | See [sitemap docs](https://www.sitemaps.org/protocol.html#xmlTagDefinitions) |
| `priority` | `number` | `0.5` | See [sitemap docs](https://www.sitemaps.org/protocol.html#xmlTagDefinitions) |
| `ignorePatterns` | `string[]` | `[]` | A list of glob patterns; matching route paths will be filtered from the sitemap. Note that you may need to include the base URL in here. |
</APITable>
@ -68,6 +69,7 @@ Most Docusaurus users configure this plugin through the preset options.
const config = {
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
};
```