[{"data":1,"prerenderedAt":352},["ShallowReactive",2],{"navigation_docs":3,"-advanced":44,"-advanced-surround":349},[4,9,14,19,24,29,34,39],{"title":5,"path":6,"stem":7,"icon":8},"Introduction","\u002Fintroduction","1.introduction","i-lucide-monitor",{"title":10,"path":11,"stem":12,"icon":13},"Setup","\u002Fsetup","2.setup","i-lucide-play",{"title":15,"path":16,"stem":17,"icon":18},"Git Providers","\u002Fgit-providers","3.git-providers","i-lucide-git-branch",{"title":20,"path":21,"stem":22,"icon":23},"Auth Providers","\u002Fauth-providers","4.auth-providers","i-lucide-shield-check",{"title":25,"path":26,"stem":27,"icon":28},"Content Editors","\u002Fcontent","5.content","i-lucide-pen-tool",{"title":30,"path":31,"stem":32,"icon":33},"Media Library","\u002Fmedias","6.medias","i-lucide-image",{"title":35,"path":36,"stem":37,"icon":38},"AI Features","\u002Fai","7.ai","i-lucide-sparkles",{"title":40,"path":41,"stem":42,"icon":43},"Advanced","\u002Fadvanced","9.advanced","i-lucide-settings",{"id":45,"title":40,"body":46,"description":341,"extension":342,"links":343,"meta":344,"navigation":345,"path":41,"seo":346,"stem":42,"__hash__":348},"docs\u002F9.advanced.md",{"type":47,"value":48,"toc":325},"minimark",[49,53,57,62,65,70,93,119,123,126,133,137,141,154,162,169,172,176,179,182,185,189,193,197,229,233,236,282,286,289],[50,51,52],"p",{},"This page explains how Nuxt Studio keeps your content synchronized between the browser (your production site) and your Git prodiver repository.",[54,55,56],"note",{},"This section is informational. Synchronization happens automatically after setup and requires no manual action.",[58,59,61],"h2",{"id":60},"architecture-overview","Architecture Overview",[50,63,64],{},"The self-hosted Nuxt Studio module uses a three-tier system for storage:",[66,67,69],"h3",{"id":68},"content-parsing-comark","Content Parsing (comark)",[50,71,72,73,83,84,88,89,92],{},"Studio uses ",[74,75,76],"strong",{},[77,78,82],"a",{"href":79,"rel":80},"https:\u002F\u002Fgithub.com\u002Fcomarkdown\u002Fcomark",[81],"nofollow","comark"," as its Markdown parser. At build time and in development, markdown files are parsed by comark into a ",[85,86,87],"code",{},"ComarkTree"," — a compact array-based representation where each node is ",[85,90,91],{},"[tag, attributes, ...children]",". This tree is stored in the SQLite database and used as the interchange format between all Studio editors:",[94,95,96,103,113],"ul",{},[97,98,99,102],"li",{},[74,100,101],{},"Visual editor"," (TipTap) ↔ ComarkTree ↔ stored in SQLite",[97,104,105,108,109,112],{},[74,106,107],{},"Code editor"," ↔ raw Markdown ↔ ",[85,110,111],{},"renderMarkdown(tree)"," from comark regenerates it",[97,114,115,118],{},[74,116,117],{},"Publishing"," ↔ comark renders the ComarkTree back to raw Markdown before committing to Git",[66,120,122],{"id":121},"production-database-sqlite-wasm","Production Database (SQLite WASM)",[50,124,125],{},"When the application loads in the browser, Nuxt Content v3 downloads a SQLite database dump from the server and initializes a local WASM database.",[50,127,128,129,132],{},"This local database contains all content from the ",[85,130,131],{},"content\u002F"," directory of your deployed branch.",[134,135,136],"warning",{},"This browser-side database stays in sync with your Git repository as long as your last deployment was built successfully and your CI\u002FCD pipeline completed without errors.",[66,138,140],{"id":139},"draft-storage-indexeddb","Draft Storage (IndexedDB)",[50,142,143,144,147,148,153],{},"Studio maintains a separate ",[74,145,146],{},"draft layer"," using ",[77,149,152],{"href":150,"rel":151},"https:\u002F\u002Funstorage.unjs.io\u002F",[81],"unstorage",", backed by IndexedDB.",[50,155,156,157,161],{},"When you edit content, your changes are stored as ",[158,159,160],"em",{},"drafts"," in this layer.",[50,163,164,165,168],{},"Each time the Studio app loads, these drafts are merged with the SQLite database to render a ",[158,166,167],{},"drafted"," version of your production site.",[54,170,171],{},"Drafts are stored only in your local browser. They are not shared between editors or devices.",[66,173,175],{"id":174},"git-repository","Git Repository",[50,177,178],{},"When you publish, Studio commits your draft changes directly to your Git repository (GitHub or GitLab) through the provider's API.",[50,180,181],{},"Your CI\u002FCD pipeline then rebuilds and redeploys your site automatically.",[134,183,184],{},"After deployment, you need to wait for your build to complete successfully, then refresh your site to update your browser database with your latest content.",[186,187,188],"tip",{},"The Studio module will automatically notify you when a new deployment is detected.",[58,190,192],{"id":191},"how-synchronization-works","How Synchronization Works",[66,194,196],{"id":195},"initial-load","Initial Load",[198,199,201,206,209,215,219,222,226],"steps",{"level":200},"4",[202,203,205],"h4",{"id":204},"database-initialization","Database Initialization",[50,207,208],{},"Nuxt Content downloads the SQLite database dump generated during the build process.",[50,210,211,212,214],{},"This file contains all parsed content from your ",[85,213,131],{}," directory.",[202,216,218],{"id":217},"draft-recovery","Draft Recovery",[50,220,221],{},"Studio checks IndexedDB for any existing drafts from previous sessions and loads them into the SQLite database.",[202,223,225],{"id":224},"preview","Preview",[50,227,228],{},"Studio refreshes the site preview so you can view your latest drafts and edits directly on your production website.",[66,230,232],{"id":231},"editing-content","Editing Content",[50,234,235],{},"When you modify content in Studio:",[198,237,238,242,257,261,264,268,271,274],{"level":200},[202,239,241],{"id":240},"draft-modification","Draft Modification",[50,243,244,245,248,249,252,253,256],{},"Changes are saved immediately in IndexedDB as draft items with a status of ",[85,246,247],{},"created",", ",[85,250,251],{},"modified",", or ",[85,254,255],{},"deleted",".",[202,258,260],{"id":259},"database-update","Database Update",[50,262,263],{},"The local SQLite database is updated to include your draft content, allowing instant visual preview.",[202,265,267],{"id":266},"conflict-detection","Conflict Detection",[50,269,270],{},"Studio compares your draft content against the latest version in your Git repository to detect possible conflicts.",[50,272,273],{},"Conflicts can occur when:",[94,275,276,279],{},[97,277,278],{},"Someone pushes a commit that modifies the same file and its version is currently building.",[97,280,281],{},"A deployment fails or hasn't completed, leaving the production database out of date and out of sync with your Git repository.",[66,283,285],{"id":284},"publishing-changes","Publishing Changes",[50,287,288],{},"When you publish your edits:",[198,290,291,295,298,302,305,309,312,316,319,322],{"level":200},[202,292,294],{"id":293},"draft-collection","Draft Collection",[50,296,297],{},"Studio gathers all draft items that contain changes.",[202,299,301],{"id":300},"git-commit","Git Commit",[50,303,304],{},"Using your Git provider's API, Studio creates a new commit with all updated files.",[202,306,308],{"id":307},"deployment-trigger","Deployment Trigger",[50,310,311],{},"Your CI\u002FCD platform detects the commit and automatically rebuilds and redeploys your website.",[202,313,315],{"id":314},"deployment-wait","Deployment Wait",[50,317,318],{},"After publication, Studio clears the local drafts and waits for the deployment to complete.",[50,320,321],{},"During this time, a loading state is shown while the production SQLite database catches up with your latest commit.",[134,323,324],{},"Until your commit is deployed, Studio remains in a pending state where the production database is not yet up to date.",{"title":326,"searchDepth":327,"depth":327,"links":328},"",2,[329,336],{"id":60,"depth":327,"text":61,"children":330},[331,333,334,335],{"id":68,"depth":332,"text":69},3,{"id":121,"depth":332,"text":122},{"id":139,"depth":332,"text":140},{"id":174,"depth":332,"text":175},{"id":191,"depth":327,"text":192,"children":337},[338,339,340],{"id":195,"depth":332,"text":196},{"id":231,"depth":332,"text":232},{"id":284,"depth":332,"text":285},"Understand how Nuxt Studio synchronizes content between your production website and your Git provider.","md",null,{},{"title":40,"icon":43},{"title":347,"description":341},"Real time synchronization between Studio and GitHub","DfxLmc-6JzWQbPjNapF4Eaj6fop9Kr5cbde-6mwoltc",[350,343],{"title":35,"path":36,"stem":37,"description":351,"icon":38,"children":-1},"Learn how to enable and use AI-powered features in Nuxt Studio for intelligent content completion, transformation, and style guidance.",1783066515414]