summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar paulrudy <1110792+paulrudy@users.noreply.github.com> 2023-07-14 07:56:03 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-14 10:56:03 -0400
commit9352ac65f4d8c44a5d0cf9cccc37a1196da538cf (patch)
treef25a297ef3effb090d166e65ce31cfd0af01c177
parent1f2d52bd7b3fac047bde207a9f09bccf19c85cc3 (diff)
downloadastro-9352ac65f4d8c44a5d0cf9cccc37a1196da538cf.tar.gz
astro-9352ac65f4d8c44a5d0cf9cccc37a1196da538cf.tar.zst
astro-9352ac65f4d8c44a5d0cf9cccc37a1196da538cf.zip
Clarify SSR limitations of sitemaps of dynamic routes (#7625)
While this README doesn't distinguish between SSR mode and static mode (and SSR mode was recently made available for the sitemaps integration), there is one important difference: Dynamic routes that are server-rendered can't be used to create sitemap entries. This note makes that clear.
-rw-r--r--packages/integrations/sitemap/README.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/integrations/sitemap/README.md b/packages/integrations/sitemap/README.md
index 3e46bb7bb..8b7f9aa57 100644
--- a/packages/integrations/sitemap/README.md
+++ b/packages/integrations/sitemap/README.md
@@ -19,6 +19,9 @@ A sitemap file is recommended for large multi-page sites. If you don't use a sit
With Astro Sitemap, you don't have to worry about creating this file: build your Astro site how you normally would, and the Astro Sitemap integration will crawl your routes and create the sitemap file.
+> **Note**
+> [Dynamic routes](https://docs.astro.build/en/core-concepts/routing/#dynamic-routes) like `[...slug]` or `src/pages/[lang]/[version]/info.astro` will generate sitemap entries for the pages those routes render, _provided that they are rendered statically_ (i.e., using `getStaticPaths()`. But because of the nature of [Astro's SSR mode](https://docs.astro.build/en/guides/server-side-rendering/), any dynamic routes that are server-rendered (via Astro's server or hybrid modes) do not output a static array of pages, so they will _not_ generate corresponding sitemap entries.
+
## Installation
### Quick Install