[{"data":1,"prerenderedAt":1083},["ShallowReactive",2],{"navigation_docs":3,"-docs-core-getting-started-how-tenon-works":478,"-docs-core-getting-started-how-tenon-works-surround":1078},[4,352,446],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Docs",false,"\u002Fdocs\u002Fcore","docs\u002F1.core",[10,35,141,174,195,212,242,318],{"title":11,"icon":6,"path":12,"stem":13,"children":14,"page":6},"Getting Started","\u002Fdocs\u002Fcore\u002Fgetting-started","docs\u002F1.core\u002F1.getting-started",[15,19,23,27,31],{"title":16,"path":17,"stem":18},"Introduction","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fintroduction","docs\u002F1.core\u002F1.getting-started\u002F1.introduction",{"title":20,"path":21,"stem":22},"Quick Start","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fquick-start","docs\u002F1.core\u002F1.getting-started\u002F2.quick-start",{"title":24,"path":25,"stem":26},"Add to an Existing Site","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site","docs\u002F1.core\u002F1.getting-started\u002F3.existing-site",{"title":28,"path":29,"stem":30},"Configuration","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fconfiguration","docs\u002F1.core\u002F1.getting-started\u002F4.configuration",{"title":32,"path":33,"stem":34},"How Tenon works","\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fhow-tenon-works","docs\u002F1.core\u002F1.getting-started\u002F5.how-tenon-works",{"title":36,"icon":6,"path":37,"stem":38,"children":39,"page":6},"Content Modeling","\u002Fdocs\u002Fcore\u002Fcontent-modeling","docs\u002F1.core\u002F2.content-modeling",[40,44,111,115,119],{"title":41,"path":42,"stem":43},"Collections and Globals","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fcollections-and-globals","docs\u002F1.core\u002F2.content-modeling\u002F1.collections-and-globals",{"title":45,"icon":6,"path":46,"stem":47,"children":48},"Fields","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002Findex",[49,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Array","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Farray","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F01.array",{"title":56,"path":57,"stem":58},"Blocks","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fblocks","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F02.blocks",{"title":60,"path":61,"stem":62},"Boolean","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fboolean","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F03.boolean",{"title":64,"path":65,"stem":66},"Date","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fdate","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F04.date",{"title":68,"path":69,"stem":70},"File","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ffile","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F05.file",{"title":72,"path":73,"stem":74},"Group","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fgroup","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F06.group",{"title":76,"path":77,"stem":78},"Image","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fimage","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F07.image",{"title":80,"path":81,"stem":82},"Link","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Flink","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F08.link",{"title":84,"path":85,"stem":86},"Number","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fnumber","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F09.number",{"title":88,"path":89,"stem":90},"Relation","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frelation","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F10.relation",{"title":92,"path":93,"stem":94},"Rich text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Frich-text","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F11.rich-text",{"title":96,"path":97,"stem":98},"Select","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fselect","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F12.select",{"title":100,"path":101,"stem":102},"Size","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fsize","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F13.size",{"title":104,"path":105,"stem":106},"Slug","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Fslug","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F14.slug",{"title":108,"path":109,"stem":110},"Text","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Ffields\u002Ftext","docs\u002F1.core\u002F2.content-modeling\u002F2.fields\u002F15.text",{"title":112,"path":113,"stem":114},"Relations","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Frelations","docs\u002F1.core\u002F2.content-modeling\u002F3.relations",{"title":116,"path":117,"stem":118},"Media","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fmedia","docs\u002F1.core\u002F2.content-modeling\u002F4.media",{"title":120,"icon":6,"path":121,"stem":122,"children":123},"Presets","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002Findex",[124,125,129,133,137],{"title":50,"path":121,"stem":122},{"title":126,"path":127,"stem":128},"Menu","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fmenu","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F1.menu",{"title":130,"path":131,"stem":132},"Pages","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fpages","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F2.pages",{"title":134,"path":135,"stem":136},"Settings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fsettings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F3.settings",{"title":138,"path":139,"stem":140},"Strings","\u002Fdocs\u002Fcore\u002Fcontent-modeling\u002Fpresets\u002Fstrings","docs\u002F1.core\u002F2.content-modeling\u002F5.presets\u002F4.strings",{"title":142,"icon":6,"path":143,"stem":144,"children":145,"page":6},"Working with Content","\u002Fdocs\u002Fcore\u002Fworking-with-content","docs\u002F1.core\u002F3.working-with-content",[146,150,154,158,162,166,170],{"title":147,"path":148,"stem":149},"Reading","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Freading","docs\u002F1.core\u002F3.working-with-content\u002F1.reading",{"title":151,"path":152,"stem":153},"Writing and Drafts","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fwriting","docs\u002F1.core\u002F3.working-with-content\u002F2.writing",{"title":155,"path":156,"stem":157},"Scheduled publishing","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fscheduled-publishing","docs\u002F1.core\u002F3.working-with-content\u002F3.scheduled-publishing",{"title":159,"path":160,"stem":161},"HTTP API and Client","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhttp-api-and-client","docs\u002F1.core\u002F3.working-with-content\u002F4.http-api-and-client",{"title":163,"path":164,"stem":165},"Headless","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fheadless","docs\u002F1.core\u002F3.working-with-content\u002F5.headless",{"title":167,"path":168,"stem":169},"Localization","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization","docs\u002F1.core\u002F3.working-with-content\u002F6.localization",{"title":171,"path":172,"stem":173},"Hooks","\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Fhooks","docs\u002F1.core\u002F3.working-with-content\u002F7.hooks",{"title":175,"icon":6,"path":176,"stem":177,"children":178,"page":6},"Building Your Site","\u002Fdocs\u002Fcore\u002Fbuilding-your-site","docs\u002F1.core\u002F4.building-your-site",[179,183,187,191],{"title":180,"path":181,"stem":182},"Pages and SEO","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo","docs\u002F1.core\u002F4.building-your-site\u002F1.pages-and-seo",{"title":184,"path":185,"stem":186},"Components","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fcomponents","docs\u002F1.core\u002F4.building-your-site\u002F2.components",{"title":188,"path":189,"stem":190},"Menus","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fmenus","docs\u002F1.core\u002F4.building-your-site\u002F3.menus",{"title":192,"path":193,"stem":194},"Live Preview","\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Flive-preview","docs\u002F1.core\u002F4.building-your-site\u002F4.live-preview",{"title":196,"icon":6,"path":197,"stem":198,"children":199,"page":6},"Users and Access","\u002Fdocs\u002Fcore\u002Fusers-and-access","docs\u002F1.core\u002F5.users-and-access",[200,204,208],{"title":201,"path":202,"stem":203},"Authentication","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fauthentication","docs\u002F1.core\u002F5.users-and-access\u002F1.authentication",{"title":205,"path":206,"stem":207},"Access Control","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Faccess-control","docs\u002F1.core\u002F5.users-and-access\u002F2.access-control",{"title":209,"path":210,"stem":211},"API Keys","\u002Fdocs\u002Fcore\u002Fusers-and-access\u002Fapi-keys","docs\u002F1.core\u002F5.users-and-access\u002F3.api-keys",{"title":213,"icon":6,"path":214,"stem":215,"children":216},"Customization","\u002Fdocs\u002Fcore\u002Fcustomization","docs\u002F1.core\u002F6.customization\u002Findex",[217,218,222,226,230,234,238],{"title":50,"path":214,"stem":215},{"title":219,"path":220,"stem":221},"Admin","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin","docs\u002F1.core\u002F6.customization\u002F1.admin",{"title":223,"path":224,"stem":225},"Custom Fields","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-fields","docs\u002F1.core\u002F6.customization\u002F2.custom-fields",{"title":227,"path":228,"stem":229},"Custom Pages and Actions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fcustom-pages-and-actions","docs\u002F1.core\u002F6.customization\u002F3.custom-pages-and-actions",{"title":231,"path":232,"stem":233},"Styles and UI Libraries","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fstyles-and-ui-libraries","docs\u002F1.core\u002F6.customization\u002F4.styles-and-ui-libraries",{"title":235,"path":236,"stem":237},"Rich Text Extensions","\u002Fdocs\u002Fcore\u002Fcustomization\u002Frich-text-extensions","docs\u002F1.core\u002F6.customization\u002F5.rich-text-extensions",{"title":239,"path":240,"stem":241},"Plugins","\u002Fdocs\u002Fcore\u002Fcustomization\u002Fplugins","docs\u002F1.core\u002F6.customization\u002F6.plugins",{"title":243,"icon":6,"path":244,"stem":245,"children":246},"Operations","\u002Fdocs\u002Fcore\u002Foperations","docs\u002F1.core\u002F7.operations\u002Findex",[247,248,266,288,306,310,314],{"title":50,"path":244,"stem":245},{"title":249,"icon":6,"path":250,"stem":251,"children":252},"Email","\u002Fdocs\u002Fcore\u002Foperations\u002Femail","docs\u002F1.core\u002F7.operations\u002F1.email\u002Findex",[253,254,258,262],{"title":50,"path":250,"stem":251},{"title":255,"path":256,"stem":257},"SMTP","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fsmtp","docs\u002F1.core\u002F7.operations\u002F1.email\u002F1.smtp",{"title":259,"path":260,"stem":261},"Cloudflare","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcloudflare","docs\u002F1.core\u002F7.operations\u002F1.email\u002F2.cloudflare",{"title":263,"path":264,"stem":265},"Custom adapter","\u002Fdocs\u002Fcore\u002Foperations\u002Femail\u002Fcustom-adapter","docs\u002F1.core\u002F7.operations\u002F1.email\u002F3.custom-adapter",{"title":267,"icon":6,"path":268,"stem":269,"children":270},"Jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002Findex",[271,272,276,280,284],{"title":50,"path":268,"stem":269},{"title":273,"path":274,"stem":275},"Queue jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fqueue-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F1.queue-jobs",{"title":277,"path":278,"stem":279},"Recurring jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Frecurring-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F2.recurring-jobs",{"title":281,"path":282,"stem":283},"The clock","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fclock","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F3.clock",{"title":285,"path":286,"stem":287},"Manage jobs","\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fmanage-jobs","docs\u002F1.core\u002F7.operations\u002F2.jobs\u002F4.manage-jobs",{"title":289,"icon":6,"path":290,"stem":291,"children":292},"Webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002Findex",[293,294,298,302],{"title":50,"path":290,"stem":291},{"title":295,"path":296,"stem":297},"Send webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Fsend-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F1.send-webhooks",{"title":299,"path":300,"stem":301},"Receive webhooks","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Freceive-webhooks","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F2.receive-webhooks",{"title":303,"path":304,"stem":305},"Rebuild on publish","\u002Fdocs\u002Fcore\u002Foperations\u002Fwebhooks\u002Frebuild-on-publish","docs\u002F1.core\u002F7.operations\u002F3.webhooks\u002F3.rebuild-on-publish",{"title":307,"path":308,"stem":309},"Backup and Restore","\u002Fdocs\u002Fcore\u002Foperations\u002Fbackup-and-restore","docs\u002F1.core\u002F7.operations\u002F4.backup-and-restore",{"title":311,"path":312,"stem":313},"Lifecycle Hooks","\u002Fdocs\u002Fcore\u002Foperations\u002Flifecycle-hooks","docs\u002F1.core\u002F7.operations\u002F5.lifecycle-hooks",{"title":315,"path":316,"stem":317},"Upgrades and Schema Changes","\u002Fdocs\u002Fcore\u002Foperations\u002Fupgrades-and-schema-changes","docs\u002F1.core\u002F7.operations\u002F6.upgrades-and-schema-changes",{"title":319,"icon":6,"path":320,"stem":321,"children":322,"page":6},"Reference","\u002Fdocs\u002Fcore\u002Freference","docs\u002F1.core\u002F8.reference",[323,326,344,348],{"title":28,"path":324,"stem":325},"\u002Fdocs\u002Fcore\u002Freference\u002Fconfiguration","docs\u002F1.core\u002F8.reference\u002F1.configuration",{"title":327,"icon":6,"path":328,"stem":329,"children":330},"API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi","docs\u002F1.core\u002F8.reference\u002F2.api\u002Findex",[331,332,336,340],{"title":50,"path":328,"stem":329},{"title":333,"path":334,"stem":335},"Local API","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Flocal-api","docs\u002F1.core\u002F8.reference\u002F2.api\u002F1.local-api",{"title":337,"path":338,"stem":339},"Client","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fclient","docs\u002F1.core\u002F8.reference\u002F2.api\u002F2.client",{"title":341,"path":342,"stem":343},"HTTP routes","\u002Fdocs\u002Fcore\u002Freference\u002Fapi\u002Fhttp-routes","docs\u002F1.core\u002F8.reference\u002F2.api\u002F3.http-routes",{"title":345,"path":346,"stem":347},"Errors and types","\u002Fdocs\u002Fcore\u002Freference\u002Ferrors-and-types","docs\u002F1.core\u002F8.reference\u002F3.errors-and-types",{"title":349,"path":350,"stem":351},"Package exports","\u002Fdocs\u002Fcore\u002Freference\u002Fpackage-exports","docs\u002F1.core\u002F8.reference\u002F4.package-exports",{"title":353,"icon":6,"path":354,"stem":355,"children":356,"page":6},"Guide","\u002Fdocs\u002Fguide","docs\u002F2.guide",[357,383,400,417],{"title":358,"icon":6,"path":359,"stem":360,"children":361},"Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks","docs\u002F2.guide\u002F1.frameworks\u002Findex",[362,363,367,371,375,379],{"title":50,"path":359,"stem":360},{"title":364,"path":365,"stem":366},"Astro","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fastro","docs\u002F2.guide\u002F1.frameworks\u002F1.astro",{"title":368,"path":369,"stem":370},"Nuxt","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fnuxt","docs\u002F2.guide\u002F1.frameworks\u002F2.nuxt",{"title":372,"path":373,"stem":374},"TanStack Start","\u002Fdocs\u002Fguide\u002Fframeworks\u002Ftanstack-start","docs\u002F2.guide\u002F1.frameworks\u002F3.tanstack-start",{"title":376,"path":377,"stem":378},"Standalone","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fstandalone","docs\u002F2.guide\u002F1.frameworks\u002F4.standalone",{"title":380,"path":381,"stem":382},"Other Frameworks","\u002Fdocs\u002Fguide\u002Fframeworks\u002Fother-frameworks","docs\u002F2.guide\u002F1.frameworks\u002F5.other-frameworks",{"title":384,"icon":6,"path":385,"stem":386,"children":387},"Deployment","\u002Fdocs\u002Fguide\u002Fdeployment","docs\u002F2.guide\u002F2.deployment\u002Findex",[388,389,393,397],{"title":50,"path":385,"stem":386},{"title":390,"path":391,"stem":392},"Node","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fnode","docs\u002F2.guide\u002F2.deployment\u002F1.node",{"title":394,"path":395,"stem":396},"Vercel","\u002Fdocs\u002Fguide\u002Fdeployment\u002Fvercel","docs\u002F2.guide\u002F2.deployment\u002F2.vercel",{"title":259,"path":398,"stem":399},"\u002Fdocs\u002Fguide\u002Fdeployment\u002Fcloudflare","docs\u002F2.guide\u002F2.deployment\u002F3.cloudflare",{"title":401,"icon":6,"path":402,"stem":403,"children":404,"page":6},"Databases and Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage","docs\u002F2.guide\u002F3.databases-and-storage",[405,409,413],{"title":406,"path":407,"stem":408},"Databases","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fdatabases","docs\u002F2.guide\u002F3.databases-and-storage\u002F1.databases",{"title":410,"path":411,"stem":412},"Media Storage","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fmedia-storage","docs\u002F2.guide\u002F3.databases-and-storage\u002F2.media-storage",{"title":414,"path":415,"stem":416},"Image Providers","\u002Fdocs\u002Fguide\u002Fdatabases-and-storage\u002Fimage-providers","docs\u002F2.guide\u002F3.databases-and-storage\u002F3.image-providers",{"title":418,"icon":6,"path":419,"stem":420,"children":421,"page":6},"Recipes","\u002Fdocs\u002Fguide\u002Frecipes","docs\u002F2.guide\u002F4.recipes",[422,426,430,434,438,442],{"title":423,"path":424,"stem":425},"Seed Content","\u002Fdocs\u002Fguide\u002Frecipes\u002Fseed-content","docs\u002F2.guide\u002F4.recipes\u002F1.seed-content",{"title":427,"path":428,"stem":429},"Tracking and Consent","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftracking-and-consent","docs\u002F2.guide\u002F4.recipes\u002F2.tracking-and-consent",{"title":431,"path":432,"stem":433},"Build a Custom Field","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-custom-field","docs\u002F2.guide\u002F4.recipes\u002F3.build-a-custom-field",{"title":435,"path":436,"stem":437},"Write a Plugin","\u002Fdocs\u002Fguide\u002Frecipes\u002Fwrite-a-plugin","docs\u002F2.guide\u002F4.recipes\u002F4.write-a-plugin",{"title":439,"path":440,"stem":441},"Build a Headless Site with Next.js","\u002Fdocs\u002Fguide\u002Frecipes\u002Fbuild-a-headless-site-with-nextjs","docs\u002F2.guide\u002F4.recipes\u002F5.build-a-headless-site-with-nextjs",{"title":443,"path":444,"stem":445},"Troubleshooting","\u002Fdocs\u002Fguide\u002Frecipes\u002Ftroubleshooting","docs\u002F2.guide\u002F4.recipes\u002F6.troubleshooting",{"title":447,"icon":6,"path":448,"stem":449,"children":450,"page":6},"CLI","\u002Fdocs\u002Fcli","docs\u002F3.cli",[451,454,458,462,466,470,474],{"title":50,"path":452,"stem":453},"\u002Fdocs\u002Fcli\u002Foverview","docs\u002F3.cli\u002F1.overview",{"title":455,"path":456,"stem":457},"create-tenoncms","\u002Fdocs\u002Fcli\u002Fcreate-tenoncms","docs\u002F3.cli\u002F2.create-tenoncms",{"title":459,"path":460,"stem":461},"tenon backup","\u002Fdocs\u002Fcli\u002Fbackup","docs\u002F3.cli\u002F3.backup",{"title":463,"path":464,"stem":465},"tenon users","\u002Fdocs\u002Fcli\u002Fusers","docs\u002F3.cli\u002F4.users",{"title":467,"path":468,"stem":469},"tenon media","\u002Fdocs\u002Fcli\u002Fmedia","docs\u002F3.cli\u002F5.media",{"title":471,"path":472,"stem":473},"tenon upgrade","\u002Fdocs\u002Fcli\u002Fupgrade","docs\u002F3.cli\u002F6.upgrade",{"title":475,"path":476,"stem":477},"tenon login","\u002Fdocs\u002Fcli\u002Flogin","docs\u002F3.cli\u002F7.login",{"id":479,"title":32,"body":480,"description":1072,"extension":1073,"links":1074,"meta":1075,"navigation":726,"path":33,"seo":1076,"stem":34,"__hash__":1077},"docs\u002Fdocs\u002F1.core\u002F1.getting-started\u002F5.how-tenon-works.md",{"type":481,"value":482,"toc":1061},"minimark",[483,487,495,500,516,534,537,540,559,563,573,576,594,603,607,618,623,628,635,655,859,863,872,878,904,913,921,925,941,945,1009,1017,1021,1057],[484,485,486],"p",{},"This page explains how Tenon runs inside your app. Read it when you want to know what the integration does for you, or when you set up a framework without one.",[484,488,489,490,494],{},"Tenon is one object in your app: the CMS instance that ",[491,492,493],"code",{},"tenon.config.ts"," exports. Your server code, the HTTP API and the admin all talk to this instance. There is no second service, and Tenon has no server or build step of its own.",[496,497,499],"h2",{"id":498},"local-api-and-http-api","Local API and HTTP API",[484,501,502,503,507,508,511,512,515],{},"The ",[504,505,506],"strong",{},"local API"," is the set of methods on the instance, like ",[491,509,510],{},"cms.find()"," and ",[491,513,514],{},"cms.create()",". Your server code calls them directly, with no HTTP and full types.",[484,517,502,518,521,522,525,526,529,530,533],{},[504,519,520],{},"HTTP API"," is ",[491,523,524],{},"cms.fetch(request)",". It takes a web ",[491,527,528],{},"Request"," and returns a ",[491,531,532],{},"Response",", so any server that speaks web standards can run it. The admin and the browser client use it.",[484,535,536],{},"Both ways end in the same local API. Validation, access rules, hooks and transactions live there, so a write behaves the same from your code, the HTTP API and the admin. The HTTP API is only a thin layer that reads the request and the session.",[484,538,539],{},"There is one difference: who is asking.",[541,542,543,547],"ul",{},[544,545,546],"li",{},"The instance you import skips the access rules. Your server code is trusted.",[544,548,549,550,553,554,558],{},"The HTTP API applies them, for the user of the request. To do the same in server code, use ",[491,551,552],{},"cms.withSession(request)",". See ",[555,556,557],"a",{"href":206},"Access control",".",[496,560,562],{"id":561},"what-happens-at-startup","What happens at startup",[484,564,565,566,568,569,572],{},"Nothing connects when your app imports ",[491,567,493],{},". ",[491,570,571],{},"defineCms()"," only checks the config. If something is missing or invalid, it throws one error that lists every problem, so a bad deploy fails at startup instead of on the first request.",[484,574,575],{},"The first query to the database runs these steps once:",[577,578,579,582,589],"ol",{},[544,580,581],{},"Connect to the database and run the migrations. Tenon creates and updates its own tables.",[544,583,584,585,588],{},"Run ",[491,586,587],{},"seed",", once per database.",[544,590,584,591,558],{},[491,592,593],{},"onInit",[484,595,596,597,599,600,558],{},"Every query waits until these steps are done. If one fails, the next query tries again. Serverless hosts start often, so keep ",[491,598,593],{}," fast. See ",[555,601,602],{"href":312},"Lifecycle hooks",[496,604,606],{"id":605},"how-vite-fits-in","How Vite fits in",[484,608,609,610,613,614,617],{},"Your app's Vite build does the work Tenon needs. The Astro integration and the Nuxt module do it for you. Other Vite frameworks, like TanStack Start, add ",[491,611,612],{},"tenonAdmin()"," from ",[491,615,616],{},"tenoncms\u002Fvite"," and a few route files.",[619,620,622],"h3",{"id":621},"the-server-side","The server side",[484,624,625,627],{},[491,626,493],{}," is a normal module of your app. Nothing loads it in a special way: a server route imports it, and Vite compiles it into the server build like any other file. In development, a change to it reloads without a restart.",[484,629,630,631,634],{},"A server route only passes the request to ",[491,632,633],{},"cms.fetch()",":",[541,636,637,649],{},[544,638,639,642,643,646,647,558],{},[504,640,641],{},"Astro and Nuxt"," add these server routes for you. Their route files import your config through the alias ",[491,644,645],{},"#tenon\u002Fconfig",", which points to ",[491,648,493],{},[544,650,651,654],{},[504,652,653],{},"TanStack Start and other Vite frameworks"," have no integration that adds routes. You write each route file yourself, and it imports the config directly:",[656,657,663],"pre",{"className":658,"code":659,"filename":660,"language":661,"meta":662,"style":662},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createFileRoute } from \"@tanstack\u002Freact-router\";\nimport cms from \"..\u002F..\u002Ftenon.config\";\n\nconst handle = ({ request }: { request: Request }) => cms.fetch(request);\n\nexport const Route = createFileRoute(\"\u002F_tenon\u002F$\")({\n  server: { handlers: { ANY: handle } },\n});\n","src\u002Froutes\u002F[_]tenon.$.ts","ts","",[491,664,665,701,721,728,782,787,819,849],{"__ignoreMap":662},[666,667,670,674,678,682,685,688,691,695,698],"span",{"class":668,"line":669},"line",1,[666,671,673],{"class":672},"s7zQu","import",[666,675,677],{"class":676},"sMK4o"," {",[666,679,681],{"class":680},"sTEyZ"," createFileRoute",[666,683,684],{"class":676}," }",[666,686,687],{"class":672}," from",[666,689,690],{"class":676}," \"",[666,692,694],{"class":693},"sfazB","@tanstack\u002Freact-router",[666,696,697],{"class":676},"\"",[666,699,700],{"class":676},";\n",[666,702,704,706,709,712,714,717,719],{"class":668,"line":703},2,[666,705,673],{"class":672},[666,707,708],{"class":680}," cms ",[666,710,711],{"class":672},"from",[666,713,690],{"class":676},[666,715,716],{"class":693},"..\u002F..\u002Ftenon.config",[666,718,697],{"class":676},[666,720,700],{"class":676},[666,722,724],{"class":668,"line":723},3,[666,725,727],{"emptyLinePlaceholder":726},true,"\n",[666,729,731,735,738,741,744,748,751,753,756,758,762,765,768,771,773,777,780],{"class":668,"line":730},4,[666,732,734],{"class":733},"spNyl","const",[666,736,737],{"class":680}," handle ",[666,739,740],{"class":676},"=",[666,742,743],{"class":676}," ({",[666,745,747],{"class":746},"sHdIc"," request",[666,749,750],{"class":676}," }:",[666,752,677],{"class":676},[666,754,747],{"class":755},"swJcz",[666,757,634],{"class":676},[666,759,761],{"class":760},"sBMFI"," Request",[666,763,764],{"class":676}," })",[666,766,767],{"class":733}," =>",[666,769,770],{"class":680}," cms",[666,772,558],{"class":676},[666,774,776],{"class":775},"s2Zo4","fetch",[666,778,779],{"class":680},"(request)",[666,781,700],{"class":676},[666,783,785],{"class":668,"line":784},5,[666,786,727],{"emptyLinePlaceholder":726},[666,788,790,793,796,799,801,803,806,808,811,813,816],{"class":668,"line":789},6,[666,791,792],{"class":672},"export",[666,794,795],{"class":733}," const",[666,797,798],{"class":680}," Route ",[666,800,740],{"class":676},[666,802,681],{"class":775},[666,804,805],{"class":680},"(",[666,807,697],{"class":676},[666,809,810],{"class":693},"\u002F_tenon\u002F$",[666,812,697],{"class":676},[666,814,815],{"class":680},")(",[666,817,818],{"class":676},"{\n",[666,820,822,825,827,829,832,834,836,839,841,843,846],{"class":668,"line":821},7,[666,823,824],{"class":755},"  server",[666,826,634],{"class":676},[666,828,677],{"class":676},[666,830,831],{"class":755}," handlers",[666,833,634],{"class":676},[666,835,677],{"class":676},[666,837,838],{"class":755}," ANY",[666,840,634],{"class":676},[666,842,737],{"class":680},[666,844,845],{"class":676},"}",[666,847,848],{"class":676}," },\n",[666,850,852,854,857],{"class":668,"line":851},8,[666,853,845],{"class":676},[666,855,856],{"class":680},")",[666,858,700],{"class":676},[619,860,862],{"id":861},"the-admin","The admin",[484,864,865,866,868,869,558],{},"The admin needs more than a route. It is browser code, and so are your custom fields, admin pages and admin bar buttons. That is the part a Vite plugin does. Astro and Nuxt include it. On other Vite frameworks, add ",[491,867,612],{}," to ",[491,870,871],{},"vite.config.ts",[484,873,874,875,877],{},"The plugin reads ",[491,876,493],{}," as source text. It never runs it, because the config holds server code like the database and the secret. From the source it takes:",[541,879,880,888],{},[544,881,882,887],{},[504,883,884],{},[491,885,886],{},"admin.path",": the path the admin page is built for.",[544,889,890,896,897,900,901,903],{},[504,891,892,893],{},"Every ",[491,894,895],{},"clientRef()",": the browser code you point to, like ",[491,898,899],{},"clientRef(\".\u002Fsrc\u002Fadmin\u002Fcolor.ts#mountColor\")",". The plugin bundles it with hot reload. That is why a ",[491,902,895],{}," MUST be a literal string.",[484,905,906,907,910,911,558],{},"It then builds the admin as a second entry of your app's client build. The admin ships with your site, so there is nothing extra to deploy. On TanStack Start, a route file serves the page from ",[491,908,909],{},"#tenon\u002Fadmin-html",". Its path MUST match ",[491,912,886],{},[484,914,915,916,918,919,558],{},"With Nitro, ",[491,917,612],{}," also runs the due jobs every minute. See ",[555,920,281],{"href":282},[619,922,924],{"id":923},"the-cli","The CLI",[484,926,502,927,930,931,933,934,937,938,558],{},[491,928,929],{},"tenon"," CLI loads ",[491,932,493],{}," through Vite too. So ",[491,935,936],{},"astro:env"," and Nuxt's runtime config work there as well. See ",[555,939,940],{"href":452},"the CLI",[496,942,944],{"id":943},"comparison-of-the-setups","Comparison of the setups",[946,947,948,963],"table",{},[949,950,951],"thead",{},[952,953,954,958,961],"tr",{},[955,956,957],"th",{},"Setup",[955,959,960],{},"Server routes",[955,962,219],{},[964,965,966,976,985,998],"tbody",{},[952,967,968,971,974],{},[969,970,364],"td",{},[969,972,973],{},"Added by the integration",[969,975,973],{},[952,977,978,980,983],{},[969,979,368],{},[969,981,982],{},"Added by the module",[969,984,982],{},[952,986,987,990,993],{},[969,988,989],{},"TanStack Start, other Vite",[969,991,992],{},"Route files you write",[969,994,995,997],{},[491,996,612],{}," and a route file you write",[952,999,1000,1003,1006],{},[969,1001,1002],{},"No Vite",[969,1004,1005],{},"Routes you write",[969,1007,1008],{},"You mount it yourself",[484,1010,1011,1012,1014,1015,558],{},"Astro, Nuxt and ",[491,1013,612],{}," with Nitro also run the due jobs every minute. Otherwise, you run them yourself. See ",[555,1016,281],{"href":282},[496,1018,1020],{"id":1019},"related-resources","Related resources",[541,1022,1023,1028,1034,1040,1046,1051],{},[544,1024,1025,1027],{},[555,1026,28],{"href":29},": the config file, environment variables and the routes Tenon adds.",[544,1029,1030,1033],{},[555,1031,1032],{"href":25},"Add to an existing site",": the setup for each framework.",[544,1035,1036,1039],{},[555,1037,1038],{"href":148},"Reading content",": the local API.",[544,1041,1042,1045],{},[555,1043,1044],{"href":160},"HTTP API and client",": the HTTP API.",[544,1047,1048,1050],{},[555,1049,163],{"href":164},": Tenon without a site, or with a frontend on another origin.",[544,1052,1053,1056],{},[555,1054,1055],{"href":381},"Other frameworks",": running Tenon without an integration.",[1058,1059,1060],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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":662,"searchDepth":703,"depth":703,"links":1062},[1063,1064,1065,1070,1071],{"id":498,"depth":703,"text":499},{"id":561,"depth":703,"text":562},{"id":605,"depth":703,"text":606,"children":1066},[1067,1068,1069],{"id":621,"depth":723,"text":622},{"id":861,"depth":723,"text":862},{"id":923,"depth":723,"text":924},{"id":943,"depth":703,"text":944},{"id":1019,"depth":703,"text":1020},"What happens under the hood. One CMS instance in your app, the ways your code and the admin reach it, what runs at startup, and how Vite fits in.","md",null,{},{"title":32,"description":1072},"RTpvuqk8s_vGJD3hBv3Bb-iYDdrTBlQwuhEfyikIYB0",[1079,1081],{"title":28,"path":29,"stem":30,"description":1080,"children":-1},"What tenon.config.ts is, the smallest config, the environment variables, how Vite fits in and the routes Tenon adds.",{"title":41,"path":42,"stem":43,"description":1082,"children":-1},"Describe content in TypeScript and get typed documents back.",1795884657726]