next-drupal

esm cjs
Helpers for Next.js + Drupal.
Version 2.0.0 License MIT
Keywords
next.jsdrupaljsonapipreview
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 2.0.0
- 1.6.0
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.18.0
- 0.17.0
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.1
- 0.11.0
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.1
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
- 0.0.1
- 2.0.0-rc.0
- 2.0.0-beta.1
- 2.0.0-beta.0
- 2.0.0-alpha.1
- 2.0.0-alpha.0
- 1.4.0-rc.2
- 1.4.0-rc.1
- 1.4.0-rc.0
- 1.4.0-alpha.0
- 1.3.0-rc.0
- 1.3.0-alpha.0
- 1.2.2-alpha.12
- 0.17.0-alpha.0
- 0.0.0-pr.795.e765a4e7
- 0.0.0-pr.600.ffb29754
- 0.0.0-pr.600.6cad5d82
- 0.0.0-pr.600.6bd1d292
- 0.0.0-pr.600.3a9103a1
- 0.0.0-pr.600.128d03bc
- 0.0.0-pr.600.0f0a9acf
- 0.0.0-pr.600.009cb667
- 0.0.0-pr.583.ef455138
- 0.0.0-pr.583.daef92a5
- 0.0.0-pr.583.7dea0fac
- 0.0.0-pr.583.552100db
- 0.0.0-pr.583.4cc07119
- 0.0.0-pr.583.1c3e1a12
- 0.0.0-pr.583.0fc6c147
- 0.0.0-pr.583.80630460
- 0.0.0-pr.559.0c3c8cef
- 0.0.0-pr.388.8846ff40
- 0.0.0-pr.388.5d0d7119
- 0.0.0-pr.387.785ba0b2
- 0.0.0-pr.387.734cffd7
- 0.0.0-pr.387.6a182fb2
- 0.0.0-pr.387.600150ed
- 0.0.0-pr.385.dcdbce1d
- 0.0.0-pr.385.43823b3c
- 0.0.0-pr.385.0786dbb3
- 0.0.0-pr.384.2811c6d3
- 0.0.0-pr.384.0f12c36e
- 0.0.0-pr.377.f45411ae
- 0.0.0-pr.377.dcf95b6d
- 0.0.0-pr.377.a3d8f03e
- 0.0.0-pr.375.8ccd64df
- 0.0.0-pr.375.1f71191e
- 0.0.0-pr.373.2ed39ebe
- 0.0.0-pr.372.8009acd3
- 0.0.0-pr.362.e0ed48f2
- 0.0.0-pr.362.c76fbaa2
- 0.0.0-pr.362.c0b27357
- 0.0.0-pr.362.b17ba3f7
- 0.0.0-pr.362.7b76f951
- 0.0.0-pr.362.2ed39ebe
- 0.0.0-pr.362.1f71191e
- 0.0.0-pr.362.1604fab2
<script type="module"> import nextDrupal from 'https://cdn.jsdelivr.net/npm/next-drupal@2.0.0/+esm' </script>

Next.js for Drupal
Next-generation front-end for your Drupal site.
Demo
Documentation
Deploy to Vercel
Example
A page with all "Article" nodes.
import { NextDrupal } from "next-drupal"
const drupal = new NextDrupal("https://cms.next-drupal.org")
export default function BlogPage({ articles }) {
return (
<div>
{articles?.length
? nodes.map((node) => (
<div key={node.id}>
<h1>{node.title}</h1>
</div>
))
: null}
</div>
)
}
export async function getStaticProps(context) {
const articles = await drupal.getResourceCollectionFromContext(
"node--article",
context
)
return {
props: {
articles,
},
}
}
Supporting organizations
Development sponsored by Chapter Three
Contributing
If you're interested in contributing to Next.js for Drupal, please read the contributing guidelines before submitting a pull request.