[{"data":1,"prerenderedAt":413},["ShallowReactive",2],{"navigation_docs":3,"-drupal-themes":233,"-drupal-themes-surround":408},[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":158,"body":235,"description":313,"extension":402,"links":403,"meta":404,"navigation":405,"path":159,"seo":406,"stem":160,"__hash__":407},"docs\u002F4.drupal\u002F70.themes.md",{"type":236,"value":237,"toc":392},"minimark",[238,243,248,261,264,277,285,289,304,307,332,337,344,347,351,375,379,388],[239,240,242],"h1",{"id":241},"providing-themes-with-javascript-rendering","Providing Themes with JavaScript Rendering",[244,245,247],"h2",{"id":246},"overview","Overview",[249,250,251,252,256,257,260],"p",{},"Lupus CSR (Client-Side Rendering) themes allow you to bundle a pre-built frontend application directly as a Drupal theme, so no separate frontend server is needed. Drupal serves the frontend's ",[253,254,255],"code",{},"index.html"," for all frontend routes; the frontend loads in the browser and fetches content from the CE API at ",[253,258,259],{},"\u002Fce-api\u002F..."," on the same origin.",[249,262,263],{},"This approach is ideal for:",[265,266,267,271,274],"ul",{},[268,269,270],"li",{},"Drupal CMS site templates where no separate frontend infrastructure is desired",[268,272,273],{},"Getting started quickly without setting up a Node.js server",[268,275,276],{},"Simple projects where SEO is not a primary concern",[249,278,279,280,284],{},"Note that client-side rendering means content is rendered in the browser via JavaScript. Search engines may not fully index CSR content. For production sites where SEO matters, use ",[281,282,283],"a",{"href":209},"server-side rendering"," instead.",[244,286,288],{"id":287},"lupus-client-side-rendering-lupus-csr","Lupus Client-Side Rendering (Lupus CSR)",[249,290,291,297,298,300,301,303],{},[281,292,296],{"href":293,"rel":294},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Flupus_csr",[295],"nofollow","Lupus CSR"," is the Drupal base theme that enables this pattern. It intercepts Drupal's normal HTML output and delivers the frontend's ",[253,299,255],{}," instead. Because the frontend communicates with ",[253,302,259],{}," on the same origin, CORS configuration is not needed and Drupal authentication works out of the box.",[249,305,306],{},"Install it via Composer:",[308,309,314],"pre",{"className":310,"code":311,"language":312,"meta":313,"style":313},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require drupal\u002Flupus_csr\n","bash","",[253,315,316],{"__ignoreMap":313},[317,318,321,325,329],"span",{"class":319,"line":320},"line",1,[317,322,324],{"class":323},"sBMFI","composer",[317,326,328],{"class":327},"sfazB"," require",[317,330,331],{"class":327}," drupal\u002Flupus_csr\n",[333,334,336],"h3",{"id":335},"using-lupus-csr-directly","Using Lupus CSR Directly",[249,338,339,340,343],{},"The simplest approach: enable Lupus CSR as your active theme and configure it through the theme settings form at ",[253,341,342],{},"\u002Fadmin\u002Fappearance\u002Fsettings\u002Flupus_csr",". Set a separate admin theme (e.g. Claro) to keep the Drupal backend accessible.",[249,345,346],{},"The frontend redirect in Lupus Decoupled settings is not needed with theme-based rendering and can stay disabled.",[333,348,350],{"id":349},"creating-a-sub-theme","Creating a Sub-Theme",[249,352,353,354,357,358,361,362,364,365,368,369,374],{},"For distributable or project-specific setups, create a sub-theme of ",[253,355,356],{},"lupus_csr"," and include your frontend build output in a ",[253,359,360],{},"dist\u002F"," directory. The ",[253,363,356],{}," module includes an example Nuxt starter in its ",[253,366,367],{},"examples\u002F"," directory. Refer to the ",[281,370,373],{"href":371,"rel":372},"https:\u002F\u002Fgit.drupalcode.org\u002Fproject\u002Flupus_csr\u002F-\u002Fblob\u002F1.x\u002FUSAGE.md?ref_type=heads#lupus-csr---sub-theme-guide",[295],"Lupus CSR sub-theme guide"," for configuration details.",[333,376,378],{"id":377},"canvas-integration","Canvas Integration",[249,380,381,382,387],{},"If the theme's preview provider supports it, components are automatically registered with ",[281,383,386],{"href":384,"rel":385},"https:\u002F\u002Fwww.drupal.org\u002Fproject\u002Fcanvas_extjs",[295],"Canvas ExtJS"," when the theme is installed. The component index is read from the theme's bundled build output.",[389,390,391],"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":313,"searchDepth":393,"depth":393,"links":394},2,[395,396],{"id":246,"depth":393,"text":247},{"id":287,"depth":393,"text":288,"children":397},[398,400,401],{"id":335,"depth":399,"text":336},3,{"id":349,"depth":399,"text":350},{"id":377,"depth":399,"text":378},"md",null,{},true,{"title":158,"description":313},"DcMVhLCMy0unRuWPn_3YPMSnV2-Ue67xRWuUMuAzRMo",[409,411],{"title":154,"path":155,"stem":156,"description":410,"children":-1},"Lupus Decoupled Drupal supports submitting Drupal forms via the decoupled frontend, as documented under Advanced Topics - Drupal Forms.\nIn order to enable submitting another Drupal form on the frontend, a custom-elements enabled form processing route must be added. This is\ndone easily by:",{"title":168,"path":169,"stem":170,"description":412,"children":-1},"Nuxt is an open source framework under MIT license that makes web development simple and powerful.",1786631279664]