From e1918674e7f0a8d1ddb69bec269aee7351cf31a2 Mon Sep 17 00:00:00 2001 From: tk04 Date: Thu, 28 Mar 2024 09:59:26 -0400 Subject: [PATCH 1/2] add dynamic routes example in isr.exclude for @astrojs/vercel integration --- src/content/docs/en/guides/integrations-guide/vercel.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index c6e7e161186e9..3ac4e97f2d68b 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -274,7 +274,7 @@ export default defineConfig({ ##### Excluding paths from caching -To implement Vercel's [Draft mode](https://vercel.com/docs/build-output-api/v3/features#draft-mode), or [On-Demand Incremental Static Regeneration (ISR)](https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr), you can create a bypass token and provide it to the `isr` config along with any paths to exclude from caching: +To implement Vercel's [Draft mode](https://vercel.com/docs/build-output-api/v3/features#draft-mode), or [On-Demand Incremental Static Regeneration (ISR)](https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr), you can create a bypass token and provide it to the `isr` config along with any static or dynamic routes to exclude from caching: ```js title="astro.config.mjs" {7-12} import { defineConfig } from 'astro/config'; @@ -287,7 +287,7 @@ export default defineConfig({ // A secret random string that you create. bypassToken: "005556d774a8", // Paths that will always be served fresh. - exclude: [ "/api/invalidate" ] + exclude: [ "/api/invalidate", "/posts/[...slug]" ] } }) }) From db25844563227dda1ed8a9c25c1f6835b62c242e Mon Sep 17 00:00:00 2001 From: TK Date: Thu, 28 Mar 2024 10:17:22 -0400 Subject: [PATCH 2/2] Update src/content/docs/en/guides/integrations-guide/vercel.mdx Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com> --- src/content/docs/en/guides/integrations-guide/vercel.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/integrations-guide/vercel.mdx b/src/content/docs/en/guides/integrations-guide/vercel.mdx index 3ac4e97f2d68b..0f8af49e7bf00 100644 --- a/src/content/docs/en/guides/integrations-guide/vercel.mdx +++ b/src/content/docs/en/guides/integrations-guide/vercel.mdx @@ -274,7 +274,7 @@ export default defineConfig({ ##### Excluding paths from caching -To implement Vercel's [Draft mode](https://vercel.com/docs/build-output-api/v3/features#draft-mode), or [On-Demand Incremental Static Regeneration (ISR)](https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr), you can create a bypass token and provide it to the `isr` config along with any static or dynamic routes to exclude from caching: +To implement Vercel's [Draft mode](https://vercel.com/docs/build-output-api/v3/features#draft-mode), or [On-Demand Incremental Static Regeneration (ISR)](https://vercel.com/docs/build-output-api/v3/features#on-demand-incremental-static-regeneration-isr), you can create a bypass token and provide it to the `isr` config along with any routes to exclude from caching: ```js title="astro.config.mjs" {7-12} import { defineConfig } from 'astro/config';