diff options
Diffstat (limited to 'packages/integrations/sitemap/src/index.ts')
-rw-r--r-- | packages/integrations/sitemap/src/index.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/integrations/sitemap/src/index.ts b/packages/integrations/sitemap/src/index.ts index b9df1b0fc..d18c9daea 100644 --- a/packages/integrations/sitemap/src/index.ts +++ b/packages/integrations/sitemap/src/index.ts @@ -99,7 +99,12 @@ const createPlugin = (options?: SitemapOptions): AstroIntegration => { } if (pageUrls.length === 0) { - logger.warn(`No data for sitemap.\n\`${OUTFILE}\` is not created.`); + // offer suggestion for SSR users + if (typeof config.adapter !== 'undefined') { + logger.warn(`No pages found! We can only detect sitemap routes for "static" projects. Since you are using an SSR adapter, we recommend manually listing your sitemap routes using the "customPages" integration option.\n\nExample: \`sitemap({ customPages: ['https://example.com/route'] })\``); + } else { + logger.warn(`No pages found!\n\`${OUTFILE}\` not created.`); + } return; } |