Loading...
Loading...
Guides setup, development, and troubleshooting of the Next.js and Enonic XP headless integration (Next.XP framework). Covers Enonic adapter configuration, content type to React component mapping, Guillotine GraphQL data fetching, Content Studio preview mode, and draft/master branch switching. Use when building a Next.js frontend powered by Enonic XP, configuring the Next.XP adapter, mapping content types to components, fetching Enonic content via Guillotine in Next.js, or debugging Content Studio preview. Don't use for traditional server-side Enonic XP rendering, standalone Guillotine queries without Next.js, non-Next.js frontend frameworks with Enonic, or React4XP embedded rendering.
npx skill4agent add webmaxru/enonic-agent-skills enonic-nextxp-integrationnext.config.*package.jsonnextbuild.gradlecom.enonic.xp@enonic/nextjs-adapternode scripts/find-nextxp-targets.mjs ..envENONIC_*_mappings.tspackage.json.envsrc/components/_mappings.tsreferences/nextxp-reference.md.env.env.localENONIC_API_TOKENENONIC_APP_NAMEcom.example.myprojectENONIC_MAPPINGSen:intro/hmdbENONIC_APIhttp://127.0.0.1:8080/site@enonic/nextjs-adapternpm install @enonic/nextjs-adapter@4npm install @enonic/nextjs-adapter@3references/compatibility.mdnextxp-templatesrc/components/_mappings.tssrc/app/[locale]/[[...contentPath]]/page.tsxsrc/app/api/references/compatibility.md@enonic/nextjs-adapterreferences/nextxp-reference.mdreferences/examples.mdsrc/components/queries/... on AppName_ContentTypeNamesrc/components/views/FetchContentResultsrc/components/_mappings.tsComponentRegistry.addContentType()src/main/resources/site/pages/parts/layouts/src/components/pages/parts/layouts/ComponentRegistry.addPage()ComponentRegistry.addPart()ComponentRegistry.addLayout()APP_NAMEAPP_NAME_UNDERSCORED@enonic/nextjs-adapterreferences/nextxp-reference.md$path:ID!guillotine { get(key:$path) { ... } }... on AppName_ContentTypeName { data { ... } }query(path, context, config)variables(path, context, config)ComponentRegistry.setCommonQuery()getUrl()getAsset()references/nextxp-reference.mdNext.XPXP Menu → Applications → Install → search "Next.XP"http://127.0.0.1:3000ENONIC_API_TOKENnextjs.default.url = <Next.js app URL>
nextjs.default.secret = <shared secret>draftmastergetUrl()references/troubleshooting.mdreferences/nextxp-reference.mdenonic cloud app install/site/apiENONIC_APIENONIC_APP_NAMEENONIC_API_TOKENENONIC_MAPPINGSnode scripts/find-nextxp-targets.mjs .http://localhost:3000npm run buildreferences/troubleshooting.mdhttp://localhost:8080/site/<project>@enonic/nextjs-adapterreferences/compatibility.mddraftmaster_mappings.tsAPP_NAME