[{"data":1,"prerenderedAt":543},["ShallowReactive",2],{"navigation_docs":3,"-advanced-topics-multi-frontend":221,"-advanced-topics-multi-frontend-surround":538},[4,27,77,123,157,207],{"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],{"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},"Site Templates","\u002Fadvanced-topics\u002Fsite-templates","3.advanced-topics\u002F65.site-templates",{"title":116,"path":117,"stem":118},"Block layout","\u002Fadvanced-topics\u002Fblock-layout","3.advanced-topics\u002F70.block-layout",{"title":120,"path":121,"stem":122},"Debugging API requests","\u002Fadvanced-topics\u002Fdebugging","3.advanced-topics\u002F80.debugging",{"title":124,"icon":125,"path":126,"stem":127,"children":128,"page":26},"Drupal","simple-icons:drupal","\u002Fdrupal","4.drupal",[129,133,137,141,145,149,153],{"title":130,"path":131,"stem":132},"Key modules","\u002Fdrupal\u002Fkey-modules","4.drupal\u002F10.key-modules",{"title":134,"path":135,"stem":136},"Custom elements","\u002Fdrupal\u002Fcustom-elements","4.drupal\u002F20.custom-elements",{"title":138,"path":139,"stem":140},"Routes","\u002Fdrupal\u002Froutes","4.drupal\u002F30.routes",{"title":142,"path":143,"stem":144},"Providing blocks","\u002Fdrupal\u002Fproviding-blocks","4.drupal\u002F40.providing-blocks",{"title":146,"path":147,"stem":148},"Custom Element Processors","\u002Fdrupal\u002Fcustom-element-processors","4.drupal\u002F50.custom-element-processors",{"title":150,"path":151,"stem":152},"Adding Drupal forms","\u002Fdrupal\u002Fadd-drupal-forms","4.drupal\u002F60.add-drupal-forms",{"title":154,"path":155,"stem":156},"Providing themes","\u002Fdrupal\u002Fthemes","4.drupal\u002F70.themes",{"title":158,"icon":159,"path":160,"stem":161,"children":162,"page":26},"Nuxt","simple-icons:nuxtdotjs","\u002Fnuxt","5.nuxt",[163,167,171,175,179,183,187,191,195,199,203],{"title":164,"path":165,"stem":166},"Introduction","\u002Fnuxt\u002Fintroduction","5.nuxt\u002F10.introduction",{"title":168,"path":169,"stem":170},"Setup","\u002Fnuxt\u002Fsetup","5.nuxt\u002F20.setup",{"title":172,"path":173,"stem":174},"Rendering Custom Elements","\u002Fnuxt\u002Frender-custom-elements","5.nuxt\u002F30.render-custom-elements",{"title":176,"path":177,"stem":178},"Default components","\u002Fnuxt\u002Fdefault-components","5.nuxt\u002F32.default-components",{"title":180,"path":181,"stem":182},"Composables","\u002Fnuxt\u002Fcomposables","5.nuxt\u002F35.composables",{"title":184,"path":185,"stem":186},"Custom Routes","\u002Fnuxt\u002Fcustom-routes","5.nuxt\u002F40.custom-routes",{"title":188,"path":189,"stem":190},"Page Layouts","\u002Fnuxt\u002Fpage-layouts","5.nuxt\u002F50.page-layouts",{"title":192,"path":193,"stem":194},"Component Previews","\u002Fnuxt\u002Fcomponent-previews","5.nuxt\u002F55.component-previews",{"title":196,"path":197,"stem":198},"Rendering modes","\u002Fnuxt\u002Frendering-modes","5.nuxt\u002F60.rendering-modes",{"title":200,"path":201,"stem":202},"Deployment options","\u002Fnuxt\u002Fdeployment","5.nuxt\u002F70.deployment",{"title":204,"path":205,"stem":206},"Resources","\u002Fnuxt\u002Fresources","5.nuxt\u002F90.resources",{"title":208,"icon":209,"path":210,"stem":211,"children":212,"page":26},"Deployment","solar:server-square-cloud-linear","\u002Fdeployment","6.deployment",[213,217],{"title":214,"path":215,"stem":216},"Deployment Strategies","\u002Fdeployment\u002Fdeployment-strategy","6.deployment\u002F10.deployment-strategy",{"title":218,"path":219,"stem":220},"Unified Hosting","\u002Fdeployment\u002Funified-hosting","6.deployment\u002F20.unified-hosting",{"id":222,"title":84,"body":223,"description":229,"extension":532,"links":533,"meta":534,"navigation":535,"path":85,"seo":536,"stem":86,"__hash__":537},"docs\u002F3.advanced-topics\u002F05.multi-frontend.md",{"type":224,"value":225,"toc":525},"minimark",[226,230,235,238,338,342,373,377,380,522],[227,228,229],"p",{},"Thanks to the component-oriented decoupling of Lupus Decoupled Drupal, it's really easy to connect a frontend of choice!",[231,232,234],"h2",{"id":233},"supported-frontend-frameworks","Supported frontend frameworks",[227,236,237],{},"Lupus Decoupled provides supports for the following frontend frameworks:",[239,240,241,264],"table",{},[242,243,244],"thead",{},[245,246,247,251,254,257,260],"tr",{},[248,249,250],"th",{},"Framework",[248,252,253],{},"Technology",[248,255,256],{},"Status",[248,258,259],{},"Description",[248,261,263],{"align":262},"left","Link",[265,266,267,295,320],"tbody",{},[245,268,269,275,278,281,287],{},[270,271,272],"td",{},[273,274,158],"a",{"href":165},[270,276,277],{},"Vue.js, JavaScript",[270,279,280],{},"Default, Stable & Complete",[270,282,283,286],{},[273,284,285],{"href":169},"Easy setup"," via re-usable connector module.",[270,288,289],{"align":262},[273,290,294],{"href":291,"rel":292},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxtjs-drupal-ce",[293],"nofollow","Connector module",[245,296,297,304,307,310,313],{},[270,298,299],{},[273,300,303],{"href":301,"rel":302},"https:\u002F\u002Fnextjs.org",[293],"Next.js",[270,305,306],{},"React, JavaScript",[270,308,309],{},"Proof-of-concept",[270,311,312],{},"Example implementation, see README for details.",[270,314,315],{"align":262},[273,316,319],{"href":317,"rel":318},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nextjs-example",[293],"Example implementation",[245,321,322,325,332,334,336],{},[270,323,324],{},"Yours?",[270,326,327],{},[273,328,331],{"href":329,"rel":330},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-website\u002Fedit\u002Fmain\u002Fcontent\u002F3.advanced-topics\u002F05.multi-frontend.md",[293],"Add it!",[270,333],{},[270,335],{},[270,337],{"align":262},[231,339,341],{"id":340},"example-frontends","Example frontends",[343,344,345,353,360,366],"ul",{},[346,347,348],"li",{},[273,349,352],{"href":350,"rel":351},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt-starter",[293],"Nuxt Naked Starter",[346,354,355],{},[273,356,359],{"href":357,"rel":358},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt-shadcn",[293],"Nuxt Shadcn Example",[346,361,362],{},[273,363,365],{"href":317,"rel":364},[293],"Next.js Example",[346,367,368],{},[273,369,372],{"href":370,"rel":371},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Flupus-decoupled-nuxt2-demo",[293],"Nuxt 2 Example (legacy)",[231,374,376],{"id":375},"adding-a-new-frontend-framework","Adding a new frontend framework",[227,378,379],{},"Adding a support for a new framework is quite easy. Here is a short overview of what the frontend needs to take care of:",[343,381,382,402,412,422,436,454,460,471],{},[346,383,384,388,389,393,394,397,398,401],{},[385,386,387],"em",{},"Proxying requests",": The frontend typically proxies requests to the Drupal ",[390,391,392],"code",{},"\u002Fce-api"," endpoint, while preserving the request URI and optionally some request headers.\nThat way, a request to ",[390,395,396],{},"\u002Fnews"," is served by the frontend, which requests the backend API at ",[390,399,400],{},"\u002Fce-api\u002Fnews"," and takes care\nof rendering the response.",[346,403,404,407,408,411],{},[385,405,406],{},"Forwarding headers",": By forwarding the cookie header, the frontend may easily leverage Drupal ",[273,409,410],{"href":47},"authentication handling",".",[346,413,414,417,418,421],{},[385,415,416],{},"Rendering page content",": The ",[390,419,420],{},"content"," section of a response contains a nested tree of custom elements that need to be rendered on the page.",[346,423,424,427,428,432,433,411],{},[385,425,426],{},"Render a page shell",": Request ",[273,429,431],{"href":430},"\u002Fguide\u002Fsite-layout-menus#navigation-menus","navigation menus"," and render them as part of a ",[273,434,435],{"href":43},"site layout",[346,437,438,441,442,446,447,450,451,411],{},[385,439,440],{},"Support page attributes",": Support all page attributes provided by the Drupal ",[273,443,445],{"href":444},"\u002Fget-started\u002Fhow-it-works#custom-elements-page-api","page API",", i.e. render ",[273,448,449],{"href":55},"breadcrumbs and messages",", support ",[273,452,453],{"href":51},"Metatags and Local tasks",[346,455,456,459],{},[385,457,458],{},"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.",[346,461,462,465,466,470],{},[385,463,464],{},"Handle redirects",": When the page-API generates a ",[273,467,469],{"href":468},"\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.",[346,472,473,476,477,479,480],{},[385,474,475],{},"Canvas support"," (optional): To support ",[273,478,70],{"href":71},", two additional pieces are needed:\n",[343,481,482,494],{},[346,483,484,487,488,493],{},[385,485,486],{},"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 ",[273,489,492],{"href":490,"rel":491},"https:\u002F\u002Fgit.drupalcode.org\u002Fproject\u002Fcustom_elements\u002F-\u002Fblob\u002F3.x\u002Fsrc\u002FPlugin\u002FCustomElementsPreviewProvider\u002FNuxtPreviewProvider.php?ref_type=heads",[293],"Nuxt preview provider plugin"," as a reference implementation.",[346,495,496,499,500,503,504,509,510,515,516,521],{},[385,497,498],{},"Component index",": Expose a ",[390,501,502],{},"component-index.json"," endpoint listing available components, their props, and metadata. ",[273,505,508],{"href":506,"rel":507},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas_extjs",[293],"Canvas External JS Components"," (a Canvas extension for integrating external JavaScript components) reads this index to populate the Canvas editor UI. See the ",[273,511,514],{"href":512,"rel":513},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxt-component-preview#component-index",[293],"nuxt-component-preview component index"," and ",[273,517,520],{"href":518,"rel":519},"https:\u002F\u002Fgithub.com\u002Ffullfatthings\u002Fdrupal-canvas-react",[293],"fullfatthings\u002Fdrupal-canvas-react"," for Vue and React reference implementations.",[227,523,524],{},"That's it!",{"title":526,"searchDepth":527,"depth":527,"links":528},"",2,[529,530,531],{"id":233,"depth":527,"text":234},{"id":340,"depth":527,"text":341},{"id":375,"depth":527,"text":376},"md",null,{},true,{"title":84,"description":229},"8LbMX4R457PnmnJT0q44xu5IvUut9RJZpc2fUUdqFH8",[539,541],{"title":74,"path":75,"stem":76,"description":540,"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":542,"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.",1776084716271]