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

apathak18/next-drupal

This branch is 12 commits ahead of, 24 commits behind chapter-three/next-drupal:main.

Folders and files

NameName
Last commit message
Last commit date
Aug 6, 2024
Nov 3, 2023
Jan 5, 2024
Apr 30, 2024
Aug 6, 2024
Apr 26, 2024
Jan 4, 2024
Apr 30, 2024
Dec 2, 2021
Jun 26, 2024
Oct 10, 2023
Feb 21, 2024
Jan 5, 2024
Nov 3, 2023
Jan 5, 2024
Nov 22, 2023
Feb 23, 2023
Apr 18, 2024
Nov 3, 2023
Nov 3, 2023
Dec 6, 2022
Feb 28, 2024
Oct 1, 2021
Apr 24, 2024
Jan 17, 2022
Feb 28, 2024
Feb 28, 2024
Jan 30, 2021
Jan 6, 2024
Apr 18, 2024
Nov 22, 2023
Feb 22, 2022
Apr 18, 2024

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"

const drupal = new DrupalClient("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.

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).

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 46.1%
  • PHP 31.3%
  • MDX 20.3%
  • CSS 1.1%
  • Other 1.2%