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에 기여하는 데 관심이 있으시면 풀 요청을 제출하기 전에 기고 가이드 라인을 읽으십시오.