Skip to content

Next.js for Drupal has everything you need to build a next-generation front-end for your Drupal site: SSG, SSR, and ISR, Multi-site, Authentication, Webforms, Search API, I18n and Preview mode (works with JSON:API and GraphQL).

License

Notifications You must be signed in to change notification settings

chapter-three/next-drupal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Repository files navigation

Next.js for drupal

Next.js for Drupal

Next-generation front-end for your Drupal site.

Demo

https://demo.next-drupal.org

Documentation

https://next-drupal.org

Deploy to Vercel

Deploy with Vercel

Example

A page with all "Article" nodes.

import{DrupalClient}from"next-drupal"

constdrupal=newDrupalClient("https://cms.next-drupal.org")

exportdefaultfunctionBlogPage({articles}){
return(
<div>
{articles?.length
?nodes.map((node)=>(
<divkey={node.id}>
<h1>{node.title}</h1>
</div>
))
:null}
</div>
)
}

exportasyncfunctiongetStaticProps(context){
constarticles=awaitdrupal.getResourceCollectionFromContext(
"node--article",
context
)

return{
props:{
articles,
},
}
}

Supporting organizations

Development sponsored byChapter Three

Contributing

If you're interested in contributing to Next.js for Drupal, please read thecontributing guidelinesbefore submitting a pull request.

About

Next.js for Drupal has everything you need to build a next-generation front-end for your Drupal site: SSG, SSR, and ISR, Multi-site, Authentication, Webforms, Search API, I18n and Preview mode (works with JSON:API and GraphQL).

Topics

Resources

License

Security policy

Stars

Watchers

Forks