next drupal
1.0.0
https://demo.next-drupal.org
https://next-drupal.org
すべての「記事」ノードがあるページ。
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 ,
} ,
}
} 第3章が主催する開発
Drupalのnext.jsに貢献することに興味がある場合は、プルリクエストを送信する前に貢献ガイドラインをお読みください。