[{"data":1,"prerenderedAt":653},["ShallowReactive",2],{"\u002Fdocs\u002Fdeployment":3,"dl-navigation-docs":307,"surroundings-\u002Fdocs\u002Fdeployment":647},{"id":4,"title":5,"_llmSection":6,"_local":6,"_schemaOrg":6,"_seo":6,"body":7,"description":298,"extension":299,"ignore":6,"meta":300,"navigation":301,"path":302,"seo":303,"sitemap":304,"stem":305,"__hash__":306},"docs\u002Fdocs\u002F07.deployment\u002F01.index.md","Building & Preparations",null,{"type":8,"value":9,"toc":289},"minimark",[10,37,89,98,170],[11,12,13,14,22,23,30,31,36],"p",{},"On this page, you'll find some important points on how to prepare and build your application. And on the following pages, you'll read guides explaining how to deploy your site on platforms like ",[15,16,17],"strong",{},[18,19,21],"dl-link",{"label":20},"Vercel","$docs-deployment-vercel",", ",[15,24,25],{},[26,27],"dl-tooltip",{"label":28,"tooltip":29},"Cloudflare","Coming soon",", and ",[15,32,33],{},[26,34],{"label":35,"tooltip":29},"Netlify",".",[38,39,41,45,49,52,55,63,76,86],"dl-section",{"id":40},"building",[42,43,44],"h2",{"id":40},"Building",[46,47,48],"dl-prompter",{},"building for production, how to build doclayer app",[46,50,51],{},"how to build and deploy doclayer",[46,53,54],{},"where to deploy doclayer",[11,56,57,58,62],{},"To build your app just hit ",[59,60,61],"code",{},"build",", like this:",[64,65,66],"dl-code",{},[67,68,74],"pre",{"className":69,"code":71,"language":72,"meta":73},[70],"language-bash","pnpm build\n\"cref:ip8ec2\"\n","bash","",[59,75,71],{"__ignoreMap":73},[11,77,78,79,82,83,36],{},"This way, your ",[15,80,81],{},"app will be built statically"," - fast, performant, and ready to be deployed anywhere you like. However, since we don't know your final deployment destination, the process is designed to be a bit more flexible. It's also worth mentioning that ",[15,84,85],{},"the Boilerplate application you may start with does not have any predefined deployment setup",[11,87,88],{},"Each deployment platform requires some additional settings, such as dedicated folder structures or configuration files. To address this, please check the guide for your desired deployment platform on the following pages.",[38,90,92,95],{"id":91},"behind-the-scenes",[42,93,94],{"id":91},"Behind the scenes",[11,96,97],{},"DocLayer performs a number of additional actions designed to improve your application's speed, performance, safety, and readability. Below, we've highlighted a few of these actions so you can easily recognize the immediate benefits.",[38,99,101,105,108,118,129,140,147,154],{"id":100},"static-generation",[102,103,104],"h3",{"id":100},"Static generation",[11,106,107],{},"DocLayer is designed as a content-focused application - ideal for documentation, specs, guides, blogs, and similar projects. It does not require advanced user interactions or dynamic data fetching, making it a perfect candidate for static site generation. This approach results in a fast and performant application.",[11,109,110,111,117],{},"Static builds can be efficiently cached on a CDN, minimizing hosting costs. For projects that require dynamic functionality or serverless actions, dedicated ",[15,112,113],{},[18,114,116],{"label":115},"adapters","$docs-adapters"," are available to handle those needs.",[11,119,120,121,124,125,128],{},"This is the initial ",[59,122,123],{},"prerender"," setup for the ",[18,126,127],{},"$nitro"," server:",[64,130,132],{"tabs":131},"nitro.config.ts",[67,133,138],{"className":134,"code":136,"language":137,"meta":73},[135],"language-ts","export const config = {\n  \u002F\u002F the rest of the config\n  prerender: {\n    crawlLinks: true,\n    routes: ['\u002F'],\n    ignore: ['\u002Fapi\u002F_doclayer\u002F*', '\u002Fapi\u002F.doclayer\u002F*'],\n  },\n};\n\"cref:gc5okk\"\n","ts",[59,139,136],{"__ignoreMap":73},[11,141,142,143,146],{},"With crawling enabled, the ",[15,144,145],{},"renderer will automatically generate a static version of every internal link it finds in your app",". However, if a page isn't linked anywhere, Nitro will not generate a static file for it.",[11,148,149,150,153],{},"Similarly, ",[15,151,152],{},"images will only be optimized if they appear in your content","; if not, they will simply be copied from their original location without optimization.",[11,155,156,157,160,161,164,165,169],{},"Additionally, since we use ",[15,158,159],{},"some internal development API endpoints",", all of these ",[15,162,163],{},"will be excluded from your final build",", as they are not needed in production. ",[18,166,116],{"label":167,"hash":168},"Adapter server handlers","handling-sensitive-data"," will be added automatically as needed by the dedicated module.",[38,171,173,176,179,257,260,286],{"id":172},"performance",[102,174,175],{"id":172},"Performance",[11,177,178],{},"To improve performance, and decrease the final build size we've used some additional techniques to make it possible. These are:",[180,181,182,207,221,229,245],"ul",{},[183,184,185,188,189,198,199,202,203,206],"li",{},[15,186,187],{},"CSS compression",": We use ",[190,191,195],"a",{"href":192,"rel":193},"https:\u002F\u002Fgithub.com\u002Fnuxt-modules\u002Fcritters",[194],"nofollow",[59,196,197],{},"@nuxtjs\u002Fcritters",", which extracts and inlines critical CSS, reducing the size of bundled ",[59,200,201],{},".css"," files. This is especially important for minimizing the size of ",[18,204,205],{},"$tailwind","'s prebuilt utility styles.",[183,208,209,212,213,216,217,220],{},[15,210,211],{},"Static compression",": In your final build ",[59,214,215],{},".html"," files will be compressed with ",[59,218,219],{},"gzip"," and delivered alongside the original files. Thanks to this, the server will automatically pick up the appropriate version and deliver it as quickly as possible, reducing load time since the compressed files are much smaller than the originals. It's important to note that these compressed files served by the server are cached by default, so modifying them at runtime will not have any effect.",[183,222,223,226,227,36],{},[15,224,225],{},"Predefined CDN caching",": Since DocLayer builds to a static application, almost all data will be aggressively cached at the edge, which means your application content may not update instantly everywhere. If a CDN is not available or configured, the system will fall back to in-memory caching, all managed by ",[18,228,127],{},[183,230,231,234,235,22,238,30,241,244],{},[15,232,233],{},"Application-based caching",": Components like ",[59,236,237],{},"DlRenderer",[59,239,240],{},"DlLink",[59,242,243],{},"DlCode"," utilize internal caching strategies to minimize unnecessary data recalculations during both build time and runtime. Content data fetched for pages and navigation is also cached. While the current system is efficient, there is still significant potential for further improvements, which we plan to introduce in future updates.",[183,246,247,250,251,256],{},[15,248,249],{},"Image optimization",": By default, ",[190,252,255],{"href":253,"rel":254},"https:\u002F\u002Fimage.nuxt.com\u002Fget-started\u002Fproviders",[194],"Nuxt Image Module"," handles image optimization using the built-in IPX provider. You can always switch your setup or use a different provider depending on your deployment platform. On some platforms, such as Vercel, optimization works automatically - no extra configuration is needed.",[11,258,259],{},"[[esc]]",[261,262,265,272,279],"dl-callout",{"title":263,"type":264},"Test performance with CDN","warning",[11,266,267,268,271],{},"It's important to note that ",[15,269,270],{},"given the nature of this application, you should not rely on local performance testing",". The best and most accurate results can only be achieved with a well-cached application on a CDN.",[273,274],"dl-image",{":iui":275,"alt":276,"caption":277,"src":278},"{\"image\": \"u-background-color\"}","DocLayer Performance Showcase","Production performance showcase (with CDN)","\u002Fimages\u002Fss-007.png",[11,280,281,282,285],{},"Of course, you can follow suggestions from tools like Lighthouse, but make sure to test only within the server context. The ",[15,283,284],{},"large number of variables that can influence the final results"," locally may not accurately reflect the true performance of your deployed app.",[11,287,288],{},"[[\u002Fesc]]",{"title":73,"searchDepth":290,"depth":290,"links":291},2,[292,293],{"id":40,"depth":290,"text":44},{"id":91,"depth":290,"text":94,"children":294},[295,297],{"id":100,"depth":296,"text":104},3,{"id":172,"depth":296,"text":175},"Build a static DocLayer app and prepare it for hosting","md",{},true,"\u002Fdocs\u002Fdeployment",{"title":5,"description":298},{"loc":302},"docs\u002F07.deployment\u002F01.index","Oe2rc6-2bEFUc5NBQHLZp2UYJC4EC3ynIdOJvTpqcOc",[308],{"title":309,"path":310,"stem":311,"children":312,"page":363},"Docs","\u002Fdocs","docs",[313,332,364,472,501,531,554,564,606,627],{"title":314,"path":315,"stem":316,"children":317,"description":6,"icon":331},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started\u002F01.index",[318,321,326],{"title":319,"path":315,"stem":316,"description":320},"Introduction","What DocLayer is, who it’s for, and how it can help",{"title":322,"path":323,"stem":324,"description":325},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F01.getting-started\u002F02.installation","How to install and run DocLayer",{"title":327,"path":328,"stem":329,"description":330},"FAQ","\u002Fdocs\u002Fgetting-started\u002Ffaq","docs\u002F01.getting-started\u002F03.faq","Frequently asked questions about DocLayer","rocket",{"title":333,"description":6,"icon":334,"path":335,"stem":336,"children":337,"page":363},"Guidelines","file-pen-line","\u002Fdocs\u002Fguidelines","docs\u002F02.guidelines",[338,343,348,353,358],{"title":339,"path":340,"stem":341,"description":342},"Internals","\u002Fdocs\u002Fguidelines\u002Finternals","docs\u002F02.guidelines\u002F02.internals","How DocLayer's structure, its architecture and internals fit together",{"title":344,"path":345,"stem":346,"description":347},"Configuration","\u002Fdocs\u002Fguidelines\u002Fconfiguration","docs\u002F02.guidelines\u002F03.configuration","Customize DocLayer via `app.config.ts` and its configuration",{"title":349,"path":350,"stem":351,"description":352},"Writing Content","\u002Fdocs\u002Fguidelines\u002Fwriting-content","docs\u002F02.guidelines\u002F04.writing-content","Write Markdown with Nuxt Content, DocLayer and prebuilt utilities",{"title":354,"path":355,"stem":356,"description":357},"Defining Metadata","\u002Fdocs\u002Fguidelines\u002Fdefining-metadata","docs\u002F02.guidelines\u002F05.defining-metadata","Set global and per-page SEO metadata for your DocLayer app",{"title":359,"path":360,"stem":361,"description":362},"Theming","\u002Fdocs\u002Fguidelines\u002Ftheming","docs\u002F02.guidelines\u002F06.theming","Customize DocLayer’s look with CSS variables and utility classes",false,{"title":365,"path":366,"stem":367,"children":368,"description":6,"label":319,"icon":471},"Components","\u002Fdocs\u002Fcomponents","docs\u002F03.components\u002F01.index",[369,372,378,382,386,390,395,400,405,410,415,420,425,430,436,441,446,451,456,461,466],{"title":370,"path":366,"stem":367,"description":371,"label":319},"Components Introduction","Overview of DocLayer’s built-in Markdown content components",{"title":373,"path":374,"stem":375,"description":376,"label":377},"Components Building & Styling","\u002Fdocs\u002Fcomponents\u002Fbuilding","docs\u002F03.components\u002F02.building","Create custom content components with DlWrapper","DlWrapper",{"title":237,"path":379,"stem":380,"description":381},"\u002Fdocs\u002Fcomponents\u002Frenderer","docs\u002F03.components\u002F03.renderer","Render reusable, shareable Markdown fragments anywhere in your content",{"title":240,"path":383,"stem":384,"description":385},"\u002Fdocs\u002Fcomponents\u002Flink","docs\u002F03.components\u002F04.link","Create internal links resolved from the global path registry",{"title":243,"path":387,"stem":388,"description":389},"\u002Fdocs\u002Fcomponents\u002Fcode","docs\u002F03.components\u002F05.code","Display your code snippets with syntax highlighting, copy, tabs, transformations and more",{"title":391,"path":392,"stem":393,"description":394},"DlCodeInline","\u002Fdocs\u002Fcomponents\u002Finline-code","docs\u002F03.components\u002F05.inline-code","Display inline code that stays on one line",{"title":396,"path":397,"stem":398,"description":399},"DlCallout","\u002Fdocs\u002Fcomponents\u002Fcallout","docs\u002F03.components\u002F06.callout","Display notes, warnings, and alerts as type-based callout blocks",{"title":391,"path":401,"stem":402,"description":394,"badge":403},"\u002Fdocs\u002Fcomponents\u002Fcode-inline","docs\u002F03.components\u002F06.code-inline",{"label":404,"glow":301},"new",{"title":406,"path":407,"stem":408,"description":409},"DlBadge","\u002Fdocs\u002Fcomponents\u002Fbadge","docs\u002F03.components\u002F07.badge","Show compact type-based status labels",{"title":411,"path":412,"stem":413,"description":414},"DlImage","\u002Fdocs\u002Fcomponents\u002Fimage","docs\u002F03.components\u002F08.image","Present optimized, responsive images with optional caption and inline styling",{"title":416,"path":417,"stem":418,"description":419},"DlStepper","\u002Fdocs\u002Fcomponents\u002Fstepper","docs\u002F03.components\u002F09.stepper","List vertical step sequences using named slots",{"title":421,"path":422,"stem":423,"description":424},"DlTooltip","\u002Fdocs\u002Fcomponents\u002Ftooltip","docs\u002F03.components\u002F10.tooltip","Annotate with contextual configurable tooltips",{"title":426,"path":427,"stem":428,"description":429},"DlPrompter","\u002Fdocs\u002Fcomponents\u002Fprompter","docs\u002F03.components\u002F11.prompter","Prompt the search index and AI Assistant with hidden, removable content inserts",{"title":431,"path":432,"stem":433,"description":434,"badge":435},"DlFormat","\u002Fdocs\u002Fcomponents\u002Fformat","docs\u002F03.components\u002F12.format","Format Markdown content into a structured HTML output",{"label":404,"glow":301},{"title":437,"path":438,"stem":439,"description":440},"DlSection","\u002Fdocs\u002Fcomponents\u002Fsection","docs\u002F03.components\u002F13.section","Wrap and demarcate content sections",{"title":442,"path":443,"stem":444,"description":445},"DlGrid","\u002Fdocs\u002Fcomponents\u002Fgrid","docs\u002F03.components\u002F14.grid","Lay out named content items in a responsive grid",{"title":447,"path":448,"stem":449,"description":450},"DlHero","\u002Fdocs\u002Fcomponents\u002Fhero","docs\u002F03.components\u002F20.hero","Present a prominent page hero with title, lead and CTA",{"title":452,"path":453,"stem":454,"description":455},"DlHeading","\u002Fdocs\u002Fcomponents\u002Fheading","docs\u002F03.components\u002F21.heading","Divide content with section headings",{"title":457,"path":458,"stem":459,"description":460},"DlFeaturesGrid","\u002Fdocs\u002Fcomponents\u002Ffeatures-grid","docs\u002F03.components\u002F22.features-grid","Render a responsive features grid with animated and formatted tiles",{"title":462,"path":463,"stem":464,"description":465},"DlNewsletter","\u002Fdocs\u002Fcomponents\u002Fnewsletter","docs\u002F03.components\u002F23.newsletter","Collect newsletter subscriptions with a styled form",{"title":467,"path":468,"stem":469,"description":470},"DlTypeman","\u002Fdocs\u002Fcomponents\u002Ftypeman","docs\u002F03.components\u002F24.typeman","Animate rotating words with a blinking cursor effect","brick-wall",{"title":473,"path":474,"stem":475,"children":476,"description":6,"label":319,"icon":500},"Utilities","\u002Fdocs\u002Futils","docs\u002F04.utils\u002F01.index",[477,480,484,489,494],{"title":478,"path":474,"stem":475,"description":479,"label":319},"Utilities Introduction","Helpers, composables, macros, and types for extending DocLayer beyond Markdown",{"title":473,"path":481,"stem":482,"description":483},"\u002Fdocs\u002Futils\u002Futilities","docs\u002F04.utils\u002F02.utilities","Auto-imported helper functions for common tasks across DocLayer",{"title":485,"path":486,"stem":487,"description":488},"Composables","\u002Fdocs\u002Futils\u002Fcomposables","docs\u002F04.utils\u002F03.composables","Vue composables for collections, UI resolution, navigation, and content",{"title":490,"path":491,"stem":492,"description":493},"Macros","\u002Fdocs\u002Futils\u002Fmacros","docs\u002F04.utils\u002F04.macros","Compile-time macros for typed app config, adapters, and component UI",{"title":495,"path":496,"stem":497,"description":498,"label":499},"Utility Types","\u002Fdocs\u002Futils\u002Ftypes","docs\u002F04.utils\u002F05.types","TypeScript utilities for safer DocLayer development","Types","tool-case",{"title":502,"path":503,"stem":504,"children":505,"description":6,"label":44,"icon":530},"Adapters","\u002Fdocs\u002Fadapters","docs\u002F05.adapters\u002F01.index",[506,509,514,520,525],{"title":507,"path":503,"stem":504,"description":508,"label":44},"Building Adapters","Build type-safe adapters to plug external services into DocLayer",{"title":510,"path":511,"stem":512,"description":513},"Google","\u002Fdocs\u002Fadapters\u002Fgoogle","docs\u002F05.adapters\u002F10.google","Connect DocLayer to Google products through built-in adapters",{"title":515,"path":516,"stem":517,"description":518,"label":515,"badge":519},"PostHog","\u002Fdocs\u002Fadapters\u002Fposthog","docs\u002F05.adapters\u002F11.posthog","Record product analytics with the PostHog analytics adapter",{"label":404,"glow":301},{"title":521,"path":522,"stem":523,"description":524},"Resend","\u002Fdocs\u002Fadapters\u002Fresend","docs\u002F05.adapters\u002F20.resend","Send newsletter emails with the Resend newsletter adapter",{"title":526,"path":527,"stem":528,"description":529},"Substack","\u002Fdocs\u002Fadapters\u002Fsubstack","docs\u002F05.adapters\u002F21.substack","Subscribe users to Substack via DocLayer’s adapter","circle-fading-plus",{"title":532,"path":533,"stem":534,"children":535,"description":6,"label":319,"icon":553},"Search ✨","\u002Fdocs\u002Fsearch","docs\u002F06.search\u002F01.index",[536,539,544,548],{"title":537,"path":533,"stem":534,"description":538,"label":319},"Search Module Introduction","Brief intro into built-in DocLayer’s Search Module",{"title":540,"path":541,"stem":542,"description":543},"Installation & Usage","\u002Fdocs\u002Fsearch\u002Fusage","docs\u002F06.search\u002F02.usage","Wire DocLayer’s Search Module into your app",{"title":344,"path":545,"stem":546,"description":547},"\u002Fdocs\u002Fsearch\u002Fconfiguration","docs\u002F06.search\u002F03.configuration","Configure static search, indexing, and the AI assistant in DocLayer's Search Module",{"title":549,"path":550,"stem":551,"description":552},"API Reference","\u002Fdocs\u002Fsearch\u002Freference","docs\u002F06.search\u002F04.reference","API reference for DocLayer’s Search Module","scan-search",{"title":555,"path":302,"stem":305,"children":556,"description":6,"icon":563},"Deployment",[557,558],{"title":5,"path":302,"stem":305,"description":298},{"title":559,"path":560,"stem":561,"description":562,"label":20},"Vercel Deployment","\u002Fdocs\u002Fdeployment\u002Fvercel","docs\u002F07.deployment\u002F02.vercel","Deploy DocLayer to Vercel via UI, CLI, or CI","server-crash",{"title":565,"description":6,"icon":566,"path":567,"stem":568,"children":569,"page":363},"Advanced","file-terminal","\u002Fdocs\u002Fadvanced","docs\u002F09.advanced",[570,576,581,586,591,596,601],{"title":571,"path":572,"stem":573,"description":574,"label":575},"DocLayer Monorepo","\u002Fdocs\u002Fadvanced\u002Fmonorepo","docs\u002F09.advanced\u002F02.monorepo","pnpm workspaces, Turborepo, and workflows for the DocLayer monorepo","Monorepo",{"title":577,"path":578,"stem":579,"description":580},"Globals","\u002Fdocs\u002Fadvanced\u002Fglobals","docs\u002F09.advanced\u002F03.globals","DocLayer’s global instances for easy and quick access",{"title":582,"path":583,"stem":584,"description":585},"CLI","\u002Fdocs\u002Fadvanced\u002Fcli","docs\u002F09.advanced\u002F04.cli","Use Command Line Interface to extensively menage your DocLayer project",{"title":587,"path":588,"stem":589,"description":590},"Security","\u002Fdocs\u002Fadvanced\u002Fsecurity","docs\u002F09.advanced\u002F05.security","Security defaults DocLayer ships with Nuxt Security",{"title":592,"path":593,"stem":594,"description":595},"AI Tuning","\u002Fdocs\u002Fadvanced\u002Fai-tuning","docs\u002F09.advanced\u002F06.ai-tuning","Templates and rules for AGENTS.md, coding agents, and content-author AI",{"title":597,"path":598,"stem":599,"description":600},"Error Handling","\u002Fdocs\u002Fadvanced\u002Ferror-handling","docs\u002F09.advanced\u002F07.error-handling","How DocLayer validates and reports errors in authoring, build, and production",{"title":602,"path":603,"stem":604,"description":605},"Troubleshooting","\u002Fdocs\u002Fadvanced\u002Ftroubleshooting","docs\u002F09.advanced\u002F08.troubleshooting","Known DocLayer issues and quick fixes",{"title":607,"description":6,"icon":608,"path":609,"stem":610,"children":611,"page":363},"Project","shield-ellipsis","\u002Fdocs\u002Fproject","docs\u002F10.project",[612,617,622],{"title":613,"path":614,"stem":615,"description":616},"Contribution","\u002Fdocs\u002Fproject\u002Fcontribution","docs\u002F10.project\u002F01.contribution","How to report issues and when contributions are welcome",{"title":618,"path":619,"stem":620,"description":621},"Principles","\u002Fdocs\u002Fproject\u002Fethos","docs\u002F10.project\u002F02.ethos","Who we are, what we care about, and how we treat each other",{"title":623,"path":624,"stem":625,"description":626},"Support","\u002Fdocs\u002Fproject\u002Fsupport","docs\u002F10.project\u002F03.support","Join the Early Supporter Program and help fund DocLayer’s development",{"title":549,"description":6,"icon":628,"path":629,"stem":630,"children":631,"page":363},"file-type","\u002Fdocs\u002Freference","docs\u002F99.reference",[632,637,642],{"title":633,"path":634,"stem":635,"description":636},"App Config","\u002Fdocs\u002Freference\u002Fapp-config","docs\u002F99.reference\u002F01.app-config","API Reference for DocLayer’s AppConfig",{"title":638,"path":639,"stem":640,"description":641},"Module Options","\u002Fdocs\u002Freference\u002Fmodule-options","docs\u002F99.reference\u002F01.module-options","API Reference for DocLayer’s ModuleOptions",{"title":643,"path":644,"stem":645,"description":646},"Content Schema","\u002Fdocs\u002Freference\u002Fcontent-schema","docs\u002F99.reference\u002F02.content-schema","API Reference for DocLayer’s Content Schema",[648,649,651,652],{"title":549,"path":550,"stem":551,"description":552,"children":-1},{"title":555,"path":650,"stem":305,"children":-1,"description":6,"icon":563},"\u002Fdocs\u002Fdeployment\u002F.navigation",{"title":559,"path":560,"stem":561,"description":562,"label":20,"children":-1},{"title":571,"path":572,"stem":573,"description":574,"label":575,"children":-1},1795796072119]