[{"data":1,"prerenderedAt":2345},["ShallowReactive",2],{"navigation_docs":3,"-docs-guide-frameworks-astro":478,"-docs-guide-frameworks-astro-surround":2340},[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":364,"body":480,"description":2334,"extension":2335,"links":2336,"meta":2337,"navigation":807,"path":365,"seo":2338,"stem":366,"__hash__":2339},"docs\u002Fdocs\u002F2.guide\u002F1.frameworks\u002F1.astro.md",{"type":481,"value":482,"toc":2319},"minimark",[483,496,501,508,580,607,611,621,1459,1463,1470,1645,1669,1676,1680,1710,2082,2124,2128,2133,2168,2239,2253,2257,2281,2285,2315],[484,485,486,487,491,492,495],"p",{},"The ",[488,489,490],"code",{},"tenoncms\u002Fastro"," integration adds the API, the admin and the live preview to your Astro site. Pages read content through ",[488,493,494],{},"Astro.locals.tenon",", typed from your config.",[497,498,500],"h2",{"id":499},"create-a-project","Create a project",[484,502,503,504,507],{},"Run the wizard and pick ",[505,506,364],"strong",{},":",[509,510,512,537,552,566],"code-group",{"sync":511},"pm",[513,514,520],"pre",{"className":515,"code":516,"filename":517,"language":518,"meta":519,"style":519},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm create tenoncms@latest\n","npm","bash","",[488,521,522],{"__ignoreMap":519},[523,524,527,530,534],"span",{"class":525,"line":526},"line",1,[523,528,517],{"class":529},"sBMFI",[523,531,533],{"class":532},"sfazB"," create",[523,535,536],{"class":532}," tenoncms@latest\n",[513,538,541],{"className":515,"code":539,"filename":540,"language":518,"meta":519,"style":519},"pnpm create tenoncms\n","pnpm",[488,542,543],{"__ignoreMap":519},[523,544,545,547,549],{"class":525,"line":526},[523,546,540],{"class":529},[523,548,533],{"class":532},[523,550,551],{"class":532}," tenoncms\n",[513,553,556],{"className":515,"code":554,"filename":555,"language":518,"meta":519,"style":519},"yarn create tenoncms\n","yarn",[488,557,558],{"__ignoreMap":519},[523,559,560,562,564],{"class":525,"line":526},[523,561,555],{"class":529},[523,563,533],{"class":532},[523,565,551],{"class":532},[513,567,570],{"className":515,"code":568,"filename":569,"language":518,"meta":519,"style":519},"bun create tenoncms\n","bun",[488,571,572],{"__ignoreMap":519},[523,573,574,576,578],{"class":525,"line":526},[523,575,569],{"class":529},[523,577,533],{"class":532},[523,579,551],{"class":532},[484,581,582,583,586,587,590,591,594,595,598,599,602,603,606],{},"The starter has ",[488,584,585],{},"astro.config.ts"," with the integration and the env schema, ",[488,588,589],{},"tenon.config.ts",", a ",[488,592,593],{},"posts"," collection and two pages. Start it with ",[488,596,597],{},"npm run dev",", open ",[488,600,601],{},"http:\u002F\u002Flocalhost:4321\u002Fadmin"," and create the first admin. See ",[604,605,455],"a",{"href":456}," for every question and flag.",[497,608,610],{"id":609},"add-to-an-existing-project","Add to an existing project",[484,612,613,614,617,618,620],{},"Tenon runs on the server, so your site needs a server adapter. This setup uses ",[488,615,616],{},"@astrojs\u002Fnode"," and a SQLite file. For the other databases, see ",[604,619,406],{"href":407},".",[622,623,625,630,705,709,720,1164,1174,1178,1187,1386,1396,1400,1410,1432,1446,1450],"steps",{"level":624},"3",[626,627,629],"h3",{"id":628},"install-the-packages","Install the packages",[509,631,632,653,671,688],{"sync":511},[513,633,635],{"className":515,"code":634,"filename":517,"language":518,"meta":519,"style":519},"npm install tenoncms @libsql\u002Fclient @astrojs\u002Fnode\n",[488,636,637],{"__ignoreMap":519},[523,638,639,641,644,647,650],{"class":525,"line":526},[523,640,517],{"class":529},[523,642,643],{"class":532}," install",[523,645,646],{"class":532}," tenoncms",[523,648,649],{"class":532}," @libsql\u002Fclient",[523,651,652],{"class":532}," @astrojs\u002Fnode\n",[513,654,656],{"className":515,"code":655,"filename":540,"language":518,"meta":519,"style":519},"pnpm add tenoncms @libsql\u002Fclient @astrojs\u002Fnode\n",[488,657,658],{"__ignoreMap":519},[523,659,660,662,665,667,669],{"class":525,"line":526},[523,661,540],{"class":529},[523,663,664],{"class":532}," add",[523,666,646],{"class":532},[523,668,649],{"class":532},[523,670,652],{"class":532},[513,672,674],{"className":515,"code":673,"filename":555,"language":518,"meta":519,"style":519},"yarn add tenoncms @libsql\u002Fclient @astrojs\u002Fnode\n",[488,675,676],{"__ignoreMap":519},[523,677,678,680,682,684,686],{"class":525,"line":526},[523,679,555],{"class":529},[523,681,664],{"class":532},[523,683,646],{"class":532},[523,685,649],{"class":532},[523,687,652],{"class":532},[513,689,691],{"className":515,"code":690,"filename":569,"language":518,"meta":519,"style":519},"bun add tenoncms @libsql\u002Fclient @astrojs\u002Fnode\n",[488,692,693],{"__ignoreMap":519},[523,694,695,697,699,701,703],{"class":525,"line":526},[523,696,569],{"class":529},[523,698,664],{"class":532},[523,700,646],{"class":532},[523,702,649],{"class":532},[523,704,652],{"class":532},[626,706,708],{"id":707},"add-the-integration","Add the integration",[484,710,711,712,715,716,719],{},"Add the adapter and ",[488,713,714],{},"tenonCms()",", and declare the variables in the ",[488,717,718],{},"env"," schema:",[513,721,725],{"className":722,"code":723,"filename":585,"language":724,"meta":519,"style":519},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import node from \"@astrojs\u002Fnode\";\nimport { defineConfig, envField } from \"astro\u002Fconfig\";\nimport tenonCms from \"tenoncms\u002Fastro\";\n\nexport default defineConfig({\n  output: \"server\",\n  adapter: node({ mode: \"standalone\" }),\n  integrations: [tenonCms()],\n  env: {\n    schema: {\n      TENON_SECRET: envField.string({ context: \"server\", access: \"secret\", min: 32 }),\n      DATABASE_URL: envField.string({\n        context: \"server\",\n        access: \"secret\",\n        default: \"file:.\u002Fcms.db\",\n      }),\n      TENON_SITE_URL: envField.string({\n        context: \"server\",\n        access: \"secret\",\n        url: true,\n        optional: true,\n      }),\n    },\n  },\n});\n","ts",[488,726,727,752,784,802,809,827,846,881,900,911,921,982,1000,1016,1032,1049,1059,1077,1092,1107,1121,1133,1142,1148,1154],{"__ignoreMap":519},[523,728,729,733,737,740,744,746,749],{"class":525,"line":526},[523,730,732],{"class":731},"s7zQu","import",[523,734,736],{"class":735},"sTEyZ"," node ",[523,738,739],{"class":731},"from",[523,741,743],{"class":742},"sMK4o"," \"",[523,745,616],{"class":532},[523,747,748],{"class":742},"\"",[523,750,751],{"class":742},";\n",[523,753,755,757,760,763,766,769,772,775,777,780,782],{"class":525,"line":754},2,[523,756,732],{"class":731},[523,758,759],{"class":742}," {",[523,761,762],{"class":735}," defineConfig",[523,764,765],{"class":742},",",[523,767,768],{"class":735}," envField",[523,770,771],{"class":742}," }",[523,773,774],{"class":731}," from",[523,776,743],{"class":742},[523,778,779],{"class":532},"astro\u002Fconfig",[523,781,748],{"class":742},[523,783,751],{"class":742},[523,785,787,789,792,794,796,798,800],{"class":525,"line":786},3,[523,788,732],{"class":731},[523,790,791],{"class":735}," tenonCms ",[523,793,739],{"class":731},[523,795,743],{"class":742},[523,797,490],{"class":532},[523,799,748],{"class":742},[523,801,751],{"class":742},[523,803,805],{"class":525,"line":804},4,[523,806,808],{"emptyLinePlaceholder":807},true,"\n",[523,810,812,815,818,821,824],{"class":525,"line":811},5,[523,813,814],{"class":731},"export",[523,816,817],{"class":731}," default",[523,819,762],{"class":820},"s2Zo4",[523,822,823],{"class":735},"(",[523,825,826],{"class":742},"{\n",[523,828,830,834,836,838,841,843],{"class":525,"line":829},6,[523,831,833],{"class":832},"swJcz","  output",[523,835,507],{"class":742},[523,837,743],{"class":742},[523,839,840],{"class":532},"server",[523,842,748],{"class":742},[523,844,845],{"class":742},",\n",[523,847,849,852,854,857,859,862,865,867,869,872,874,876,879],{"class":525,"line":848},7,[523,850,851],{"class":832},"  adapter",[523,853,507],{"class":742},[523,855,856],{"class":820}," node",[523,858,823],{"class":735},[523,860,861],{"class":742},"{",[523,863,864],{"class":832}," mode",[523,866,507],{"class":742},[523,868,743],{"class":742},[523,870,871],{"class":532},"standalone",[523,873,748],{"class":742},[523,875,771],{"class":742},[523,877,878],{"class":735},")",[523,880,845],{"class":742},[523,882,884,887,889,892,895,898],{"class":525,"line":883},8,[523,885,886],{"class":832},"  integrations",[523,888,507],{"class":742},[523,890,891],{"class":735}," [",[523,893,894],{"class":820},"tenonCms",[523,896,897],{"class":735},"()]",[523,899,845],{"class":742},[523,901,903,906,908],{"class":525,"line":902},9,[523,904,905],{"class":832},"  env",[523,907,507],{"class":742},[523,909,910],{"class":742}," {\n",[523,912,914,917,919],{"class":525,"line":913},10,[523,915,916],{"class":832},"    schema",[523,918,507],{"class":742},[523,920,910],{"class":742},[523,922,924,927,929,931,933,936,938,940,943,945,947,949,951,953,956,958,960,963,965,967,970,972,976,978,980],{"class":525,"line":923},11,[523,925,926],{"class":832},"      TENON_SECRET",[523,928,507],{"class":742},[523,930,768],{"class":735},[523,932,620],{"class":742},[523,934,935],{"class":820},"string",[523,937,823],{"class":735},[523,939,861],{"class":742},[523,941,942],{"class":832}," context",[523,944,507],{"class":742},[523,946,743],{"class":742},[523,948,840],{"class":532},[523,950,748],{"class":742},[523,952,765],{"class":742},[523,954,955],{"class":832}," access",[523,957,507],{"class":742},[523,959,743],{"class":742},[523,961,962],{"class":532},"secret",[523,964,748],{"class":742},[523,966,765],{"class":742},[523,968,969],{"class":832}," min",[523,971,507],{"class":742},[523,973,975],{"class":974},"sbssI"," 32",[523,977,771],{"class":742},[523,979,878],{"class":735},[523,981,845],{"class":742},[523,983,985,988,990,992,994,996,998],{"class":525,"line":984},12,[523,986,987],{"class":832},"      DATABASE_URL",[523,989,507],{"class":742},[523,991,768],{"class":735},[523,993,620],{"class":742},[523,995,935],{"class":820},[523,997,823],{"class":735},[523,999,826],{"class":742},[523,1001,1003,1006,1008,1010,1012,1014],{"class":525,"line":1002},13,[523,1004,1005],{"class":832},"        context",[523,1007,507],{"class":742},[523,1009,743],{"class":742},[523,1011,840],{"class":532},[523,1013,748],{"class":742},[523,1015,845],{"class":742},[523,1017,1019,1022,1024,1026,1028,1030],{"class":525,"line":1018},14,[523,1020,1021],{"class":832},"        access",[523,1023,507],{"class":742},[523,1025,743],{"class":742},[523,1027,962],{"class":532},[523,1029,748],{"class":742},[523,1031,845],{"class":742},[523,1033,1035,1038,1040,1042,1045,1047],{"class":525,"line":1034},15,[523,1036,1037],{"class":832},"        default",[523,1039,507],{"class":742},[523,1041,743],{"class":742},[523,1043,1044],{"class":532},"file:.\u002Fcms.db",[523,1046,748],{"class":742},[523,1048,845],{"class":742},[523,1050,1052,1055,1057],{"class":525,"line":1051},16,[523,1053,1054],{"class":742},"      }",[523,1056,878],{"class":735},[523,1058,845],{"class":742},[523,1060,1062,1065,1067,1069,1071,1073,1075],{"class":525,"line":1061},17,[523,1063,1064],{"class":832},"      TENON_SITE_URL",[523,1066,507],{"class":742},[523,1068,768],{"class":735},[523,1070,620],{"class":742},[523,1072,935],{"class":820},[523,1074,823],{"class":735},[523,1076,826],{"class":742},[523,1078,1080,1082,1084,1086,1088,1090],{"class":525,"line":1079},18,[523,1081,1005],{"class":832},[523,1083,507],{"class":742},[523,1085,743],{"class":742},[523,1087,840],{"class":532},[523,1089,748],{"class":742},[523,1091,845],{"class":742},[523,1093,1095,1097,1099,1101,1103,1105],{"class":525,"line":1094},19,[523,1096,1021],{"class":832},[523,1098,507],{"class":742},[523,1100,743],{"class":742},[523,1102,962],{"class":532},[523,1104,748],{"class":742},[523,1106,845],{"class":742},[523,1108,1110,1113,1115,1119],{"class":525,"line":1109},20,[523,1111,1112],{"class":832},"        url",[523,1114,507],{"class":742},[523,1116,1118],{"class":1117},"sfNiH"," true",[523,1120,845],{"class":742},[523,1122,1124,1127,1129,1131],{"class":525,"line":1123},21,[523,1125,1126],{"class":832},"        optional",[523,1128,507],{"class":742},[523,1130,1118],{"class":1117},[523,1132,845],{"class":742},[523,1134,1136,1138,1140],{"class":525,"line":1135},22,[523,1137,1054],{"class":742},[523,1139,878],{"class":735},[523,1141,845],{"class":742},[523,1143,1145],{"class":525,"line":1144},23,[523,1146,1147],{"class":742},"    },\n",[523,1149,1151],{"class":525,"line":1150},24,[523,1152,1153],{"class":742},"  },\n",[523,1155,1157,1160,1162],{"class":525,"line":1156},25,[523,1158,1159],{"class":742},"}",[523,1161,878],{"class":735},[523,1163,751],{"class":742},[484,1165,1166,1169,1170,1173],{},[488,1167,1168],{},"output: \"server\""," renders every page per request. Leave it out to keep prerendering, and set ",[488,1171,1172],{},"export const prerender = false"," on the pages that read live content.",[626,1175,1177],{"id":1176},"create-the-cms-instance","Create the CMS instance",[484,1179,1180,1181,1183,1184,507],{},"Create ",[488,1182,589],{}," at the project root. It reads the variables from ",[488,1185,1186],{},"astro:env\u002Fserver",[513,1188,1190],{"className":722,"code":1189,"filename":589,"language":724,"meta":519,"style":519},"import { DATABASE_URL, TENON_SECRET, TENON_SITE_URL } from \"astro:env\u002Fserver\";\nimport { defineCms } from \"tenoncms\";\nimport { libsql } from \"tenoncms\u002Flibsql\";\nimport { posts } from \".\u002Fcms\u002Fcollections\u002Fposts\";\n\nexport default defineCms({\n  collections: { posts },\n  database: libsql(DATABASE_URL),\n  secret: TENON_SECRET,\n  site: { url: TENON_SITE_URL, name: \"My Site\" },\n});\n",[488,1191,1192,1223,1245,1267,1289,1293,1305,1320,1334,1345,1378],{"__ignoreMap":519},[523,1193,1194,1196,1198,1201,1203,1206,1208,1211,1213,1215,1217,1219,1221],{"class":525,"line":526},[523,1195,732],{"class":731},[523,1197,759],{"class":742},[523,1199,1200],{"class":735}," DATABASE_URL",[523,1202,765],{"class":742},[523,1204,1205],{"class":735}," TENON_SECRET",[523,1207,765],{"class":742},[523,1209,1210],{"class":735}," TENON_SITE_URL",[523,1212,771],{"class":742},[523,1214,774],{"class":731},[523,1216,743],{"class":742},[523,1218,1186],{"class":532},[523,1220,748],{"class":742},[523,1222,751],{"class":742},[523,1224,1225,1227,1229,1232,1234,1236,1238,1241,1243],{"class":525,"line":754},[523,1226,732],{"class":731},[523,1228,759],{"class":742},[523,1230,1231],{"class":735}," defineCms",[523,1233,771],{"class":742},[523,1235,774],{"class":731},[523,1237,743],{"class":742},[523,1239,1240],{"class":532},"tenoncms",[523,1242,748],{"class":742},[523,1244,751],{"class":742},[523,1246,1247,1249,1251,1254,1256,1258,1260,1263,1265],{"class":525,"line":786},[523,1248,732],{"class":731},[523,1250,759],{"class":742},[523,1252,1253],{"class":735}," libsql",[523,1255,771],{"class":742},[523,1257,774],{"class":731},[523,1259,743],{"class":742},[523,1261,1262],{"class":532},"tenoncms\u002Flibsql",[523,1264,748],{"class":742},[523,1266,751],{"class":742},[523,1268,1269,1271,1273,1276,1278,1280,1282,1285,1287],{"class":525,"line":804},[523,1270,732],{"class":731},[523,1272,759],{"class":742},[523,1274,1275],{"class":735}," posts",[523,1277,771],{"class":742},[523,1279,774],{"class":731},[523,1281,743],{"class":742},[523,1283,1284],{"class":532},".\u002Fcms\u002Fcollections\u002Fposts",[523,1286,748],{"class":742},[523,1288,751],{"class":742},[523,1290,1291],{"class":525,"line":811},[523,1292,808],{"emptyLinePlaceholder":807},[523,1294,1295,1297,1299,1301,1303],{"class":525,"line":829},[523,1296,814],{"class":731},[523,1298,817],{"class":731},[523,1300,1231],{"class":820},[523,1302,823],{"class":735},[523,1304,826],{"class":742},[523,1306,1307,1310,1312,1314,1317],{"class":525,"line":848},[523,1308,1309],{"class":832},"  collections",[523,1311,507],{"class":742},[523,1313,759],{"class":742},[523,1315,1316],{"class":735}," posts ",[523,1318,1319],{"class":742},"},\n",[523,1321,1322,1325,1327,1329,1332],{"class":525,"line":883},[523,1323,1324],{"class":832},"  database",[523,1326,507],{"class":742},[523,1328,1253],{"class":820},[523,1330,1331],{"class":735},"(DATABASE_URL)",[523,1333,845],{"class":742},[523,1335,1336,1339,1341,1343],{"class":525,"line":902},[523,1337,1338],{"class":832},"  secret",[523,1340,507],{"class":742},[523,1342,1205],{"class":735},[523,1344,845],{"class":742},[523,1346,1347,1350,1352,1354,1357,1359,1361,1363,1366,1368,1370,1373,1375],{"class":525,"line":913},[523,1348,1349],{"class":832},"  site",[523,1351,507],{"class":742},[523,1353,759],{"class":742},[523,1355,1356],{"class":832}," url",[523,1358,507],{"class":742},[523,1360,1210],{"class":735},[523,1362,765],{"class":742},[523,1364,1365],{"class":832}," name",[523,1367,507],{"class":742},[523,1369,743],{"class":742},[523,1371,1372],{"class":532},"My Site",[523,1374,748],{"class":742},[523,1376,1377],{"class":742}," },\n",[523,1379,1380,1382,1384],{"class":525,"line":923},[523,1381,1159],{"class":742},[523,1383,878],{"class":735},[523,1385,751],{"class":742},[484,1387,1388,1389,1391,1392,620],{},"For the ",[488,1390,593],{}," collection, see ",[604,1393,1395],{"href":1394},"\u002Fdocs\u002Fcore\u002Fgetting-started\u002Fexisting-site#add-a-collection","Add a collection",[626,1397,1399],{"id":1398},"set-the-secret","Set the secret",[484,1401,1402,1403,1406,1407,507],{},"Generate a secret with ",[488,1404,1405],{},"openssl rand -hex 32"," and put it in ",[488,1408,1409],{},".env",[513,1411,1413],{"className":515,"code":1412,"filename":1409,"language":518,"meta":519,"style":519},"TENON_SECRET=\u003Cyour secret>\n",[488,1414,1415],{"__ignoreMap":519},[523,1416,1417,1420,1423,1426,1429],{"class":525,"line":526},[523,1418,1419],{"class":735},"TENON_SECRET",[523,1421,1422],{"class":742},"=\u003C",[523,1424,1425],{"class":532},"your",[523,1427,1428],{"class":529}," secret",[523,1430,1431],{"class":735},">\n",[484,1433,1434,1435,1437,1438,1441,1442,1445],{},"Keep ",[488,1436,1409],{},", ",[488,1439,1440],{},"cms.db*"," and ",[488,1443,1444],{},".uploads"," out of git.",[626,1447,1449],{"id":1448},"create-the-admin-account","Create the admin account",[484,1451,1452,1453,1455,1456,1458],{},"Run ",[488,1454,597],{}," and open ",[488,1457,601],{},". The first account you create is the admin.",[497,1460,1462],{"id":1461},"read-content","Read content",[484,1464,1465,1467,1468,507],{},[488,1466,494],{}," is the CMS instance, typed from ",[488,1469,589],{},[513,1471,1476],{"className":1472,"code":1473,"filename":1474,"language":1475,"meta":519,"style":519},"language-astro shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","---\nconst post = await Astro.locals.tenon.findOne(\"posts\", {\n  where: { slug: Astro.params.slug! },\n});\nif (!post) return new Response(null, { status: 404 });\n---\n\n\u003Ch1>{post.title}\u003C\u002Fh1>\n","src\u002Fpages\u002Fposts\u002F[slug].astro","astro",[488,1477,1478,1484,1529,1560,1568,1611,1615,1619],{"__ignoreMap":519},[523,1479,1480],{"class":525,"line":526},[523,1481,1483],{"class":1482},"sHwdD","---\n",[523,1485,1486,1490,1493,1496,1499,1502,1504,1507,1509,1512,1514,1517,1519,1521,1523,1525,1527],{"class":525,"line":754},[523,1487,1489],{"class":1488},"spNyl","const",[523,1491,1492],{"class":735}," post ",[523,1494,1495],{"class":742},"=",[523,1497,1498],{"class":731}," await",[523,1500,1501],{"class":735}," Astro",[523,1503,620],{"class":742},[523,1505,1506],{"class":735},"locals",[523,1508,620],{"class":742},[523,1510,1511],{"class":735},"tenon",[523,1513,620],{"class":742},[523,1515,1516],{"class":820},"findOne",[523,1518,823],{"class":735},[523,1520,748],{"class":742},[523,1522,593],{"class":532},[523,1524,748],{"class":742},[523,1526,765],{"class":742},[523,1528,910],{"class":742},[523,1530,1531,1534,1536,1538,1541,1543,1545,1547,1550,1552,1555,1558],{"class":525,"line":786},[523,1532,1533],{"class":832},"  where",[523,1535,507],{"class":742},[523,1537,759],{"class":742},[523,1539,1540],{"class":832}," slug",[523,1542,507],{"class":742},[523,1544,1501],{"class":735},[523,1546,620],{"class":742},[523,1548,1549],{"class":735},"params",[523,1551,620],{"class":742},[523,1553,1554],{"class":735},"slug",[523,1556,1557],{"class":742},"!",[523,1559,1377],{"class":742},[523,1561,1562,1564,1566],{"class":525,"line":804},[523,1563,1159],{"class":742},[523,1565,878],{"class":735},[523,1567,751],{"class":742},[523,1569,1570,1573,1576,1578,1581,1584,1587,1590,1592,1595,1597,1600,1602,1605,1607,1609],{"class":525,"line":811},[523,1571,1572],{"class":731},"if",[523,1574,1575],{"class":735}," (",[523,1577,1557],{"class":742},[523,1579,1580],{"class":735},"post) ",[523,1582,1583],{"class":731},"return",[523,1585,1586],{"class":742}," new",[523,1588,1589],{"class":820}," Response",[523,1591,823],{"class":735},[523,1593,1594],{"class":742},"null,",[523,1596,759],{"class":742},[523,1598,1599],{"class":832}," status",[523,1601,507],{"class":742},[523,1603,1604],{"class":974}," 404",[523,1606,771],{"class":742},[523,1608,878],{"class":735},[523,1610,751],{"class":742},[523,1612,1613],{"class":525,"line":829},[523,1614,1483],{"class":1482},[523,1616,1617],{"class":525,"line":848},[523,1618,808],{"emptyLinePlaceholder":807},[523,1620,1621,1624,1627,1630,1633,1635,1638,1641,1643],{"class":525,"line":883},[523,1622,1623],{"class":742},"\u003C",[523,1625,1626],{"class":832},"h1",[523,1628,1629],{"class":742},">{",[523,1631,1632],{"class":735},"post",[523,1634,620],{"class":742},[523,1636,1637],{"class":735},"title",[523,1639,1640],{"class":742},"}\u003C\u002F",[523,1642,1626],{"class":832},[523,1644,1431],{"class":742},[1646,1647,1648,1656,1659],"ul",{},[1649,1650,1651,1652,1655],"li",{},"On a page that renders per request, it belongs to the user of the request. An editor in the preview reads drafts, and the ",[604,1653,1654],{"href":206},"access rules"," apply. Everyone else reads published content.",[1649,1657,1658],{},"On a prerendered page, it is the plain instance. The page reads published content once, at build time, so the build needs the database.",[1649,1660,1661,1662,1665,1666,620],{},"Endpoints in ",[488,1663,1664],{},"src\u002Fpages\u002F"," get the same instance as ",[488,1667,1668],{},"context.locals.tenon",[484,1670,1671,1672,1675],{},"See ",[604,1673,1674],{"href":148},"Reading content"," for the read methods.",[497,1677,1679],{"id":1678},"render-and-preview","Render and preview",[484,1681,1682,1683,1686,1687,1437,1689,1437,1692,1437,1694,1437,1696,1441,1699,1702,1703,1706,1707,507],{},"The components of ",[488,1684,1685],{},"tenoncms\u002Fastro\u002Fcomponents"," render fields as HTML: ",[488,1688,76],{},[488,1690,1691],{},"Picture",[488,1693,80],{},[488,1695,56],{},[488,1697,1698],{},"Richtext",[488,1700,1701],{},"Seo",". This page assumes a ",[488,1704,1705],{},"cover"," image field and a rich text ",[488,1708,1709],{},"body",[513,1711,1713],{"className":1472,"code":1712,"filename":1474,"language":1475,"meta":519,"style":519},"---\nimport { Image, Richtext, Seo } from \"tenoncms\u002Fastro\u002Fcomponents\";\nimport { edit } from \"tenoncms\u002Fpreview\";\n\nconst post = await Astro.locals.tenon.findOne(\"posts\", {\n  where: { slug: Astro.params.slug! },\n});\nif (!post) return new Response(null, { status: 404 });\n---\n\n\u003Chtml lang=\"en\">\n  \u003Chead>\n    \u003CSeo page={post} \u002F>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1 data-cms={edit(\"posts\", post.id, \"title\")}>{post.title}\u003C\u002Fh1>\n    \u003CImage image={post.cover} sizes=\"(min-width: 720px) 720px, 100vw\" \u002F>\n    \u003CRichtext content={post.body} \u002F>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n",[488,1714,1715,1719,1750,1772,1776,1812,1838,1846,1880,1884,1888,1909,1919,1937,1946,1954,2011,2046,2065,2073],{"__ignoreMap":519},[523,1716,1717],{"class":525,"line":526},[523,1718,1483],{"class":1482},[523,1720,1721,1723,1725,1728,1730,1733,1735,1738,1740,1742,1744,1746,1748],{"class":525,"line":754},[523,1722,732],{"class":731},[523,1724,759],{"class":742},[523,1726,1727],{"class":735}," Image",[523,1729,765],{"class":742},[523,1731,1732],{"class":735}," Richtext",[523,1734,765],{"class":742},[523,1736,1737],{"class":735}," Seo",[523,1739,771],{"class":742},[523,1741,774],{"class":731},[523,1743,743],{"class":742},[523,1745,1685],{"class":532},[523,1747,748],{"class":742},[523,1749,751],{"class":742},[523,1751,1752,1754,1756,1759,1761,1763,1765,1768,1770],{"class":525,"line":786},[523,1753,732],{"class":731},[523,1755,759],{"class":742},[523,1757,1758],{"class":735}," edit",[523,1760,771],{"class":742},[523,1762,774],{"class":731},[523,1764,743],{"class":742},[523,1766,1767],{"class":532},"tenoncms\u002Fpreview",[523,1769,748],{"class":742},[523,1771,751],{"class":742},[523,1773,1774],{"class":525,"line":804},[523,1775,808],{"emptyLinePlaceholder":807},[523,1777,1778,1780,1782,1784,1786,1788,1790,1792,1794,1796,1798,1800,1802,1804,1806,1808,1810],{"class":525,"line":811},[523,1779,1489],{"class":1488},[523,1781,1492],{"class":735},[523,1783,1495],{"class":742},[523,1785,1498],{"class":731},[523,1787,1501],{"class":735},[523,1789,620],{"class":742},[523,1791,1506],{"class":735},[523,1793,620],{"class":742},[523,1795,1511],{"class":735},[523,1797,620],{"class":742},[523,1799,1516],{"class":820},[523,1801,823],{"class":735},[523,1803,748],{"class":742},[523,1805,593],{"class":532},[523,1807,748],{"class":742},[523,1809,765],{"class":742},[523,1811,910],{"class":742},[523,1813,1814,1816,1818,1820,1822,1824,1826,1828,1830,1832,1834,1836],{"class":525,"line":829},[523,1815,1533],{"class":832},[523,1817,507],{"class":742},[523,1819,759],{"class":742},[523,1821,1540],{"class":832},[523,1823,507],{"class":742},[523,1825,1501],{"class":735},[523,1827,620],{"class":742},[523,1829,1549],{"class":735},[523,1831,620],{"class":742},[523,1833,1554],{"class":735},[523,1835,1557],{"class":742},[523,1837,1377],{"class":742},[523,1839,1840,1842,1844],{"class":525,"line":848},[523,1841,1159],{"class":742},[523,1843,878],{"class":735},[523,1845,751],{"class":742},[523,1847,1848,1850,1852,1854,1856,1858,1860,1862,1864,1866,1868,1870,1872,1874,1876,1878],{"class":525,"line":883},[523,1849,1572],{"class":731},[523,1851,1575],{"class":735},[523,1853,1557],{"class":742},[523,1855,1580],{"class":735},[523,1857,1583],{"class":731},[523,1859,1586],{"class":742},[523,1861,1589],{"class":820},[523,1863,823],{"class":735},[523,1865,1594],{"class":742},[523,1867,759],{"class":742},[523,1869,1599],{"class":832},[523,1871,507],{"class":742},[523,1873,1604],{"class":974},[523,1875,771],{"class":742},[523,1877,878],{"class":735},[523,1879,751],{"class":742},[523,1881,1882],{"class":525,"line":902},[523,1883,1483],{"class":1482},[523,1885,1886],{"class":525,"line":913},[523,1887,808],{"emptyLinePlaceholder":807},[523,1889,1890,1892,1895,1898,1900,1902,1905,1907],{"class":525,"line":923},[523,1891,1623],{"class":742},[523,1893,1894],{"class":832},"html",[523,1896,1897],{"class":1488}," lang",[523,1899,1495],{"class":742},[523,1901,748],{"class":742},[523,1903,1904],{"class":532},"en",[523,1906,748],{"class":742},[523,1908,1431],{"class":742},[523,1910,1911,1914,1917],{"class":525,"line":984},[523,1912,1913],{"class":742},"  \u003C",[523,1915,1916],{"class":832},"head",[523,1918,1431],{"class":742},[523,1920,1921,1924,1926,1929,1932,1934],{"class":525,"line":1002},[523,1922,1923],{"class":742},"    \u003C",[523,1925,1701],{"class":529},[523,1927,1928],{"class":1488}," page",[523,1930,1931],{"class":742},"={",[523,1933,1632],{"class":735},[523,1935,1936],{"class":742},"} \u002F>\n",[523,1938,1939,1942,1944],{"class":525,"line":1018},[523,1940,1941],{"class":742},"  \u003C\u002F",[523,1943,1916],{"class":832},[523,1945,1431],{"class":742},[523,1947,1948,1950,1952],{"class":525,"line":1034},[523,1949,1913],{"class":742},[523,1951,1709],{"class":832},[523,1953,1431],{"class":742},[523,1955,1956,1958,1960,1963,1965,1968,1970,1972,1974,1976,1978,1981,1983,1986,1988,1990,1992,1994,1996,1999,2001,2003,2005,2007,2009],{"class":525,"line":1051},[523,1957,1923],{"class":742},[523,1959,1626],{"class":832},[523,1961,1962],{"class":1488}," data-cms",[523,1964,1931],{"class":742},[523,1966,1967],{"class":820},"edit",[523,1969,823],{"class":735},[523,1971,748],{"class":742},[523,1973,593],{"class":532},[523,1975,748],{"class":742},[523,1977,765],{"class":742},[523,1979,1980],{"class":735}," post",[523,1982,620],{"class":742},[523,1984,1985],{"class":735},"id",[523,1987,765],{"class":742},[523,1989,743],{"class":742},[523,1991,1637],{"class":532},[523,1993,748],{"class":742},[523,1995,878],{"class":735},[523,1997,1998],{"class":742},"}>{",[523,2000,1632],{"class":735},[523,2002,620],{"class":742},[523,2004,1637],{"class":735},[523,2006,1640],{"class":742},[523,2008,1626],{"class":832},[523,2010,1431],{"class":742},[523,2012,2013,2015,2017,2020,2022,2024,2026,2028,2031,2034,2036,2038,2041,2043],{"class":525,"line":1061},[523,2014,1923],{"class":742},[523,2016,76],{"class":529},[523,2018,2019],{"class":1488}," image",[523,2021,1931],{"class":742},[523,2023,1632],{"class":735},[523,2025,620],{"class":742},[523,2027,1705],{"class":735},[523,2029,2030],{"class":742},"} ",[523,2032,2033],{"class":1488},"sizes",[523,2035,1495],{"class":742},[523,2037,748],{"class":742},[523,2039,2040],{"class":532},"(min-width: 720px) 720px, 100vw",[523,2042,748],{"class":742},[523,2044,2045],{"class":742}," \u002F>\n",[523,2047,2048,2050,2052,2055,2057,2059,2061,2063],{"class":525,"line":1079},[523,2049,1923],{"class":742},[523,2051,1698],{"class":529},[523,2053,2054],{"class":1488}," content",[523,2056,1931],{"class":742},[523,2058,1632],{"class":735},[523,2060,620],{"class":742},[523,2062,1709],{"class":735},[523,2064,1936],{"class":742},[523,2066,2067,2069,2071],{"class":525,"line":1094},[523,2068,1941],{"class":742},[523,2070,1709],{"class":832},[523,2072,1431],{"class":742},[523,2074,2075,2078,2080],{"class":525,"line":1109},[523,2076,2077],{"class":742},"\u003C\u002F",[523,2079,1894],{"class":832},[523,2081,1431],{"class":742},[1646,2083,2084,2099,2109],{},[1649,2085,2086,2088,2089,1441,2092,2095,2096,620],{},[488,2087,1701],{}," reads the ",[488,2090,2091],{},"general",[488,2093,2094],{},"seo"," settings itself when you do not pass them. See ",[604,2097,184],{"href":2098},"\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fcomponents#seo",[1649,2100,2101,2102,2105,2106,620],{},"The integration adds the live preview to every page. Mark what a field renders with ",[488,2103,2104],{},"edit()",". After each save, the page renders again in the background. See ",[604,2107,2108],{"href":193},"Live preview",[1649,2110,2111,2112,1437,2116,2119,2120,2123],{},"With ",[604,2113,2115],{"href":2114},"\u002Fdocs\u002Fcore\u002Fworking-with-content\u002Flocalization#per-framework","localization",[488,2117,2118],{},"Astro.locals.locale"," holds the language of the URL and ",[488,2121,2122],{},"Astro.locals.path"," the path without the language prefix.",[497,2125,2127],{"id":2126},"integration-options","Integration options",[484,2129,2130,2131,507],{},"Pass the options to ",[488,2132,714],{},[513,2134,2136],{"className":722,"code":2135,"filename":585,"language":724,"meta":519,"style":519},"integrations: [tenonCms({ jobs: false })],\n",[488,2137,2138],{"__ignoreMap":519},[523,2139,2140,2143,2145,2147,2149,2151,2153,2156,2158,2161,2163,2166],{"class":525,"line":526},[523,2141,2142],{"class":529},"integrations",[523,2144,507],{"class":742},[523,2146,891],{"class":735},[523,2148,894],{"class":820},[523,2150,823],{"class":735},[523,2152,861],{"class":742},[523,2154,2155],{"class":832}," jobs",[523,2157,507],{"class":742},[523,2159,2160],{"class":1117}," false",[523,2162,771],{"class":742},[523,2164,2165],{"class":735},")]",[523,2167,845],{"class":742},[2169,2170,2171,2179,2187,2210,2223],"field-group",{},[2172,2173,2175,2176,620],"field",{"name":2174,"type":935},"entry","The file that exports the CMS instance, relative to the project root. Default: ",[488,2177,2178],{},"\".\u002Ftenon.config.ts\"",[2172,2180,2183,2184,620],{"name":2181,"type":2182},"preview","boolean","Adds the live preview and the admin bar to every page. Default: ",[488,2185,2186],{},"true",[2172,2188,2190,2191,2194,2195,2197,2198,2201,2202,2205,2206,620],{"name":2189,"type":2182},"sitemap","Serves ",[488,2192,2193],{},"\u002Fsitemap.xml"," from the CMS. Default: ",[488,2196,2186],{},". Your own ",[488,2199,2200],{},"src\u002Fpages\u002Fsitemap.xml.ts"," or ",[488,2203,2204],{},"public\u002Fsitemap.xml"," wins. See ",[604,2207,2209],{"href":2208},"\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo#sitemap-and-robotstxt","Sitemap and robots.txt",[2172,2211,2190,2213,2194,2216,2218,2219,2222],{"name":2212,"type":2182},"robots",[488,2214,2215],{},"\u002Frobots.txt",[488,2217,2186],{},". Your own route or ",[488,2220,2221],{},"public\u002Frobots.txt"," wins.",[2172,2224,2226,2227,2229,2230,2232,2233,2236,2237,620],{"name":2225,"type":2182},"jobs","Runs due jobs every minute. Default: ",[488,2228,2186],{},". The timer runs with ",[488,2231,616],{}," and in ",[488,2234,2235],{},"astro dev",". On Cloudflare, the Durable Object runs them. On Vercel, nothing does. See ",[604,2238,281],{"href":282},[484,2240,2241,2242,2245,2246,2248,2249,620],{},"The integration reads ",[488,2243,2244],{},"admin.path"," from ",[488,2247,589],{}," at startup. Restart the dev server after you change it. See ",[604,2250,2252],{"href":2251},"\u002Fdocs\u002Fcore\u002Fcustomization\u002Fadmin#admin-path","Admin path",[497,2254,2256],{"id":2255},"deploy","Deploy",[2258,2259,2260,2267,2274],"card-group",{},[2261,2262,2264,2266],"card",{"icon":2263,"title":390,"to":391},"i-simple-icons-nodedotjs",[488,2265,616],{}," on a server or in a container.",[2261,2268,2270,2273],{"icon":2269,"title":394,"to":395},"i-simple-icons-vercel",[488,2271,2272],{},"@astrojs\u002Fvercel",", with Postgres or Turso and a bucket.",[2261,2275,2277,2280],{"icon":2276,"title":259,"to":398},"i-simple-icons-cloudflare",[488,2278,2279],{},"@astrojs\u002Fcloudflare",", with the CMS in a Durable Object.",[497,2282,2284],{"id":2283},"related-resources","Related resources",[1646,2286,2287,2292,2300,2305,2310],{},[1649,2288,2289,2291],{},[604,2290,24],{"href":25},": the full setup, with a first page.",[1649,2293,2294,2296,2297,2299],{},[604,2295,28],{"href":29},": ",[488,2298,589],{}," and the environment variables.",[1649,2301,2302,2304],{},[604,2303,184],{"href":185},": every component and its props.",[1649,2306,2307,2309],{},[604,2308,2108],{"href":193},": mark elements and prerendered pages.",[1649,2311,2312,2314],{},[604,2313,167],{"href":168},": languages in the URL.",[2316,2317,2318],"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 .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":519,"searchDepth":754,"depth":754,"links":2320},[2321,2322,2329,2330,2331,2332,2333],{"id":499,"depth":754,"text":500},{"id":609,"depth":754,"text":610,"children":2323},[2324,2325,2326,2327,2328],{"id":628,"depth":786,"text":629},{"id":707,"depth":786,"text":708},{"id":1176,"depth":786,"text":1177},{"id":1398,"depth":786,"text":1399},{"id":1448,"depth":786,"text":1449},{"id":1461,"depth":754,"text":1462},{"id":1678,"depth":754,"text":1679},{"id":2126,"depth":754,"text":2127},{"id":2255,"depth":754,"text":2256},{"id":2283,"depth":754,"text":2284},"Set up Tenon in an Astro project.","md",null,{},{"title":364,"description":2334},"i1SgqAvTc8tbXMAQqQQ6MOVGHxTEITUnyjKcl4-u76A",[2341,2343],{"title":50,"path":359,"stem":360,"description":2342,"children":-1},"How Tenon connects to a framework, and which guide to follow.",{"title":368,"path":369,"stem":370,"description":2344,"children":-1},"Set up Tenon in a Nuxt project.",1795884658106]