[{"data":1,"prerenderedAt":511},["ShallowReactive",2],{"navigation_docs":3,"-guide-canvas":221,"-guide-canvas-surround":507},[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":70,"body":223,"description":500,"extension":501,"links":502,"meta":503,"navigation":504,"path":71,"seo":505,"stem":72,"__hash__":506},"docs\u002F2.guide\u002F90.canvas.md",{"type":224,"value":225,"toc":486},"minimark",[226,231,247,252,264,267,278,282,291,328,342,347,360,364,377,404,412,416,420,423,430,434,437,472,475,479,482],[227,228,230],"h1",{"id":229},"decoupling-drupal-canvas","Decoupling Drupal Canvas",[232,233,234,240,241,246],"p",{},[235,236,70],"a",{"href":237,"rel":238},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas",[239],"nofollow"," is Drupal's modern page builder (",[235,242,245],{"href":243,"rel":244},"https:\u002F\u002Fproject.pages.drupalcode.org\u002Fcanvas\u002F",[239],"docs","). When paired with Lupus Decoupled, Canvas becomes a powerful decoupled page builder that supports varying frontend frameworks.",[248,249,251],"h2",{"id":250},"how-it-works","How It Works",[232,253,254,255,259,260,263],{},"Canvas pages are built from components in Drupal's Canvas editor. In this context, a component can be a custom element (a Vue\u002FReact component provided by the frontend) or a regular Drupal block — which can render any Drupal content, including Views blocks that themselves output custom elements. While editing, the editor renders live previews of components via JavaScript using a preview provider (i.e. the frontend). Once published, the page is served through the CE API like any other content (e.g. ",[256,257,258],"code",{},"\u002Fce-api\u002Fpage\u002F{id}","), as regular ",[235,261,262],{"href":135},"custom elements API"," output, so components are regularly rendered by the frontend.",[248,265,74],{"id":266},"drupal-cms",[232,268,269,270,273,274,277],{},"When using ",[235,271,272],{"href":113},"Lupus Decoupled Starter"," or a similar site template based upon Lupus Decoupled, you get a fully working setup with Canvas pre-configured. Refer to the ",[235,275,276],{"href":75},"Drupal CMS page"," for details.",[248,279,281],{"id":280},"manual-setup","Manual Setup",[232,283,284,285,290],{},"Apply the ",[235,286,289],{"href":287,"rel":288},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Flupus_decoupled_recipe_canvas",[239],"Lupus Decoupled Canvas Recipe"," to set up the module and its dependencies with a single recipe apply:",[292,293,298],"pre",{"className":294,"code":295,"language":296,"meta":297,"style":297},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require drupal\u002Flupus_decoupled_recipe_canvas\ndrush recipe ..\u002Frecipes\u002Flupus_decoupled_recipe_canvas\n","bash","",[256,299,300,316],{"__ignoreMap":297},[301,302,305,309,313],"span",{"class":303,"line":304},"line",1,[301,306,308],{"class":307},"sBMFI","composer",[301,310,312],{"class":311},"sfazB"," require",[301,314,315],{"class":311}," drupal\u002Flupus_decoupled_recipe_canvas\n",[301,317,319,322,325],{"class":303,"line":318},2,[301,320,321],{"class":307},"drush",[301,323,324],{"class":311}," recipe",[301,326,327],{"class":311}," ..\u002Frecipes\u002Flupus_decoupled_recipe_canvas\n",[232,329,330,331,335,336,341],{},"This installs and configures ",[235,332,334],{"href":237,"rel":333},[239],"Canvas",", ",[235,337,340],{"href":338,"rel":339},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas_extjs",[239],"Canvas ExtJS",", and the Lupus Decoupled Canvas sub-module.",[343,344,346],"h3",{"id":345},"configuring-the-editor-theme","Configuring the Editor Theme",[232,348,349,350,353,354,359],{},"Configure the theme used for Canvas editor previews at ",[256,351,352],{},"\u002Fadmin\u002Fconfig\u002Fsystem\u002Flupus-decoupled\u002Fsettings"," under \"Lupus Decoupled theme\". A minimal theme like Stark or ",[235,355,358],{"href":356,"rel":357},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Flupus_stark",[239],"Lupus Stark"," is recommended.",[248,361,363],{"id":362},"providing-components","Providing Components",[232,365,366,367,371,372,376],{},"Components are provided via a ",[368,369,370],"strong",{},"component index",": a JSON file listing available components, their props, and metadata. ",[235,373,375],{"href":338,"rel":374},[239],"Canvas External JS Components"," (a Canvas extension for integrating external JavaScript components) reads this index and makes the components available in the Canvas editor UI.",[378,379,380,395],"ul",{},[381,382,383,386,387,392,393],"li",{},[235,384,385],{"href":193},"Vue\u002FNuxt",": very well supported via ",[235,388,391],{"href":389,"rel":390},"https:\u002F\u002Fgithub.com\u002Fdrunomics\u002Fnuxt-component-preview",[239],"nuxt-component-preview",", see ",[235,394,192],{"href":193},[381,396,397,398,403],{},"React: no ready-made setup yet. ",[235,399,402],{"href":400,"rel":401},"https:\u002F\u002Fgithub.com\u002Ffullfatthings\u002Fdrupal-canvas-react",[239],"fullfatthings\u002Fdrupal-canvas-react"," provides a library for exposing React components and generating a component index, but some integration work is required to wire everything together.",[232,405,406,407,411],{},"For documentation on how to integrate other frontend frameworks, see ",[235,408,410],{"href":409},"\u002Fadvanced-topics\u002Fmulti-frontend#canvas-support","Multi-Frontend",".",[248,413,415],{"id":414},"component-registration","Component Registration",[343,417,419],{"id":418},"automatic-registration-via-lupus-csr-themes","Automatic Registration via Lupus CSR Themes",[232,421,422],{},"When a Lupus CSR-based theme is installed, components are automatically registered from the theme's bundled component-index. No manual steps are needed.",[232,424,425,426,429],{},"Automatic registration also works with a decoupled frontend when the ",[256,427,428],{},"lupus_decoupled_canvas"," module is installed, provided the configured frontend exposes a component index at the configured frontend base URL.",[343,431,433],{"id":432},"decoupled-frontends","Decoupled Frontends",[232,435,436],{},"When using a decoupled frontend (e.g. a dev server), component registration must be triggered manually:",[378,438,439,453,462],{},[381,440,441,444,445,448,449,452],{},[368,442,443],{},"UI",": Go to ",[368,446,447],{},"Administration > Appearance > Components > External JS"," (",[256,450,451],{},"\u002Fadmin\u002Fappearance\u002Fcomponent\u002Fextjs",")",[381,454,455,458,459],{},[368,456,457],{},"Drush",": ",[256,460,461],{},"drush canvas:extjs-auto-register",[381,463,464,467,468,471],{},[368,465,466],{},"Recipe config action",": Use ",[256,469,470],{},"lupus_decoupled_canvas:registerComponents"," after configuring the preview provider URL",[232,473,474],{},"When the frontend base URL is changed via the Lupus Decoupled settings form, a prompt will remind you to update the component registration.",[248,476,478],{"id":477},"relationship-to-canvas-code-components","Relationship to Canvas Code Components",[232,480,481],{},"Drupal Canvas has built-in support for (P)React \"code components\" with their own bundler. These components are purely client-side rendered and currently do not integrate with Lupus Decoupled's CE API pipeline. Adding support for embedding them as custom elements would be straightforward, but is not implemented yet.",[483,484,485],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":297,"searchDepth":318,"depth":318,"links":487},[488,489,490,494,495,499],{"id":250,"depth":318,"text":251},{"id":266,"depth":318,"text":74},{"id":280,"depth":318,"text":281,"children":491},[492],{"id":345,"depth":493,"text":346},3,{"id":362,"depth":318,"text":363},{"id":414,"depth":318,"text":415,"children":496},[497,498],{"id":418,"depth":493,"text":419},{"id":432,"depth":493,"text":433},{"id":477,"depth":318,"text":478},"Drupal Canvas is Drupal's modern page builder (docs). When paired with Lupus Decoupled, Canvas becomes a powerful decoupled page builder that supports varying frontend frameworks.","md",null,{},true,{"title":70,"description":500},"KvTmRhDlf0wu1EtJBRHol1OvsisGjOl4-GsxGMYrkA4",[508,509],{"title":66,"path":67,"stem":68,"description":297,"children":-1},{"title":74,"path":75,"stem":76,"description":510,"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.",1776084716266]