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