Packages

@astrojs/netlify

8.2.14 · 13 Nov 2026MIT71.2k / weekRepositoryHomepagenpmAtom feed

Your version

2.6.0

11 Aug 2023Where it was published

In short

1 new1 internal

Security

Release note

Minor Changes

  • If you are using Netlify's On-demand Builders, you can now specify how long your pages should remain cached. By default, all pages will be rendered on first visit and reused on every subsequent visit until a redeploy. To set a custom revalidation time, call the runtime.setBuildersTtl() local in either your frontmatter or middleware.

    ---
    import Layout from '../components/Layout.astro';
    
    if (import.meta.env.PROD) {
      // revalidates every 45 seconds
      Astro.locals.runtime.setBuildersTtl(45);
    }
    ---
    
    <Layout title="Astro on Netlify">
      {new Date(Date.now())}
    </Layout>

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.