[{"data":1,"prerenderedAt":2977},["ShallowReactive",2],{"navigation_docs":3,"-docs-guide-frameworks-tanstack-start":478,"-docs-guide-frameworks-tanstack-start-surround":2972},[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":372,"body":480,"description":2966,"extension":2967,"links":2968,"meta":2969,"navigation":878,"path":373,"seo":2970,"stem":374,"__hash__":2971},"docs\u002Fdocs\u002F2.guide\u002F1.frameworks\u002F3.tanstack-start.md",{"type":481,"value":482,"toc":2948},"minimark",[483,492,497,504,576,606,610,616,1980,1984,1987,2448,2466,2470,2495,2498,2768,2777,2787,2793,2820,2863,2880,2884,2901,2905,2944],[484,485,486,487,491],"p",{},"TanStack Start needs no module. ",[488,489,490],"code",{},"tenonAdmin()"," in the Vite config builds the admin, and four route files hand requests to the CMS. Server functions read content.",[493,494,496],"h2",{"id":495},"create-a-project","Create a project",[484,498,499,500,503],{},"Run the wizard and pick ",[501,502,372],"strong",{},":",[505,506,508,533,548,562],"code-group",{"sync":507},"pm",[509,510,516],"pre",{"className":511,"code":512,"filename":513,"language":514,"meta":515,"style":515},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm create tenoncms@latest\n","npm","bash","",[488,517,518],{"__ignoreMap":515},[519,520,523,526,530],"span",{"class":521,"line":522},"line",1,[519,524,513],{"class":525},"sBMFI",[519,527,529],{"class":528},"sfazB"," create",[519,531,532],{"class":528}," tenoncms@latest\n",[509,534,537],{"className":511,"code":535,"filename":536,"language":514,"meta":515,"style":515},"pnpm create tenoncms\n","pnpm",[488,538,539],{"__ignoreMap":515},[519,540,541,543,545],{"class":521,"line":522},[519,542,536],{"class":525},[519,544,529],{"class":528},[519,546,547],{"class":528}," tenoncms\n",[509,549,552],{"className":511,"code":550,"filename":551,"language":514,"meta":515,"style":515},"yarn create tenoncms\n","yarn",[488,553,554],{"__ignoreMap":515},[519,555,556,558,560],{"class":521,"line":522},[519,557,551],{"class":525},[519,559,529],{"class":528},[519,561,547],{"class":528},[509,563,566],{"className":511,"code":564,"filename":565,"language":514,"meta":515,"style":515},"bun create tenoncms\n","bun",[488,567,568],{"__ignoreMap":515},[519,569,570,572,574],{"class":521,"line":522},[519,571,565],{"class":525},[519,573,529],{"class":528},[519,575,547],{"class":528},[484,577,578,579,582,583,585,586,589,590,593,594,597,598,601,602,605],{},"The starter has ",[488,580,581],{},"vite.config.ts"," with ",[488,584,490],{},", ",[488,587,588],{},"tenon.config.ts",", a ",[488,591,592],{},"posts"," collection, the API and admin routes, and two pages. Start it with ",[488,595,596],{},"npm run dev",", open the URL it prints and add ",[488,599,600],{},"\u002Fadmin",". See ",[603,604,455],"a",{"href":456}," for every question and flag.",[493,607,609],{"id":608},"add-to-an-existing-project","Add to an existing project",[484,611,612,613,615],{},"This setup uses a SQLite file. For the other databases, see ",[603,614,406],{"href":407},".",[617,618,620,625,628,737,741,746,951,955,962,1535,1545,1549,1564,1677,1691,1695,1701,1910,1920,1924,1934,1955,1968,1972],"steps",{"level":619},"3",[621,622,624],"h3",{"id":623},"install-the-packages","Install the packages",[484,626,627],{},"Tenon needs a server build, so add Nitro too:",[505,629,630,661,687,712],{"sync":507},[509,631,633],{"className":511,"code":632,"filename":513,"language":514,"meta":515,"style":515},"npm install tenoncms @libsql\u002Fclient\nnpm install -D nitro\n",[488,634,635,648],{"__ignoreMap":515},[519,636,637,639,642,645],{"class":521,"line":522},[519,638,513],{"class":525},[519,640,641],{"class":528}," install",[519,643,644],{"class":528}," tenoncms",[519,646,647],{"class":528}," @libsql\u002Fclient\n",[519,649,651,653,655,658],{"class":521,"line":650},2,[519,652,513],{"class":525},[519,654,641],{"class":528},[519,656,657],{"class":528}," -D",[519,659,660],{"class":528}," nitro\n",[509,662,664],{"className":511,"code":663,"filename":536,"language":514,"meta":515,"style":515},"pnpm add tenoncms @libsql\u002Fclient\npnpm add -D nitro\n",[488,665,666,677],{"__ignoreMap":515},[519,667,668,670,673,675],{"class":521,"line":522},[519,669,536],{"class":525},[519,671,672],{"class":528}," add",[519,674,644],{"class":528},[519,676,647],{"class":528},[519,678,679,681,683,685],{"class":521,"line":650},[519,680,536],{"class":525},[519,682,672],{"class":528},[519,684,657],{"class":528},[519,686,660],{"class":528},[509,688,690],{"className":511,"code":689,"filename":551,"language":514,"meta":515,"style":515},"yarn add tenoncms @libsql\u002Fclient\nyarn add -D nitro\n",[488,691,692,702],{"__ignoreMap":515},[519,693,694,696,698,700],{"class":521,"line":522},[519,695,551],{"class":525},[519,697,672],{"class":528},[519,699,644],{"class":528},[519,701,647],{"class":528},[519,703,704,706,708,710],{"class":521,"line":650},[519,705,551],{"class":525},[519,707,672],{"class":528},[519,709,657],{"class":528},[519,711,660],{"class":528},[509,713,715],{"className":511,"code":714,"filename":565,"language":514,"meta":515,"style":515},"bun add tenoncms @libsql\u002Fclient\nbun add -D nitro\n",[488,716,717,727],{"__ignoreMap":515},[519,718,719,721,723,725],{"class":521,"line":522},[519,720,565],{"class":525},[519,722,672],{"class":528},[519,724,644],{"class":528},[519,726,647],{"class":528},[519,728,729,731,733,735],{"class":521,"line":650},[519,730,565],{"class":525},[519,732,672],{"class":528},[519,734,657],{"class":528},[519,736,660],{"class":528},[621,738,740],{"id":739},"add-the-vite-plugin","Add the Vite plugin",[484,742,743,745],{},[488,744,490],{}," builds the admin and runs the job clock:",[509,747,751],{"className":748,"code":749,"filename":581,"language":750,"meta":515,"style":515},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { tanstackStart } from \"@tanstack\u002Freact-start\u002Fplugin\u002Fvite\";\nimport viteReact from \"@vitejs\u002Fplugin-react\";\nimport { nitro } from \"nitro\u002Fvite\";\nimport { tenonAdmin } from \"tenoncms\u002Fvite\";\nimport { defineConfig } from \"vite\";\n\nexport default defineConfig({\n  plugins: [tanstackStart(), nitro(), viteReact(), tenonAdmin()],\n});\n","ts",[488,752,753,785,804,827,850,873,880,898,940],{"__ignoreMap":515},[519,754,755,759,763,767,770,773,776,779,782],{"class":521,"line":522},[519,756,758],{"class":757},"s7zQu","import",[519,760,762],{"class":761},"sMK4o"," {",[519,764,766],{"class":765},"sTEyZ"," tanstackStart",[519,768,769],{"class":761}," }",[519,771,772],{"class":757}," from",[519,774,775],{"class":761}," \"",[519,777,778],{"class":528},"@tanstack\u002Freact-start\u002Fplugin\u002Fvite",[519,780,781],{"class":761},"\"",[519,783,784],{"class":761},";\n",[519,786,787,789,792,795,797,800,802],{"class":521,"line":650},[519,788,758],{"class":757},[519,790,791],{"class":765}," viteReact ",[519,793,794],{"class":757},"from",[519,796,775],{"class":761},[519,798,799],{"class":528},"@vitejs\u002Fplugin-react",[519,801,781],{"class":761},[519,803,784],{"class":761},[519,805,807,809,811,814,816,818,820,823,825],{"class":521,"line":806},3,[519,808,758],{"class":757},[519,810,762],{"class":761},[519,812,813],{"class":765}," nitro",[519,815,769],{"class":761},[519,817,772],{"class":757},[519,819,775],{"class":761},[519,821,822],{"class":528},"nitro\u002Fvite",[519,824,781],{"class":761},[519,826,784],{"class":761},[519,828,830,832,834,837,839,841,843,846,848],{"class":521,"line":829},4,[519,831,758],{"class":757},[519,833,762],{"class":761},[519,835,836],{"class":765}," tenonAdmin",[519,838,769],{"class":761},[519,840,772],{"class":757},[519,842,775],{"class":761},[519,844,845],{"class":528},"tenoncms\u002Fvite",[519,847,781],{"class":761},[519,849,784],{"class":761},[519,851,853,855,857,860,862,864,866,869,871],{"class":521,"line":852},5,[519,854,758],{"class":757},[519,856,762],{"class":761},[519,858,859],{"class":765}," defineConfig",[519,861,769],{"class":761},[519,863,772],{"class":757},[519,865,775],{"class":761},[519,867,868],{"class":528},"vite",[519,870,781],{"class":761},[519,872,784],{"class":761},[519,874,876],{"class":521,"line":875},6,[519,877,879],{"emptyLinePlaceholder":878},true,"\n",[519,881,883,886,889,892,895],{"class":521,"line":882},7,[519,884,885],{"class":757},"export",[519,887,888],{"class":757}," default",[519,890,859],{"class":891},"s2Zo4",[519,893,894],{"class":765},"(",[519,896,897],{"class":761},"{\n",[519,899,901,905,907,910,913,916,919,921,923,925,928,930,932,934,937],{"class":521,"line":900},8,[519,902,904],{"class":903},"swJcz","  plugins",[519,906,503],{"class":761},[519,908,909],{"class":765}," [",[519,911,912],{"class":891},"tanstackStart",[519,914,915],{"class":765},"()",[519,917,918],{"class":761},",",[519,920,813],{"class":891},[519,922,915],{"class":765},[519,924,918],{"class":761},[519,926,927],{"class":891}," viteReact",[519,929,915],{"class":765},[519,931,918],{"class":761},[519,933,836],{"class":891},[519,935,936],{"class":765},"()]",[519,938,939],{"class":761},",\n",[519,941,943,946,949],{"class":521,"line":942},9,[519,944,945],{"class":761},"}",[519,947,948],{"class":765},")",[519,950,784],{"class":761},[621,952,954],{"id":953},"add-the-server-routes","Add the server routes",[484,956,957,958,961],{},"The API route hands every request method to the CMS. The admin route serves the admin page. The sitemap and ",[488,959,960],{},"robots.txt"," routes are optional:",[963,964,966,1133,1299,1418],"code-tree",{"default-value":965},"src\u002Froutes\u002F[_]tenon.$.ts",[509,967,969],{"className":748,"code":968,"filename":965,"language":750,"meta":515,"style":515},"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",[488,970,971,993,1011,1015,1065,1069,1097,1125],{"__ignoreMap":515},[519,972,973,975,977,980,982,984,986,989,991],{"class":521,"line":522},[519,974,758],{"class":757},[519,976,762],{"class":761},[519,978,979],{"class":765}," createFileRoute",[519,981,769],{"class":761},[519,983,772],{"class":757},[519,985,775],{"class":761},[519,987,988],{"class":528},"@tanstack\u002Freact-router",[519,990,781],{"class":761},[519,992,784],{"class":761},[519,994,995,997,1000,1002,1004,1007,1009],{"class":521,"line":650},[519,996,758],{"class":757},[519,998,999],{"class":765}," cms ",[519,1001,794],{"class":757},[519,1003,775],{"class":761},[519,1005,1006],{"class":528},"..\u002F..\u002Ftenon.config",[519,1008,781],{"class":761},[519,1010,784],{"class":761},[519,1012,1013],{"class":521,"line":806},[519,1014,879],{"emptyLinePlaceholder":878},[519,1016,1017,1021,1024,1027,1030,1034,1037,1039,1041,1043,1046,1049,1052,1055,1057,1060,1063],{"class":521,"line":829},[519,1018,1020],{"class":1019},"spNyl","const",[519,1022,1023],{"class":765}," handle ",[519,1025,1026],{"class":761},"=",[519,1028,1029],{"class":761}," ({",[519,1031,1033],{"class":1032},"sHdIc"," request",[519,1035,1036],{"class":761}," }:",[519,1038,762],{"class":761},[519,1040,1033],{"class":903},[519,1042,503],{"class":761},[519,1044,1045],{"class":525}," Request",[519,1047,1048],{"class":761}," })",[519,1050,1051],{"class":1019}," =>",[519,1053,1054],{"class":765}," cms",[519,1056,615],{"class":761},[519,1058,1059],{"class":891},"fetch",[519,1061,1062],{"class":765},"(request)",[519,1064,784],{"class":761},[519,1066,1067],{"class":521,"line":852},[519,1068,879],{"emptyLinePlaceholder":878},[519,1070,1071,1073,1076,1079,1081,1083,1085,1087,1090,1092,1095],{"class":521,"line":875},[519,1072,885],{"class":757},[519,1074,1075],{"class":1019}," const",[519,1077,1078],{"class":765}," Route ",[519,1080,1026],{"class":761},[519,1082,979],{"class":891},[519,1084,894],{"class":765},[519,1086,781],{"class":761},[519,1088,1089],{"class":528},"\u002F_tenon\u002F$",[519,1091,781],{"class":761},[519,1093,1094],{"class":765},")(",[519,1096,897],{"class":761},[519,1098,1099,1102,1104,1106,1109,1111,1113,1116,1118,1120,1122],{"class":521,"line":882},[519,1100,1101],{"class":903},"  server",[519,1103,503],{"class":761},[519,1105,762],{"class":761},[519,1107,1108],{"class":903}," handlers",[519,1110,503],{"class":761},[519,1112,762],{"class":761},[519,1114,1115],{"class":903}," ANY",[519,1117,503],{"class":761},[519,1119,1023],{"class":765},[519,1121,945],{"class":761},[519,1123,1124],{"class":761}," },\n",[519,1126,1127,1129,1131],{"class":521,"line":900},[519,1128,945],{"class":761},[519,1130,948],{"class":765},[519,1132,784],{"class":761},[509,1134,1137],{"className":748,"code":1135,"filename":1136,"language":750,"meta":515,"style":515},"import { createFileRoute } from \"@tanstack\u002Freact-router\";\nimport html from \"#tenon\u002Fadmin-html\";\n\nexport const Route = createFileRoute(\"\u002Fadmin\u002F$\")({\n  server: {\n    handlers: {\n      GET: () => new Response(html, { headers: { \"content-type\": \"text\u002Fhtml; charset=utf-8\" } }),\n    },\n  },\n});\n","src\u002Froutes\u002Fadmin.$.ts",[488,1138,1139,1159,1177,1181,1206,1215,1224,1280,1285,1290],{"__ignoreMap":515},[519,1140,1141,1143,1145,1147,1149,1151,1153,1155,1157],{"class":521,"line":522},[519,1142,758],{"class":757},[519,1144,762],{"class":761},[519,1146,979],{"class":765},[519,1148,769],{"class":761},[519,1150,772],{"class":757},[519,1152,775],{"class":761},[519,1154,988],{"class":528},[519,1156,781],{"class":761},[519,1158,784],{"class":761},[519,1160,1161,1163,1166,1168,1170,1173,1175],{"class":521,"line":650},[519,1162,758],{"class":757},[519,1164,1165],{"class":765}," html ",[519,1167,794],{"class":757},[519,1169,775],{"class":761},[519,1171,1172],{"class":528},"#tenon\u002Fadmin-html",[519,1174,781],{"class":761},[519,1176,784],{"class":761},[519,1178,1179],{"class":521,"line":806},[519,1180,879],{"emptyLinePlaceholder":878},[519,1182,1183,1185,1187,1189,1191,1193,1195,1197,1200,1202,1204],{"class":521,"line":829},[519,1184,885],{"class":757},[519,1186,1075],{"class":1019},[519,1188,1078],{"class":765},[519,1190,1026],{"class":761},[519,1192,979],{"class":891},[519,1194,894],{"class":765},[519,1196,781],{"class":761},[519,1198,1199],{"class":528},"\u002Fadmin\u002F$",[519,1201,781],{"class":761},[519,1203,1094],{"class":765},[519,1205,897],{"class":761},[519,1207,1208,1210,1212],{"class":521,"line":852},[519,1209,1101],{"class":903},[519,1211,503],{"class":761},[519,1213,1214],{"class":761}," {\n",[519,1216,1217,1220,1222],{"class":521,"line":875},[519,1218,1219],{"class":903},"    handlers",[519,1221,503],{"class":761},[519,1223,1214],{"class":761},[519,1225,1226,1229,1231,1234,1236,1239,1242,1245,1247,1249,1252,1254,1256,1258,1261,1263,1265,1267,1270,1272,1274,1276,1278],{"class":521,"line":882},[519,1227,1228],{"class":891},"      GET",[519,1230,503],{"class":761},[519,1232,1233],{"class":761}," ()",[519,1235,1051],{"class":1019},[519,1237,1238],{"class":761}," new",[519,1240,1241],{"class":891}," Response",[519,1243,1244],{"class":765},"(html",[519,1246,918],{"class":761},[519,1248,762],{"class":761},[519,1250,1251],{"class":903}," headers",[519,1253,503],{"class":761},[519,1255,762],{"class":761},[519,1257,775],{"class":761},[519,1259,1260],{"class":903},"content-type",[519,1262,781],{"class":761},[519,1264,503],{"class":761},[519,1266,775],{"class":761},[519,1268,1269],{"class":528},"text\u002Fhtml; charset=utf-8",[519,1271,781],{"class":761},[519,1273,769],{"class":761},[519,1275,769],{"class":761},[519,1277,948],{"class":765},[519,1279,939],{"class":761},[519,1281,1282],{"class":521,"line":900},[519,1283,1284],{"class":761},"    },\n",[519,1286,1287],{"class":521,"line":942},[519,1288,1289],{"class":761},"  },\n",[519,1291,1293,1295,1297],{"class":521,"line":1292},10,[519,1294,945],{"class":761},[519,1296,948],{"class":765},[519,1298,784],{"class":761},[509,1300,1303],{"className":748,"code":1301,"filename":1302,"language":750,"meta":515,"style":515},"import { createFileRoute } from \"@tanstack\u002Freact-router\";\nimport cms from \"..\u002F..\u002Ftenon.config\";\n\nexport const Route = createFileRoute(\"\u002Fsitemap.xml\")({\n  server: { handlers: { GET: ({ request }) => cms.fetch(request) } },\n});\n","src\u002Froutes\u002Fsitemap[.]xml.ts",[488,1304,1305,1325,1341,1345,1370,1410],{"__ignoreMap":515},[519,1306,1307,1309,1311,1313,1315,1317,1319,1321,1323],{"class":521,"line":522},[519,1308,758],{"class":757},[519,1310,762],{"class":761},[519,1312,979],{"class":765},[519,1314,769],{"class":761},[519,1316,772],{"class":757},[519,1318,775],{"class":761},[519,1320,988],{"class":528},[519,1322,781],{"class":761},[519,1324,784],{"class":761},[519,1326,1327,1329,1331,1333,1335,1337,1339],{"class":521,"line":650},[519,1328,758],{"class":757},[519,1330,999],{"class":765},[519,1332,794],{"class":757},[519,1334,775],{"class":761},[519,1336,1006],{"class":528},[519,1338,781],{"class":761},[519,1340,784],{"class":761},[519,1342,1343],{"class":521,"line":806},[519,1344,879],{"emptyLinePlaceholder":878},[519,1346,1347,1349,1351,1353,1355,1357,1359,1361,1364,1366,1368],{"class":521,"line":829},[519,1348,885],{"class":757},[519,1350,1075],{"class":1019},[519,1352,1078],{"class":765},[519,1354,1026],{"class":761},[519,1356,979],{"class":891},[519,1358,894],{"class":765},[519,1360,781],{"class":761},[519,1362,1363],{"class":528},"\u002Fsitemap.xml",[519,1365,781],{"class":761},[519,1367,1094],{"class":765},[519,1369,897],{"class":761},[519,1371,1372,1374,1376,1378,1380,1382,1384,1387,1389,1391,1393,1395,1397,1399,1401,1403,1406,1408],{"class":521,"line":852},[519,1373,1101],{"class":903},[519,1375,503],{"class":761},[519,1377,762],{"class":761},[519,1379,1108],{"class":903},[519,1381,503],{"class":761},[519,1383,762],{"class":761},[519,1385,1386],{"class":891}," GET",[519,1388,503],{"class":761},[519,1390,1029],{"class":761},[519,1392,1033],{"class":1032},[519,1394,1048],{"class":761},[519,1396,1051],{"class":1019},[519,1398,1054],{"class":765},[519,1400,615],{"class":761},[519,1402,1059],{"class":891},[519,1404,1405],{"class":765},"(request) ",[519,1407,945],{"class":761},[519,1409,1124],{"class":761},[519,1411,1412,1414,1416],{"class":521,"line":875},[519,1413,945],{"class":761},[519,1415,948],{"class":765},[519,1417,784],{"class":761},[509,1419,1422],{"className":748,"code":1420,"filename":1421,"language":750,"meta":515,"style":515},"import { createFileRoute } from \"@tanstack\u002Freact-router\";\nimport cms from \"..\u002F..\u002Ftenon.config\";\n\nexport const Route = createFileRoute(\"\u002Frobots.txt\")({\n  server: { handlers: { GET: ({ request }) => cms.fetch(request) } },\n});\n","src\u002Froutes\u002Frobots[.]txt.ts",[488,1423,1424,1444,1460,1464,1489,1527],{"__ignoreMap":515},[519,1425,1426,1428,1430,1432,1434,1436,1438,1440,1442],{"class":521,"line":522},[519,1427,758],{"class":757},[519,1429,762],{"class":761},[519,1431,979],{"class":765},[519,1433,769],{"class":761},[519,1435,772],{"class":757},[519,1437,775],{"class":761},[519,1439,988],{"class":528},[519,1441,781],{"class":761},[519,1443,784],{"class":761},[519,1445,1446,1448,1450,1452,1454,1456,1458],{"class":521,"line":650},[519,1447,758],{"class":757},[519,1449,999],{"class":765},[519,1451,794],{"class":757},[519,1453,775],{"class":761},[519,1455,1006],{"class":528},[519,1457,781],{"class":761},[519,1459,784],{"class":761},[519,1461,1462],{"class":521,"line":806},[519,1463,879],{"emptyLinePlaceholder":878},[519,1465,1466,1468,1470,1472,1474,1476,1478,1480,1483,1485,1487],{"class":521,"line":829},[519,1467,885],{"class":757},[519,1469,1075],{"class":1019},[519,1471,1078],{"class":765},[519,1473,1026],{"class":761},[519,1475,979],{"class":891},[519,1477,894],{"class":765},[519,1479,781],{"class":761},[519,1481,1482],{"class":528},"\u002Frobots.txt",[519,1484,781],{"class":761},[519,1486,1094],{"class":765},[519,1488,897],{"class":761},[519,1490,1491,1493,1495,1497,1499,1501,1503,1505,1507,1509,1511,1513,1515,1517,1519,1521,1523,1525],{"class":521,"line":852},[519,1492,1101],{"class":903},[519,1494,503],{"class":761},[519,1496,762],{"class":761},[519,1498,1108],{"class":903},[519,1500,503],{"class":761},[519,1502,762],{"class":761},[519,1504,1386],{"class":891},[519,1506,503],{"class":761},[519,1508,1029],{"class":761},[519,1510,1033],{"class":1032},[519,1512,1048],{"class":761},[519,1514,1051],{"class":1019},[519,1516,1054],{"class":765},[519,1518,615],{"class":761},[519,1520,1059],{"class":891},[519,1522,1405],{"class":765},[519,1524,945],{"class":761},[519,1526,1124],{"class":761},[519,1528,1529,1531,1533],{"class":521,"line":875},[519,1530,945],{"class":761},[519,1532,948],{"class":765},[519,1534,784],{"class":761},[484,1536,1537,1538,1541,1542,615],{},"The brackets escape characters that TanStack Router reads as syntax. A file named ",[488,1539,1540],{},"_tenon.$.ts"," is a pathless layout route and never matches ",[488,1543,1544],{},"\u002F_tenon",[621,1546,1548],{"id":1547},"register-the-types","Register the types",[484,1550,1551,1552,1555,1556,1559,1560,1563],{},"Add ",[488,1553,1554],{},"tenoncms\u002Fregister"," to ",[488,1557,1558],{},"types",", and point ",[488,1561,1562],{},"#tenon\u002Fconfig"," at your config:",[509,1565,1570],{"className":1566,"code":1567,"filename":1568,"language":1569,"meta":515,"style":515},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"compilerOptions\": {\n    \"types\": [\"vite\u002Fclient\", \"node\", \"tenoncms\u002Fregister\"],\n    \"paths\": { \"#tenon\u002Fconfig\": [\".\u002Ftenon.config.ts\"] }\n  }\n}\n","tsconfig.json","json",[488,1571,1572,1576,1590,1630,1667,1672],{"__ignoreMap":515},[519,1573,1574],{"class":521,"line":522},[519,1575,897],{"class":761},[519,1577,1578,1581,1584,1586,1588],{"class":521,"line":650},[519,1579,1580],{"class":761},"  \"",[519,1582,1583],{"class":1019},"compilerOptions",[519,1585,781],{"class":761},[519,1587,503],{"class":761},[519,1589,1214],{"class":761},[519,1591,1592,1595,1597,1599,1601,1603,1605,1608,1610,1612,1614,1617,1619,1621,1623,1625,1627],{"class":521,"line":806},[519,1593,1594],{"class":761},"    \"",[519,1596,1558],{"class":525},[519,1598,781],{"class":761},[519,1600,503],{"class":761},[519,1602,909],{"class":761},[519,1604,781],{"class":761},[519,1606,1607],{"class":528},"vite\u002Fclient",[519,1609,781],{"class":761},[519,1611,918],{"class":761},[519,1613,775],{"class":761},[519,1615,1616],{"class":528},"node",[519,1618,781],{"class":761},[519,1620,918],{"class":761},[519,1622,775],{"class":761},[519,1624,1554],{"class":528},[519,1626,781],{"class":761},[519,1628,1629],{"class":761},"],\n",[519,1631,1632,1634,1637,1639,1641,1643,1645,1648,1650,1652,1654,1656,1659,1661,1664],{"class":521,"line":829},[519,1633,1594],{"class":761},[519,1635,1636],{"class":525},"paths",[519,1638,781],{"class":761},[519,1640,503],{"class":761},[519,1642,762],{"class":761},[519,1644,775],{"class":761},[519,1646,1562],{"class":1647},"sbssI",[519,1649,781],{"class":761},[519,1651,503],{"class":761},[519,1653,909],{"class":761},[519,1655,781],{"class":761},[519,1657,1658],{"class":528},".\u002Ftenon.config.ts",[519,1660,781],{"class":761},[519,1662,1663],{"class":761},"]",[519,1665,1666],{"class":761}," }\n",[519,1668,1669],{"class":521,"line":852},[519,1670,1671],{"class":761},"  }\n",[519,1673,1674],{"class":521,"line":875},[519,1675,1676],{"class":761},"}\n",[484,1678,1679,1680,1682,1683,1686,1687,1690],{},"This types ",[488,1681,1172],{},", and ",[488,1684,1685],{},"createClient()"," from ",[488,1688,1689],{},"tenoncms\u002Fclient"," without a type argument.",[621,1692,1694],{"id":1693},"create-the-cms-instance","Create the CMS instance",[484,1696,1697,1698,1700],{},"Create ",[488,1699,588],{}," at the project root:",[509,1702,1704],{"className":748,"code":1703,"filename":588,"language":750,"meta":515,"style":515},"import { defineCms } from \"tenoncms\";\nimport { libsql } from \"tenoncms\u002Flibsql\";\nimport { posts } from \".\u002Fcms\u002Fcollections\u002Fposts\";\n\nexport default defineCms({\n  collections: { posts },\n  database: libsql(process.env.DATABASE_URL ?? \"file:.\u002Fcms.db\"),\n  secret: process.env.TENON_SECRET!,\n  site: { url: process.env.TENON_SITE_URL, name: \"My Site\" },\n});\n",[488,1705,1706,1728,1750,1772,1776,1788,1803,1839,1861,1902],{"__ignoreMap":515},[519,1707,1708,1710,1712,1715,1717,1719,1721,1724,1726],{"class":521,"line":522},[519,1709,758],{"class":757},[519,1711,762],{"class":761},[519,1713,1714],{"class":765}," defineCms",[519,1716,769],{"class":761},[519,1718,772],{"class":757},[519,1720,775],{"class":761},[519,1722,1723],{"class":528},"tenoncms",[519,1725,781],{"class":761},[519,1727,784],{"class":761},[519,1729,1730,1732,1734,1737,1739,1741,1743,1746,1748],{"class":521,"line":650},[519,1731,758],{"class":757},[519,1733,762],{"class":761},[519,1735,1736],{"class":765}," libsql",[519,1738,769],{"class":761},[519,1740,772],{"class":757},[519,1742,775],{"class":761},[519,1744,1745],{"class":528},"tenoncms\u002Flibsql",[519,1747,781],{"class":761},[519,1749,784],{"class":761},[519,1751,1752,1754,1756,1759,1761,1763,1765,1768,1770],{"class":521,"line":806},[519,1753,758],{"class":757},[519,1755,762],{"class":761},[519,1757,1758],{"class":765}," posts",[519,1760,769],{"class":761},[519,1762,772],{"class":757},[519,1764,775],{"class":761},[519,1766,1767],{"class":528},".\u002Fcms\u002Fcollections\u002Fposts",[519,1769,781],{"class":761},[519,1771,784],{"class":761},[519,1773,1774],{"class":521,"line":829},[519,1775,879],{"emptyLinePlaceholder":878},[519,1777,1778,1780,1782,1784,1786],{"class":521,"line":852},[519,1779,885],{"class":757},[519,1781,888],{"class":757},[519,1783,1714],{"class":891},[519,1785,894],{"class":765},[519,1787,897],{"class":761},[519,1789,1790,1793,1795,1797,1800],{"class":521,"line":875},[519,1791,1792],{"class":903},"  collections",[519,1794,503],{"class":761},[519,1796,762],{"class":761},[519,1798,1799],{"class":765}," posts ",[519,1801,1802],{"class":761},"},\n",[519,1804,1805,1808,1810,1812,1815,1817,1820,1822,1825,1828,1830,1833,1835,1837],{"class":521,"line":882},[519,1806,1807],{"class":903},"  database",[519,1809,503],{"class":761},[519,1811,1736],{"class":891},[519,1813,1814],{"class":765},"(process",[519,1816,615],{"class":761},[519,1818,1819],{"class":765},"env",[519,1821,615],{"class":761},[519,1823,1824],{"class":765},"DATABASE_URL ",[519,1826,1827],{"class":761},"??",[519,1829,775],{"class":761},[519,1831,1832],{"class":528},"file:.\u002Fcms.db",[519,1834,781],{"class":761},[519,1836,948],{"class":765},[519,1838,939],{"class":761},[519,1840,1841,1844,1846,1849,1851,1853,1855,1858],{"class":521,"line":900},[519,1842,1843],{"class":903},"  secret",[519,1845,503],{"class":761},[519,1847,1848],{"class":765}," process",[519,1850,615],{"class":761},[519,1852,1819],{"class":765},[519,1854,615],{"class":761},[519,1856,1857],{"class":765},"TENON_SECRET",[519,1859,1860],{"class":761},"!,\n",[519,1862,1863,1866,1868,1870,1873,1875,1877,1879,1881,1883,1886,1888,1891,1893,1895,1898,1900],{"class":521,"line":942},[519,1864,1865],{"class":903},"  site",[519,1867,503],{"class":761},[519,1869,762],{"class":761},[519,1871,1872],{"class":903}," url",[519,1874,503],{"class":761},[519,1876,1848],{"class":765},[519,1878,615],{"class":761},[519,1880,1819],{"class":765},[519,1882,615],{"class":761},[519,1884,1885],{"class":765},"TENON_SITE_URL",[519,1887,918],{"class":761},[519,1889,1890],{"class":903}," name",[519,1892,503],{"class":761},[519,1894,775],{"class":761},[519,1896,1897],{"class":528},"My Site",[519,1899,781],{"class":761},[519,1901,1124],{"class":761},[519,1903,1904,1906,1908],{"class":521,"line":1292},[519,1905,945],{"class":761},[519,1907,948],{"class":765},[519,1909,784],{"class":761},[484,1911,1912,1913,1915,1916,615],{},"For the ",[488,1914,592],{}," collection, see ",[603,1917,1919],{"href":1918},"\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site#add-a-collection","Add a collection",[621,1921,1923],{"id":1922},"set-the-secret","Set the secret",[484,1925,1926,1927,1930,1931,503],{},"Generate a secret with ",[488,1928,1929],{},"openssl rand -hex 32"," and put it in ",[488,1932,1933],{},".env",[509,1935,1937],{"className":511,"code":1936,"filename":1933,"language":514,"meta":515,"style":515},"TENON_SECRET=\u003Cyour secret>\n",[488,1938,1939],{"__ignoreMap":515},[519,1940,1941,1943,1946,1949,1952],{"class":521,"line":522},[519,1942,1857],{"class":765},[519,1944,1945],{"class":761},"=\u003C",[519,1947,1948],{"class":528},"your",[519,1950,1951],{"class":525}," secret",[519,1953,1954],{"class":765},">\n",[484,1956,1957,1958,585,1960,1963,1964,1967],{},"Keep ",[488,1959,1933],{},[488,1961,1962],{},"cms.db*"," and ",[488,1965,1966],{},".uploads"," out of git.",[621,1969,1971],{"id":1970},"create-the-admin-account","Create the admin account",[484,1973,1974,1975,597,1977,1979],{},"Run ",[488,1976,596],{},[488,1978,600],{},". The first account you create is the admin.",[493,1981,1983],{"id":1982},"read-content","Read content",[484,1985,1986],{},"Loaders run on the server and in the browser, but the CMS runs only on the server. Read content in a server function, and call it from the loader:",[509,1988,1993],{"className":1989,"code":1990,"filename":1991,"language":1992,"meta":515,"style":515},"language-tsx shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createFileRoute, notFound } from \"@tanstack\u002Freact-router\";\nimport { createServerFn } from \"@tanstack\u002Freact-start\";\nimport { getRequest } from \"@tanstack\u002Freact-start\u002Fserver\";\nimport cms from \"..\u002F..\u002F..\u002Ftenon.config\";\n\nconst getPost = createServerFn()\n  .validator((slug: string) => slug)\n  .handler(async ({ data: slug }) => {\n    const tenon = await cms.withSession(getRequest());\n    const post = await tenon.findOne(\"posts\", { where: { slug } });\n    if (!post) throw notFound();\n    return post;\n  });\n\nexport const Route = createFileRoute(\"\u002Fposts\u002F$slug\")({\n  loader: ({ params }) => getPost({ data: params.slug }),\n  component: Post,\n});\n\nfunction Post() {\n  const post = Route.useLoaderData();\n  return \u003Ch1>{post.title}\u003C\u002Fh1>;\n}\n","src\u002Froutes\u002Fposts\u002F$slug.tsx","tsx",[488,1994,1995,2020,2042,2064,2081,2085,2099,2126,2154,2185,2232,2259,2269,2279,2284,2310,2352,2365,2374,2379,2391,2413,2443],{"__ignoreMap":515},[519,1996,1997,1999,2001,2003,2005,2008,2010,2012,2014,2016,2018],{"class":521,"line":522},[519,1998,758],{"class":757},[519,2000,762],{"class":761},[519,2002,979],{"class":765},[519,2004,918],{"class":761},[519,2006,2007],{"class":765}," notFound",[519,2009,769],{"class":761},[519,2011,772],{"class":757},[519,2013,775],{"class":761},[519,2015,988],{"class":528},[519,2017,781],{"class":761},[519,2019,784],{"class":761},[519,2021,2022,2024,2026,2029,2031,2033,2035,2038,2040],{"class":521,"line":650},[519,2023,758],{"class":757},[519,2025,762],{"class":761},[519,2027,2028],{"class":765}," createServerFn",[519,2030,769],{"class":761},[519,2032,772],{"class":757},[519,2034,775],{"class":761},[519,2036,2037],{"class":528},"@tanstack\u002Freact-start",[519,2039,781],{"class":761},[519,2041,784],{"class":761},[519,2043,2044,2046,2048,2051,2053,2055,2057,2060,2062],{"class":521,"line":806},[519,2045,758],{"class":757},[519,2047,762],{"class":761},[519,2049,2050],{"class":765}," getRequest",[519,2052,769],{"class":761},[519,2054,772],{"class":757},[519,2056,775],{"class":761},[519,2058,2059],{"class":528},"@tanstack\u002Freact-start\u002Fserver",[519,2061,781],{"class":761},[519,2063,784],{"class":761},[519,2065,2066,2068,2070,2072,2074,2077,2079],{"class":521,"line":829},[519,2067,758],{"class":757},[519,2069,999],{"class":765},[519,2071,794],{"class":757},[519,2073,775],{"class":761},[519,2075,2076],{"class":528},"..\u002F..\u002F..\u002Ftenon.config",[519,2078,781],{"class":761},[519,2080,784],{"class":761},[519,2082,2083],{"class":521,"line":852},[519,2084,879],{"emptyLinePlaceholder":878},[519,2086,2087,2089,2092,2094,2096],{"class":521,"line":875},[519,2088,1020],{"class":1019},[519,2090,2091],{"class":765}," getPost ",[519,2093,1026],{"class":761},[519,2095,2028],{"class":891},[519,2097,2098],{"class":765},"()\n",[519,2100,2101,2104,2107,2109,2111,2114,2116,2119,2121,2123],{"class":521,"line":882},[519,2102,2103],{"class":761},"  .",[519,2105,2106],{"class":891},"validator",[519,2108,894],{"class":765},[519,2110,894],{"class":761},[519,2112,2113],{"class":1032},"slug",[519,2115,503],{"class":761},[519,2117,2118],{"class":525}," string",[519,2120,948],{"class":761},[519,2122,1051],{"class":1019},[519,2124,2125],{"class":765}," slug)\n",[519,2127,2128,2130,2133,2135,2138,2140,2143,2145,2148,2150,2152],{"class":521,"line":900},[519,2129,2103],{"class":761},[519,2131,2132],{"class":891},"handler",[519,2134,894],{"class":765},[519,2136,2137],{"class":1019},"async",[519,2139,1029],{"class":761},[519,2141,2142],{"class":903}," data",[519,2144,503],{"class":761},[519,2146,2147],{"class":1032}," slug",[519,2149,1048],{"class":761},[519,2151,1051],{"class":1019},[519,2153,1214],{"class":761},[519,2155,2156,2159,2162,2165,2168,2170,2172,2175,2177,2180,2183],{"class":521,"line":942},[519,2157,2158],{"class":1019},"    const",[519,2160,2161],{"class":765}," tenon",[519,2163,2164],{"class":761}," =",[519,2166,2167],{"class":757}," await",[519,2169,1054],{"class":765},[519,2171,615],{"class":761},[519,2173,2174],{"class":891},"withSession",[519,2176,894],{"class":903},[519,2178,2179],{"class":891},"getRequest",[519,2181,2182],{"class":903},"())",[519,2184,784],{"class":761},[519,2186,2187,2189,2192,2194,2196,2198,2200,2203,2205,2207,2209,2211,2213,2215,2218,2220,2222,2224,2226,2228,2230],{"class":521,"line":1292},[519,2188,2158],{"class":1019},[519,2190,2191],{"class":765}," post",[519,2193,2164],{"class":761},[519,2195,2167],{"class":757},[519,2197,2161],{"class":765},[519,2199,615],{"class":761},[519,2201,2202],{"class":891},"findOne",[519,2204,894],{"class":903},[519,2206,781],{"class":761},[519,2208,592],{"class":528},[519,2210,781],{"class":761},[519,2212,918],{"class":761},[519,2214,762],{"class":761},[519,2216,2217],{"class":903}," where",[519,2219,503],{"class":761},[519,2221,762],{"class":761},[519,2223,2147],{"class":765},[519,2225,769],{"class":761},[519,2227,769],{"class":761},[519,2229,948],{"class":903},[519,2231,784],{"class":761},[519,2233,2235,2238,2241,2244,2247,2250,2253,2255,2257],{"class":521,"line":2234},11,[519,2236,2237],{"class":757},"    if",[519,2239,2240],{"class":903}," (",[519,2242,2243],{"class":761},"!",[519,2245,2246],{"class":765},"post",[519,2248,2249],{"class":903},") ",[519,2251,2252],{"class":757},"throw",[519,2254,2007],{"class":891},[519,2256,915],{"class":903},[519,2258,784],{"class":761},[519,2260,2262,2265,2267],{"class":521,"line":2261},12,[519,2263,2264],{"class":757},"    return",[519,2266,2191],{"class":765},[519,2268,784],{"class":761},[519,2270,2272,2275,2277],{"class":521,"line":2271},13,[519,2273,2274],{"class":761},"  }",[519,2276,948],{"class":765},[519,2278,784],{"class":761},[519,2280,2282],{"class":521,"line":2281},14,[519,2283,879],{"emptyLinePlaceholder":878},[519,2285,2287,2289,2291,2293,2295,2297,2299,2301,2304,2306,2308],{"class":521,"line":2286},15,[519,2288,885],{"class":757},[519,2290,1075],{"class":1019},[519,2292,1078],{"class":765},[519,2294,1026],{"class":761},[519,2296,979],{"class":891},[519,2298,894],{"class":765},[519,2300,781],{"class":761},[519,2302,2303],{"class":528},"\u002Fposts\u002F$slug",[519,2305,781],{"class":761},[519,2307,1094],{"class":765},[519,2309,897],{"class":761},[519,2311,2313,2316,2318,2320,2323,2325,2327,2330,2332,2335,2337,2339,2341,2343,2346,2348,2350],{"class":521,"line":2312},16,[519,2314,2315],{"class":891},"  loader",[519,2317,503],{"class":761},[519,2319,1029],{"class":761},[519,2321,2322],{"class":1032}," params",[519,2324,1048],{"class":761},[519,2326,1051],{"class":1019},[519,2328,2329],{"class":891}," getPost",[519,2331,894],{"class":765},[519,2333,2334],{"class":761},"{",[519,2336,2142],{"class":903},[519,2338,503],{"class":761},[519,2340,2322],{"class":765},[519,2342,615],{"class":761},[519,2344,2345],{"class":765},"slug ",[519,2347,945],{"class":761},[519,2349,948],{"class":765},[519,2351,939],{"class":761},[519,2353,2355,2358,2360,2363],{"class":521,"line":2354},17,[519,2356,2357],{"class":903},"  component",[519,2359,503],{"class":761},[519,2361,2362],{"class":765}," Post",[519,2364,939],{"class":761},[519,2366,2368,2370,2372],{"class":521,"line":2367},18,[519,2369,945],{"class":761},[519,2371,948],{"class":765},[519,2373,784],{"class":761},[519,2375,2377],{"class":521,"line":2376},19,[519,2378,879],{"emptyLinePlaceholder":878},[519,2380,2382,2385,2387,2389],{"class":521,"line":2381},20,[519,2383,2384],{"class":1019},"function",[519,2386,2362],{"class":891},[519,2388,915],{"class":761},[519,2390,1214],{"class":761},[519,2392,2394,2397,2399,2401,2404,2406,2409,2411],{"class":521,"line":2393},21,[519,2395,2396],{"class":1019},"  const",[519,2398,2191],{"class":765},[519,2400,2164],{"class":761},[519,2402,2403],{"class":765}," Route",[519,2405,615],{"class":761},[519,2407,2408],{"class":891},"useLoaderData",[519,2410,915],{"class":903},[519,2412,784],{"class":761},[519,2414,2416,2419,2422,2425,2428,2430,2432,2435,2438,2440],{"class":521,"line":2415},22,[519,2417,2418],{"class":757},"  return",[519,2420,2421],{"class":761}," \u003C",[519,2423,2424],{"class":903},"h1",[519,2426,2427],{"class":761},">{",[519,2429,2246],{"class":765},[519,2431,615],{"class":761},[519,2433,2434],{"class":765},"title",[519,2436,2437],{"class":761},"}\u003C\u002F",[519,2439,2424],{"class":903},[519,2441,2442],{"class":761},">;\n",[519,2444,2446],{"class":521,"line":2445},23,[519,2447,1676],{"class":761},[484,2449,2450,2453,2454,2457,2458,2461,2462,615],{},[488,2451,2452],{},"cms.withSession(getRequest())"," reads as the user of the request. An editor in the preview reads drafts, and the ",[603,2455,2456],{"href":206},"access rules"," apply. The imported ",[488,2459,2460],{},"cms"," skips both, so use it only for content every visitor may see. See ",[603,2463,2465],{"href":2464},"\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Freading#drafts","Drafts",[493,2467,2469],{"id":2468},"render-and-preview","Render and preview",[484,2471,2472,2473,2476,2477,585,2479,585,2482,585,2484,585,2486,1963,2489,2492,2493,615],{},"The components of ",[488,2474,2475],{},"tenoncms\u002Freact"," render fields as HTML: ",[488,2478,76],{},[488,2480,2481],{},"Picture",[488,2483,80],{},[488,2485,56],{},[488,2487,2488],{},"Richtext",[488,2490,2491],{},"Seo",". They use no hooks, so they also work as server components. See ",[603,2494,184],{"href":185},[484,2496,2497],{},"The live preview needs two additions:",[2499,2500,2501,2606],"ol",{},[2502,2503,2504,2505,2508,2509],"li",{},"Call ",[488,2506,2507],{},"preview()"," once in the root route. For visitors without a session, it does nothing.",[509,2510,2513],{"className":1989,"code":2511,"filename":2512,"language":1992,"meta":515,"style":515},"import { useEffect } from \"react\";\nimport { preview } from \"tenoncms\u002Fpreview\";\n\nfunction Root() {\n  useEffect(() => preview(), []);\n  \u002F\u002F ...\n}\n","src\u002Froutes\u002F__root.tsx",[488,2514,2515,2537,2559,2563,2574,2596,2602],{"__ignoreMap":515},[519,2516,2517,2519,2521,2524,2526,2528,2530,2533,2535],{"class":521,"line":522},[519,2518,758],{"class":757},[519,2520,762],{"class":761},[519,2522,2523],{"class":765}," useEffect",[519,2525,769],{"class":761},[519,2527,772],{"class":757},[519,2529,775],{"class":761},[519,2531,2532],{"class":528},"react",[519,2534,781],{"class":761},[519,2536,784],{"class":761},[519,2538,2539,2541,2543,2546,2548,2550,2552,2555,2557],{"class":521,"line":650},[519,2540,758],{"class":757},[519,2542,762],{"class":761},[519,2544,2545],{"class":765}," preview",[519,2547,769],{"class":761},[519,2549,772],{"class":757},[519,2551,775],{"class":761},[519,2553,2554],{"class":528},"tenoncms\u002Fpreview",[519,2556,781],{"class":761},[519,2558,784],{"class":761},[519,2560,2561],{"class":521,"line":806},[519,2562,879],{"emptyLinePlaceholder":878},[519,2564,2565,2567,2570,2572],{"class":521,"line":829},[519,2566,2384],{"class":1019},[519,2568,2569],{"class":891}," Root",[519,2571,915],{"class":761},[519,2573,1214],{"class":761},[519,2575,2576,2579,2581,2583,2585,2587,2589,2591,2594],{"class":521,"line":852},[519,2577,2578],{"class":891},"  useEffect",[519,2580,894],{"class":903},[519,2582,915],{"class":761},[519,2584,1051],{"class":1019},[519,2586,2545],{"class":891},[519,2588,915],{"class":903},[519,2590,918],{"class":761},[519,2592,2593],{"class":903}," [])",[519,2595,784],{"class":761},[519,2597,2598],{"class":521,"line":875},[519,2599,2601],{"class":2600},"sHwdD","  \u002F\u002F ...\n",[519,2603,2604],{"class":521,"line":882},[519,2605,1676],{"class":761},[2502,2607,2608,2609,2612,2613],{},"Pass the loader data through ",[488,2610,2611],{},"useDraft()",". It merges unsaved changes, so the whole page follows while the editor types:",[509,2614,2616],{"className":1989,"code":2615,"filename":1991,"language":1992,"meta":515,"style":515},"import { edit } from \"tenoncms\u002Fpreview\";\nimport { useDraft } from \"tenoncms\u002Fpreview\u002Freact\";\n\nfunction Post() {\n  const post = useDraft(\"posts\", Route.useLoaderData());\n  return \u003Ch1 data-cms={edit(\"posts\", post.id, \"title\")}>{post.title}\u003C\u002Fh1>;\n}\n",[488,2617,2618,2639,2661,2665,2675,2705,2764],{"__ignoreMap":515},[519,2619,2620,2622,2624,2627,2629,2631,2633,2635,2637],{"class":521,"line":522},[519,2621,758],{"class":757},[519,2623,762],{"class":761},[519,2625,2626],{"class":765}," edit",[519,2628,769],{"class":761},[519,2630,772],{"class":757},[519,2632,775],{"class":761},[519,2634,2554],{"class":528},[519,2636,781],{"class":761},[519,2638,784],{"class":761},[519,2640,2641,2643,2645,2648,2650,2652,2654,2657,2659],{"class":521,"line":650},[519,2642,758],{"class":757},[519,2644,762],{"class":761},[519,2646,2647],{"class":765}," useDraft",[519,2649,769],{"class":761},[519,2651,772],{"class":757},[519,2653,775],{"class":761},[519,2655,2656],{"class":528},"tenoncms\u002Fpreview\u002Freact",[519,2658,781],{"class":761},[519,2660,784],{"class":761},[519,2662,2663],{"class":521,"line":806},[519,2664,879],{"emptyLinePlaceholder":878},[519,2666,2667,2669,2671,2673],{"class":521,"line":829},[519,2668,2384],{"class":1019},[519,2670,2362],{"class":891},[519,2672,915],{"class":761},[519,2674,1214],{"class":761},[519,2676,2677,2679,2681,2683,2685,2687,2689,2691,2693,2695,2697,2699,2701,2703],{"class":521,"line":852},[519,2678,2396],{"class":1019},[519,2680,2191],{"class":765},[519,2682,2164],{"class":761},[519,2684,2647],{"class":891},[519,2686,894],{"class":903},[519,2688,781],{"class":761},[519,2690,592],{"class":528},[519,2692,781],{"class":761},[519,2694,918],{"class":761},[519,2696,2403],{"class":765},[519,2698,615],{"class":761},[519,2700,2408],{"class":891},[519,2702,2182],{"class":903},[519,2704,784],{"class":761},[519,2706,2707,2709,2711,2713,2716,2719,2722,2724,2726,2728,2730,2732,2734,2736,2739,2741,2743,2745,2747,2749,2752,2754,2756,2758,2760,2762],{"class":521,"line":875},[519,2708,2418],{"class":757},[519,2710,2421],{"class":761},[519,2712,2424],{"class":903},[519,2714,2715],{"class":1019}," data-cms",[519,2717,2718],{"class":761},"={",[519,2720,2721],{"class":891},"edit",[519,2723,894],{"class":765},[519,2725,781],{"class":761},[519,2727,592],{"class":528},[519,2729,781],{"class":761},[519,2731,918],{"class":761},[519,2733,2191],{"class":765},[519,2735,615],{"class":761},[519,2737,2738],{"class":765},"id",[519,2740,918],{"class":761},[519,2742,775],{"class":761},[519,2744,2434],{"class":528},[519,2746,781],{"class":761},[519,2748,948],{"class":765},[519,2750,2751],{"class":761},"}>{",[519,2753,2246],{"class":765},[519,2755,615],{"class":761},[519,2757,2434],{"class":765},[519,2759,2437],{"class":761},[519,2761,2424],{"class":903},[519,2763,2442],{"class":761},[519,2765,2766],{"class":521,"line":882},[519,2767,1676],{"class":761},[484,2769,2770,2773,2774,615],{},[488,2771,2772],{},"edit()"," marks what a field renders. See ",[603,2775,2776],{"href":193},"Live preview",[484,2778,2779,2780,2783,2784,615],{},"TanStack Start has no adapter for languages. Read the language from the URL with ",[488,2781,2782],{},"localeFromPath()"," in a server function. See ",[603,2785,167],{"href":2786},"\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization#per-framework",[493,2788,2790,2792],{"id":2789},"tenonadmin-options",[488,2791,490],{}," options",[2794,2795,2796,2805],"field-group",{},[2797,2798,2801,2802,615],"field",{"name":2799,"type":2800},"entry","string","The file that exports the CMS instance, relative to the project root. Default: ",[488,2803,2804],{},"\".\u002Ftenon.config.ts\"",[2797,2806,2809,2810,2813,2814,2817,2818,615],{"name":2807,"type":2808},"jobs","boolean","Runs due jobs every minute through the Nitro task ",[488,2811,2812],{},"tenon:jobs",". Default: ",[488,2815,2816],{},"true",". On Vercel, Nitro turns the task into a Vercel Cron Job. See ",[603,2819,281],{"href":282},[2821,2822,2823,2835,2857],"ul",{},[2502,2824,2825,2827,2828,2830,2831,2834],{},[488,2826,490],{}," throws when ",[488,2829,588],{}," sets ",[488,2832,2833],{},"admin: false",". Remove the plugin and the admin route then.",[2502,2836,2837,2838,2841,2842,2845,2846,2849,2850,601,2853,615],{},"It reads ",[488,2839,2840],{},"admin.path"," at startup. For another path, like ",[488,2843,2844],{},"\u002Fcms",", rename the admin route to ",[488,2847,2848],{},"src\u002Froutes\u002Fcms.$.ts"," and pass the path to ",[488,2851,2852],{},"preview({ admin: \"\u002Fcms\" })",[603,2854,2856],{"href":2855},"\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin#admin-path","Admin path",[2502,2858,2859,2860,2862],{},"It keeps ",[488,2861,1723],{}," out of the server bundle, because bundling it breaks the native driver of libSQL.",[2864,2865,2866,2867,2870,2871,2875,2876,2879],"warning",{},"Vercel Hobby allows one cron job a day, and a deploy with a cron every minute fails. The Vercel starter sets ",[488,2868,2869],{},"tenonAdmin({ jobs: false })",". Call ",[603,2872,2874],{"href":2873},"\u002Fdocs\u002Fcore\u002Foperations\u002Fjobs\u002Fclock#the-clock-route","the clock route"," from a cron service instead, or remove ",[488,2877,2878],{},"jobs: false"," on the Pro plan.",[493,2881,2883],{"id":2882},"deploy","Deploy",[2885,2886,2887,2897],"card-group",{},[2888,2889,2891,1963,2894,615],"card",{"icon":2890,"title":390,"to":391},"i-simple-icons-nodedotjs",[488,2892,2893],{},"vite build",[488,2895,2896],{},"node .output\u002Fserver\u002Findex.mjs",[2888,2898,2900],{"icon":2899,"title":394,"to":395},"i-simple-icons-vercel","Vercel functions, with Postgres or Turso and a bucket.",[493,2902,2904],{"id":2903},"related-resources","Related resources",[2821,2906,2907,2912,2920,2933,2938],{},[2502,2908,2909,2911],{},[603,2910,24],{"href":25},": the full setup, with a first page.",[2502,2913,2914,2916,2917,2919],{},[603,2915,28],{"href":29},": ",[488,2918,588],{}," and the environment variables.",[2502,2921,2922,2925,2926,2929,2930,615],{},[603,2923,180],{"href":2924},"\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo#render-pages",": head tags with ",[488,2927,2928],{},"seoHead()"," in a route's ",[488,2931,2932],{},"head()",[2502,2934,2935,2937],{},[603,2936,2776],{"href":193},": mark elements and follow unsaved changes.",[2502,2939,2940,2943],{},[603,2941,2942],{"href":381},"Other frameworks",": the same setup in other Vite apps.",[2945,2946,2947],"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);}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":515,"searchDepth":650,"depth":650,"links":2949},[2950,2951,2960,2961,2962,2964,2965],{"id":495,"depth":650,"text":496},{"id":608,"depth":650,"text":609,"children":2952},[2953,2954,2955,2956,2957,2958,2959],{"id":623,"depth":806,"text":624},{"id":739,"depth":806,"text":740},{"id":953,"depth":806,"text":954},{"id":1547,"depth":806,"text":1548},{"id":1693,"depth":806,"text":1694},{"id":1922,"depth":806,"text":1923},{"id":1970,"depth":806,"text":1971},{"id":1982,"depth":650,"text":1983},{"id":2468,"depth":650,"text":2469},{"id":2789,"depth":650,"text":2963},"tenonAdmin() options",{"id":2882,"depth":650,"text":2883},{"id":2903,"depth":650,"text":2904},"Set up Tenon in a TanStack Start project.","md",null,{},{"title":372,"description":2966},"tWRTQkf9Bd07YiR7ZLs_Fbst2lvDE96tTRHQMPHZoUY",[2973,2975],{"title":368,"path":369,"stem":370,"description":2974,"children":-1},"Set up Tenon in a Nuxt project.",{"title":376,"path":377,"stem":378,"description":2976,"children":-1},"Run Tenon headless, with the API and the admin and no site.",1795884659394]