PHPackages                             silverstripe/silverstripe-nextjs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. silverstripe/silverstripe-nextjs

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

silverstripe/silverstripe-nextjs
================================

Silverstripe NextJS features

38115PHP

Since Dec 2Pushed 4y ago11 watchersCompare

[ Source](https://github.com/silverstripe/silverstripe-nextjs)[ Packagist](https://packagist.org/packages/silverstripe/silverstripe-nextjs)[ RSS](/packages/silverstripe-silverstripe-nextjs/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Silverstripe CMS / Next JS integration
======================================

[](#silverstripe-cms--next-js-integration)

This module provides some base features for integrating Silverstripe CMS with [NextJS](https://nextjs.org). Its primary intent is to work with the related [Silverstripe/NextJS starter kit](https://github.com/silverstripe/silverstripe-nextjs-starter).

Features
--------

[](#features)

- Configure a static build (i.e. the subset of pages to statically generate on build)
- Provides token-based content previews (full implementation provided by the [Silverstripe/NextJS starter kit](https://github.com/silverstripe/silverstripe-nextjs-starter))
- **Fluent only**: remove the locale from the URL, leaving NextJS to handle this natively
- Several custom queries and fields required for the [Silverstripe/NextJS starter kit](https://github.com/silverstripe/silverstripe-nextjs-starter) internals.

### Static build configuration

[](#static-build-configuration)

NextJS supports [Incremental Static Regeneration (ISR)](https://vercel.com/docs/concepts/next.js/incremental-static-regeneration), which is statically publishing just a subset of all the pages on the site, and leaving the rest to generate on-demand at request time. This module allows you to design a strategy for what should be included in that initial static build.

[![](https://raw.githubusercontent.com/silverstripe/silverstripe-nextjs/main/screenshots/static_build.png)](https://raw.githubusercontent.com/silverstripe/silverstripe-nextjs/main/screenshots/static_build.png)

#### Limiting the static build

[](#limiting-the-static-build)

Each collector gets its own `Limit` field, but the aggregate build gets one as well, as you can see above. The aggregate limit will always override the individual limits of each collector.

#### Previewing the build

[](#previewing-the-build)

You can click on the "Preview" tab to show you what will be included in the build, based on the current list of collectors.

[![](https://raw.githubusercontent.com/silverstripe/silverstripe-nextjs/main/screenshots/preview_build.png)](https://raw.githubusercontent.com/silverstripe/silverstripe-nextjs/main/screenshots/preview_build.png)

#### Creating a new strategy

[](#creating-a-new-strategy)

All you need to do is subclass the `StaticBuildCollector` class, define any fields in `$db` that could be used as parameters (`Limit` is already included), and then define a `collect()` method that need only return a `Limitable` instance.

```
class HighlyCommentedPagesCollector extends StaticBuildCollector
{
    public function collect(): Limitable
    {
        return Page::get()
            ->filter('Comments.Count():GreaterThan', 5)
            ->limit($this->Limit);
    }
}
```

- **Recent Pages Collector**: Get the last X edited pages (e.g. statically build anything that has been worked on recently in the CMS)
- **Section Collector**: Get X pages from a given section in the site tree (e.g. statically publish everything in the `products/` section)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

![](https://www.gravatar.com/avatar/b0cba8b534e20e6ab4fff555a97b237a18436ebca1446fc0b29c8a8b504038b9?d=identicon)[GuySartorelli](/maintainers/GuySartorelli)

### Embed Badge

![Health badge](/badges/silverstripe-silverstripe-nextjs/health.svg)

```
[![Health](https://phpackages.com/badges/silverstripe-silverstripe-nextjs/health.svg)](https://phpackages.com/packages/silverstripe-silverstripe-nextjs)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
