Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] release #10014

Merged
merged 1 commit into from
Feb 7, 2024
Merged

[ci] release #10014

merged 1 commit into from
Feb 7, 2024

Conversation

astrobot-houston
Copy link
Contributor

@astrobot-houston astrobot-houston commented Feb 7, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@astrojs/[email protected]

Minor Changes

  • #9714 e2fe51c828dc7ea8204788e59e3953fe36c97836 Thanks @lilnasy! - Introduces a new config option, isr, that allows you to deploy your project as an ISR function. ISR (Incremental Static Regeneration) caches your on-demand rendered pages in the same way as prerendered pages after first request.

    To enable this feature, set isr to true in your Vercel adapter configuration in astro.config.mjs:

    export default defineConfig({
      output: 'server',
      adapter: vercel({ isr: true }),
    });

    Cache invalidation options

    By default, ISR responses are cached for the duration of your deployment. You can further control caching by setting an expiration time or prevent caching entirely for certain routes.

    Time-based invalidation

    You can change the length of time to cache routes this by configuring an expiration value in seconds:

    export default defineConfig({
      output: 'server',
      adapter: vercel({
        isr: {
          // caches all pages on first request and saves for 1 day
          expiration: 60 * 60 * 24,
        },
      }),
    });

    Manual invalidation

    To implement Vercel's Draft mode, or On-Demand Incremental Static Regeneration (ISR), you can create a bypass token and provide it to the isr config along with the paths to exclude from caching:

    export default defineConfig({
      output: 'server',
      adapter: vercel({
        isr: {
          // A secret random string that you create.
          bypassToken: '005556d774a8',
          // Paths that will always be served fresh.
          exclude: ['/api/invalidate'],
        },
      }),
    });

[email protected]

Patch Changes

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) labels Feb 7, 2024
@github-actions github-actions bot force-pushed the changeset-release/main branch 5 times, most recently from b1be64c to f448e0a Compare February 7, 2024 13:39
@github-actions github-actions bot force-pushed the changeset-release/main branch from f448e0a to 5598c5a Compare February 7, 2024 13:59
@delucis delucis merged commit fa9218e into main Feb 7, 2024
@delucis delucis deleted the changeset-release/main branch February 7, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants