From 5f5b9929b49fda4d065c5c456fcb8aa0e814293b Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Fri, 27 May 2022 20:43:32 +0800 Subject: [PATCH] add docs --- packages/docusaurus-plugin-sitemap/src/options.ts | 1 + website/docs/api/plugins/plugin-sitemap.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-sitemap/src/options.ts b/packages/docusaurus-plugin-sitemap/src/options.ts index b256ee89b875..9cc1fe1b8cc1 100644 --- a/packages/docusaurus-plugin-sitemap/src/options.ts +++ b/packages/docusaurus-plugin-sitemap/src/options.ts @@ -21,6 +21,7 @@ export type PluginOptions = { ignorePatterns: string[]; /** * The path to the created sitemap file, relative to the output directory. + * Useful if you have two plugin instances outputting two files. */ filename: string; }; diff --git a/website/docs/api/plugins/plugin-sitemap.md b/website/docs/api/plugins/plugin-sitemap.md index d36d4c1524c3..145b62d9e258 100644 --- a/website/docs/api/plugins/plugin-sitemap.md +++ b/website/docs/api/plugins/plugin-sitemap.md @@ -40,7 +40,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. | -| `filename` | `string` | `sitemap.xml` | The path to the created sitemap file, relative to the output directory. | +| `filename` | `string` | `sitemap.xml` | The path to the created sitemap file, relative to the output directory. Useful if you have two plugin instances outputting two files. | @@ -71,6 +71,7 @@ const config = { changefreq: 'weekly', priority: 0.5, ignorePatterns: ['/tags/**'], + filename: 'sitemap.xml', }; ```