The Wayback Machine - https://web.archive.org/web/20210629174422/https://github.com/chapter-three/next-drupal
Skip to content
main
Switch branches/tags
Code
next-drupal

Next.js for Drupal

Next-generation front end for your Drupal site.

Drupal PRs welcome! Follow @arshadcn

Warning: this project is in early beta.

Demo

Documentation

https://next-drupal.org/docs

Example

A page with all "Article" nodes.

import { getResourceCollectionFromContext } from "next-drupal"

export default function IndexPage({ articles }) {
  return (
    <div>
      {articles?.length ? (
        articles.map((node) => (
          <div key={node.id}>
            <h1>{node.title}</h1>
          </div>
        ))
      ) : null}
    </div>
  )
}

export async function getStaticProps(context) {
  return {
    props: {
      articles: await getResourceCollectionFromContext("node--article", context)
      revalidate: 60,
    },
  }
}

Supporting organizations

Development sponsored by Chapter Three