[{"data":1,"prerenderedAt":555},["ShallowReactive",2],{"navigation_docs":3,"-advanced-topics-multi-frontend":233,"-advanced-topics-multi-frontend-surround":550},[4,27,77,127,161,219],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Get started","majesticons:rocket-3-start-line","\u002Fget-started","1.get-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"How it works","\u002Fget-started\u002Fhow-it-works","1.get-started\u002F10.how-it-works",{"title":15,"path":16,"stem":17},"Play online","\u002Fget-started\u002Fplay-online","1.get-started\u002F20.play-online",{"title":19,"path":20,"stem":21},"Create a new project","\u002Fget-started\u002Fcreate-new-project","1.get-started\u002F30.create-new-project",{"title":23,"path":24,"stem":25},"First steps","\u002Fget-started\u002Ffirst-steps","1.get-started\u002F40.first-steps",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Guide","mdi:book-open-page-variant-outline","\u002Fguide","2.guide",[33,37,41,45,49,53,57,61,65,69,73],{"title":34,"path":35,"stem":36},"Customized API Output","\u002Fguide\u002Fcustomized-api-output","2.guide\u002F05.customized-api-output",{"title":38,"path":39,"stem":40},"Pages & Routing","\u002Fguide\u002Fpages-routing","2.guide\u002F10.pages-routing",{"title":42,"path":43,"stem":44},"Site layout & Menus","\u002Fguide\u002Fsite-layout-menus","2.guide\u002F20.site-layout-menus",{"title":46,"path":47,"stem":48},"Authentication","\u002Fguide\u002Fauthentication","2.guide\u002F40.authentication",{"title":50,"path":51,"stem":52},"Metatags & Local tasks","\u002Fguide\u002Fmetatags-local-tasks","2.guide\u002F50.metatags-local-tasks",{"title":54,"path":55,"stem":56},"Breadcrumbs & Messages","\u002Fguide\u002Fbreadcrumbs-messages","2.guide\u002F60.breadcrumbs-messages",{"title":58,"path":59,"stem":60},"Redirects","\u002Fguide\u002Fredirects","2.guide\u002F65.redirects",{"title":62,"path":63,"stem":64},"Editorial previews","\u002Fguide\u002Feditorial-previews","2.guide\u002F70.editorial-previews",{"title":66,"path":67,"stem":68},"Layout builder","\u002Fguide\u002Flayout-builder","2.guide\u002F80.layout-builder",{"title":70,"path":71,"stem":72},"Drupal Canvas","\u002Fguide\u002Fcanvas","2.guide\u002F90.canvas",{"title":74,"path":75,"stem":76},"Drupal CMS","\u002Fguide\u002Fdrupal-cms","2.guide\u002F95.drupal-cms",{"title":78,"icon":79,"path":80,"stem":81,"children":82,"page":26},"Advanced topics","bi:diagram-3","\u002Fadvanced-topics","3.advanced-topics",[83,87,91,95,99,103,107,111,115,119,123],{"title":84,"path":85,"stem":86},"Multi-frontend","\u002Fadvanced-topics\u002Fmulti-frontend","3.advanced-topics\u002F05.multi-frontend",{"title":88,"path":89,"stem":90},"Listings, Views","\u002Fadvanced-topics\u002Flistings-views","3.advanced-topics\u002F10.listings-views",{"title":92,"path":93,"stem":94},"Searches","\u002Fadvanced-topics\u002Fsearches","3.advanced-topics\u002F20.searches",{"title":96,"path":97,"stem":98},"JSON-API & GraphQL","\u002Fadvanced-topics\u002Fjsonapi-graphql","3.advanced-topics\u002F30.jsonapi-graphql",{"title":100,"path":101,"stem":102},"Caching","\u002Fadvanced-topics\u002Fcaching","3.advanced-topics\u002F40.caching",{"title":104,"path":105,"stem":106},"Error pages","\u002Fadvanced-topics\u002Ferror-pages","3.advanced-topics\u002F50.error-pages",{"title":108,"path":109,"stem":110},"Drupal forms","\u002Fadvanced-topics\u002Fdrupal-forms","3.advanced-topics\u002F60.drupal-forms",{"title":112,"path":113,"stem":114},"Drupal JavaScript","\u002Fadvanced-topics\u002Fdrupal-javascript","3.advanced-topics\u002F62.drupal-javascript",{"title":116,"path":117,"stem":118},"Site Templates","\u002Fadvanced-topics\u002Fsite-templates","3.advanced-topics\u002F65.site-templates",{"title":120,"path":121,"stem":122},"Block layout","\u002Fadvanced-topics\u002Fblock-layout","3.advanced-topics\u002F70.block-layout",{"title":124,"path":125,"stem":126},"Debugging API requests","\u002Fadvanced-topics\u002Fdebugging","3.advanced-topics\u002F80.debugging",{"title":128,"icon":129,"path":130,"stem":131,"children":132,"page":26},"Drupal","simple-icons:drupal","\u002Fdrupal","4.drupal",[133,137,141,145,149,153,157],{"title":134,"path":135,"stem":136},"Key modules","\u002Fdrupal\u002Fkey-modules","4.drupal\u002F10.key-modules",{"title":138,"path":139,"stem":140},"Custom elements","\u002Fdrupal\u002Fcustom-elements","4.drupal\u002F20.custom-elements",{"title":142,"path":143,"stem":144},"Routes","\u002Fdrupal\u002Froutes","4.drupal\u002F30.routes",{"title":146,"path":147,"stem":148},"Providing blocks","\u002Fdrupal\u002Fproviding-blocks","4.drupal\u002F40.providing-blocks",{"title":150,"path":151,"stem":152},"Custom Element Processors","\u002Fdrupal\u002Fcustom-element-processors","4.drupal\u002F50.custom-element-processors",{"title":154,"path":155,"stem":156},"Adding Drupal forms","\u002Fdrupal\u002Fadd-drupal-forms","4.drupal\u002F60.add-drupal-forms",{"title":158,"path":159,"stem":160},"Providing themes","\u002Fdrupal\u002Fthemes","4.drupal\u002F70.themes",{"title":162,"icon":163,"path":164,"stem":165,"children":166,"page":26},"Nuxt","simple-icons:nuxtdotjs","\u002Fnuxt","5.nuxt",[167,171,175,179,183,187,191,195,199,203,207,211,215],{"title":168,"path":169,"stem":170},"Introduction","\u002Fnuxt\u002Fintroduction","5.nuxt\u002F10.introduction",{"title":172,"path":173,"stem":174},"Setup","\u002Fnuxt\u002Fsetup","5.nuxt\u002F20.setup",{"title":176,"path":177,"stem":178},"Rendering Custom Elements","\u002Fnuxt\u002Frender-custom-elements","5.nuxt\u002F30.render-custom-elements",{"title":180,"path":181,"stem":182},"Default components","\u002Fnuxt\u002Fdefault-components","5.nuxt\u002F32.default-components",{"title":184,"path":185,"stem":186},"Composables","\u002Fnuxt\u002Fcomposables","5.nuxt\u002F35.composables",{"title":188,"path":189,"stem":190},"Drupal JS libraries","\u002Fnuxt\u002Fdrupal-libraries","5.nuxt\u002F37.drupal-libraries",{"title":192,"path":193,"stem":194},"Custom Routes","\u002Fnuxt\u002Fcustom-routes","5.nuxt\u002F40.custom-routes",{"title":196,"path":197,"stem":198},"Page Layouts","\u002Fnuxt\u002Fpage-layouts","5.nuxt\u002F50.page-layouts",{"title":200,"path":201,"stem":202},"Component Previews","\u002Fnuxt\u002Fcomponent-previews","5.nuxt\u002F55.component-previews",{"title":204,"path":205,"stem":206},"Component Index","\u002Fnuxt\u002Fcanvas-components","5.nuxt\u002F57.canvas-components",{"title":208,"path":209,"stem":210},"Rendering modes","\u002Fnuxt\u002Frendering-modes","5.nuxt\u002F60.rendering-modes",{"title":212,"path":213,"stem":214},"Deployment options","\u002Fnuxt\u002Fdeployment","5.nuxt\u002F70.deployment",{"title":216,"path":217,"stem":218},"Resources","\u002Fnuxt\u002Fresources","5.nuxt\u002F90.resources",{"title":220,"icon":221,"path":222,"stem":223,"children":224,"page":26},"Deployment","solar:server-square-cloud-linear","\u002Fdeployment","6.deployment",[225,229],{"title":226,"path":227,"stem":228},"Deployment Strategies","\u002Fdeployment\u002Fdeployment-strategy","6.deployment\u002F10.deployment-strategy",{"title":230,"path":231,"stem":232},"Unified Hosting","\u002Fdeployment\u002Funified-hosting","6.deployment\u002F20.unified-hosting",{"id":234,"title":84,"body":235,"description":241,"extension":544,"links":545,"meta":546,"navigation":547,"path":85,"seo":548,"stem":86,"__hash__":549},"docs\u002F3.advanced-topics\u002F05.multi-frontend.md",{"type":236,"value":237,"toc":537},"minimark",[238,242,247,250,350,354,385,389,392,534],[239,240,241],"p",{},"Thanks to the component-oriented decoupling of Lupus Decoupled Drupal, it's really easy to connect a frontend of choice!",[243,244,246],"h2",{"id":245},"supported-frontend-frameworks","Supported frontend frameworks",[239,248,249],{},"Lupus Decoupled provides supports for the following frontend frameworks:",[251,252,253,276],"table",{},[254,255,256],"thead",{},[257,258,259,263,266,269,272],"tr",{},[260,261,262],"th",{},"Framework",[260,264,265],{},"Technology",[260,267,268],{},"Status",[260,270,271],{},"Description",[260,273,275],{"align":274},"left","Link",[277,278,279,307,332],"tbody",{},[257,280,281,287,290,293,299],{},[282,283,284],"td",{},[285,286,162],"a",{"href":169},[282,288,289],{},"Vue.js, JavaScript",[282,291,292],{},"Default, Stable & Complete",[282,294,295,298],{},[285,296,297],{"href":173},"Easy setup"," via re-usable connector module.",[282,300,301],{"align":274},[285,302,306],{"href":303,"rel":304},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxtjs-drupal-ce",[305],"nofollow","Connector module",[257,308,309,316,319,322,325],{},[282,310,311],{},[285,312,315],{"href":313,"rel":314},"https:\u002F\u002Fnextjs.org",[305],"Next.js",[282,317,318],{},"React, JavaScript",[282,320,321],{},"Proof-of-concept",[282,323,324],{},"Example implementation, see README for details.",[282,326,327],{"align":274},[285,328,331],{"href":329,"rel":330},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nextjs-example",[305],"Example implementation",[257,333,334,337,344,346,348],{},[282,335,336],{},"Yours?",[282,338,339],{},[285,340,343],{"href":341,"rel":342},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-website\u002Fedit\u002Fmain\u002Fcontent\u002F3.advanced-topics\u002F05.multi-frontend.md",[305],"Add it!",[282,345],{},[282,347],{},[282,349],{"align":274},[243,351,353],{"id":352},"example-frontends","Example frontends",[355,356,357,365,372,378],"ul",{},[358,359,360],"li",{},[285,361,364],{"href":362,"rel":363},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt-starter",[305],"Nuxt Naked Starter",[358,366,367],{},[285,368,371],{"href":369,"rel":370},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt-shadcn",[305],"Nuxt Shadcn Example",[358,373,374],{},[285,375,377],{"href":329,"rel":376},[305],"Next.js Example",[358,379,380],{},[285,381,384],{"href":382,"rel":383},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt2-demo",[305],"Nuxt 2 Example (legacy)",[243,386,388],{"id":387},"adding-a-new-frontend-framework","Adding a new frontend framework",[239,390,391],{},"Adding a support for a new framework is quite easy. Here is a short overview of what the frontend needs to take care of:",[355,393,394,414,424,434,448,466,472,483],{},[358,395,396,400,401,405,406,409,410,413],{},[397,398,399],"em",{},"Proxying requests",": The frontend typically proxies requests to the Drupal ",[402,403,404],"code",{},"\u002Fce-api"," endpoint, while preserving the request URI and optionally some request headers.\nThat way, a request to ",[402,407,408],{},"\u002Fnews"," is served by the frontend, which requests the backend API at ",[402,411,412],{},"\u002Fce-api\u002Fnews"," and takes care\nof rendering the response.",[358,415,416,419,420,423],{},[397,417,418],{},"Forwarding headers",": By forwarding the cookie header, the frontend may easily leverage Drupal ",[285,421,422],{"href":47},"authentication handling",".",[358,425,426,429,430,433],{},[397,427,428],{},"Rendering page content",": The ",[402,431,432],{},"content"," section of a response contains a nested tree of custom elements that need to be rendered on the page.",[358,435,436,439,440,444,445,423],{},[397,437,438],{},"Render a page shell",": Request ",[285,441,443],{"href":442},"\u002Fguide\u002Fsite-layout-menus#navigation-menus","navigation menus"," and render them as part of a ",[285,446,447],{"href":43},"site layout",[358,449,450,453,454,458,459,462,463,423],{},[397,451,452],{},"Support page attributes",": Support all page attributes provided by the Drupal ",[285,455,457],{"href":456},"\u002Fget-started\u002Fhow-it-works#custom-elements-page-api","page API",", i.e. render ",[285,460,461],{"href":55},"breadcrumbs and messages",", support ",[285,464,465],{"href":51},"Metatags and Local tasks",[358,467,468,471],{},[397,469,470],{},"Handle errors",": Take care to not add special handling for HTTP 4xx responses, such that Drupal-controlled error pages get rendered as usual. Simply take care of forwarding the status code.",[358,473,474,477,478,482],{},[397,475,476],{},"Handle redirects",": When the page-API generates a ",[285,479,481],{"href":480},"\u002Fguide\u002Fredirects#redirect-api-responses","redirect response"," instead of a page, take care to issue a suitable redirect response with the given status code instead of rendering a page.",[358,484,485,488,489,491,492],{},[397,486,487],{},"Canvas support"," (optional): To support ",[285,490,70],{"href":71},", two additional pieces are needed:\n",[355,493,494,506],{},[358,495,496,499,500,505],{},[397,497,498],{},"Custom Elements preview provider",": Implement a preview provider plugin so the Canvas editor can render live component previews via an iframe. The provider receives a component name and props and renders the component in isolation. See the ",[285,501,504],{"href":502,"rel":503},"https:\u002F\u002Fgit.drupalcode.org\u002Fproject\u002Fcustom_elements\u002F-\u002Fblob\u002F3.x\u002Fsrc\u002FPlugin\u002FCustomElementsPreviewProvider\u002FNuxtPreviewProvider.php?ref_type=heads",[305],"Nuxt preview provider plugin"," as a reference implementation.",[358,507,508,511,512,515,516,521,522,527,528,533],{},[397,509,510],{},"Component index",": Expose a ",[402,513,514],{},"component-index.json"," endpoint listing available components, their props, and metadata. ",[285,517,520],{"href":518,"rel":519},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas_extjs",[305],"Canvas External JS Components"," (a Canvas extension for integrating external JavaScript components) reads this index to populate the Canvas editor UI. See the ",[285,523,526],{"href":524,"rel":525},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxt-component-preview#component-index",[305],"nuxt-component-preview component index"," and ",[285,529,532],{"href":530,"rel":531},"https:\u002F\u002Fgithub.com\u002Ffullfatthings\u002Fdrupal-canvas-react",[305],"fullfatthings\u002Fdrupal-canvas-react"," for Vue and React reference implementations.",[239,535,536],{},"That's it!",{"title":538,"searchDepth":539,"depth":539,"links":540},"",2,[541,542,543],{"id":245,"depth":539,"text":246},{"id":352,"depth":539,"text":353},{"id":387,"depth":539,"text":388},"md",null,{},true,{"title":84,"description":241},"8LbMX4R457PnmnJT0q44xu5IvUut9RJZpc2fUUdqFH8",[551,553],{"title":74,"path":75,"stem":76,"description":552,"children":-1},"Drupal CMS is Drupal's user-friendly distribution aimed at marketers and content teams. Lupus Decoupled supports it via site templates, providing a fully decoupled setup out of the box.",{"title":88,"path":89,"stem":90,"description":554,"children":-1},"The Lupus Decoupled Views\nsubmodule provides support for Drupal's Views module. The Views module is Drupal's native way and very powerful way of creating listings of content. It provides a UI for configuring complex queries, searches and the rendering of results, including paging.",1786631276278]