[{"data":1,"prerenderedAt":1973},["ShallowReactive",2],{"navigation_docs":3,"-docs-core-content-modeling-collections-and-globals":478,"-docs-core-content-modeling-collections-and-globals-surround":1968},[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":41,"body":480,"description":1962,"extension":1963,"links":1964,"meta":1965,"navigation":560,"path":42,"seo":1966,"stem":43,"__hash__":1967},"docs\u002Fdocs\u002F1.core\u002F2.content-modeling\u002F1.collections-and-globals.md",{"type":481,"value":482,"toc":1955},"minimark",[483,496,501,509,796,803,958,1054,1063,1085,1089,1098,1223,1267,1302,1309,1328,1332,1335,1496,1503,1736,1739,1747,1751,1754,1912,1945,1951],[484,485,486,487,491,492,495],"p",{},"You describe your content in TypeScript. A ",[488,489,490],"strong",{},"collection"," is a list of documents with the same fields, like posts. A ",[488,493,494],{},"global"," is one document per name, like the site settings. Both are plain objects, and the types of your documents come from them.",[497,498,500],"h2",{"id":499},"collections","Collections",[484,502,503,504,508],{},"A collection holds many documents that share one set of fields. Define it with ",[505,506,507],"code",{},"defineCollection()",", usually in its own file:",[510,511,517],"pre",{"className":512,"code":513,"filename":514,"language":515,"meta":516,"style":516},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineCollection } from \"tenoncms\";\n\nexport const posts = defineCollection({\n  label: \"Posts\",\n  titleField: \"title\",\n  permalink: \"\u002Fposts\u002F{slug}\",\n  fields: {\n    title: { type: \"text\", required: true },\n    slug: { type: \"slug\", from: \"title\", unique: true },\n    date: { type: \"date\" },\n    body: { type: \"richtext\" },\n  },\n});\n","cms\u002Fcollections\u002Fposts.ts","ts","",[505,518,519,555,562,587,607,624,641,652,689,733,756,779,785],{"__ignoreMap":516},[520,521,524,528,532,536,539,542,545,549,552],"span",{"class":522,"line":523},"line",1,[520,525,527],{"class":526},"s7zQu","import",[520,529,531],{"class":530},"sMK4o"," {",[520,533,535],{"class":534},"sTEyZ"," defineCollection",[520,537,538],{"class":530}," }",[520,540,541],{"class":526}," from",[520,543,544],{"class":530}," \"",[520,546,548],{"class":547},"sfazB","tenoncms",[520,550,551],{"class":530},"\"",[520,553,554],{"class":530},";\n",[520,556,558],{"class":522,"line":557},2,[520,559,561],{"emptyLinePlaceholder":560},true,"\n",[520,563,565,568,572,575,578,581,584],{"class":522,"line":564},3,[520,566,567],{"class":526},"export",[520,569,571],{"class":570},"spNyl"," const",[520,573,574],{"class":534}," posts ",[520,576,577],{"class":530},"=",[520,579,535],{"class":580},"s2Zo4",[520,582,583],{"class":534},"(",[520,585,586],{"class":530},"{\n",[520,588,590,594,597,599,602,604],{"class":522,"line":589},4,[520,591,593],{"class":592},"swJcz","  label",[520,595,596],{"class":530},":",[520,598,544],{"class":530},[520,600,601],{"class":547},"Posts",[520,603,551],{"class":530},[520,605,606],{"class":530},",\n",[520,608,610,613,615,617,620,622],{"class":522,"line":609},5,[520,611,612],{"class":592},"  titleField",[520,614,596],{"class":530},[520,616,544],{"class":530},[520,618,619],{"class":547},"title",[520,621,551],{"class":530},[520,623,606],{"class":530},[520,625,627,630,632,634,637,639],{"class":522,"line":626},6,[520,628,629],{"class":592},"  permalink",[520,631,596],{"class":530},[520,633,544],{"class":530},[520,635,636],{"class":547},"\u002Fposts\u002F{slug}",[520,638,551],{"class":530},[520,640,606],{"class":530},[520,642,644,647,649],{"class":522,"line":643},7,[520,645,646],{"class":592},"  fields",[520,648,596],{"class":530},[520,650,651],{"class":530}," {\n",[520,653,655,658,660,662,665,667,669,672,674,677,680,682,686],{"class":522,"line":654},8,[520,656,657],{"class":592},"    title",[520,659,596],{"class":530},[520,661,531],{"class":530},[520,663,664],{"class":592}," type",[520,666,596],{"class":530},[520,668,544],{"class":530},[520,670,671],{"class":547},"text",[520,673,551],{"class":530},[520,675,676],{"class":530},",",[520,678,679],{"class":592}," required",[520,681,596],{"class":530},[520,683,685],{"class":684},"sfNiH"," true",[520,687,688],{"class":530}," },\n",[520,690,692,695,697,699,701,703,705,708,710,712,714,716,718,720,722,724,727,729,731],{"class":522,"line":691},9,[520,693,694],{"class":592},"    slug",[520,696,596],{"class":530},[520,698,531],{"class":530},[520,700,664],{"class":592},[520,702,596],{"class":530},[520,704,544],{"class":530},[520,706,707],{"class":547},"slug",[520,709,551],{"class":530},[520,711,676],{"class":530},[520,713,541],{"class":592},[520,715,596],{"class":530},[520,717,544],{"class":530},[520,719,619],{"class":547},[520,721,551],{"class":530},[520,723,676],{"class":530},[520,725,726],{"class":592}," unique",[520,728,596],{"class":530},[520,730,685],{"class":684},[520,732,688],{"class":530},[520,734,736,739,741,743,745,747,749,752,754],{"class":522,"line":735},10,[520,737,738],{"class":592},"    date",[520,740,596],{"class":530},[520,742,531],{"class":530},[520,744,664],{"class":592},[520,746,596],{"class":530},[520,748,544],{"class":530},[520,750,751],{"class":547},"date",[520,753,551],{"class":530},[520,755,688],{"class":530},[520,757,759,762,764,766,768,770,772,775,777],{"class":522,"line":758},11,[520,760,761],{"class":592},"    body",[520,763,596],{"class":530},[520,765,531],{"class":530},[520,767,664],{"class":592},[520,769,596],{"class":530},[520,771,544],{"class":530},[520,773,774],{"class":547},"richtext",[520,776,551],{"class":530},[520,778,688],{"class":530},[520,780,782],{"class":522,"line":781},12,[520,783,784],{"class":530},"  },\n",[520,786,788,791,794],{"class":522,"line":787},13,[520,789,790],{"class":530},"}",[520,792,793],{"class":534},")",[520,795,554],{"class":530},[484,797,798,799,802],{},"Register it in ",[505,800,801],{},"tenon.config.ts",". The key is the name you read it by:",[510,804,806],{"className":512,"code":805,"filename":801,"language":515,"meta":516,"style":516},"import { defineCms } from \"tenoncms\";\nimport { sqlite } from \"tenoncms\u002Fsqlite\";\nimport { posts } from \".\u002Fcms\u002Fcollections\u002Fposts\";\n\nexport default defineCms({\n  database: sqlite(\".\u002Fcms.db\"),\n  secret: process.env.TENON_SECRET!,\n  collections: { posts },\n});\n",[505,807,808,829,851,873,877,890,912,936,950],{"__ignoreMap":516},[520,809,810,812,814,817,819,821,823,825,827],{"class":522,"line":523},[520,811,527],{"class":526},[520,813,531],{"class":530},[520,815,816],{"class":534}," defineCms",[520,818,538],{"class":530},[520,820,541],{"class":526},[520,822,544],{"class":530},[520,824,548],{"class":547},[520,826,551],{"class":530},[520,828,554],{"class":530},[520,830,831,833,835,838,840,842,844,847,849],{"class":522,"line":557},[520,832,527],{"class":526},[520,834,531],{"class":530},[520,836,837],{"class":534}," sqlite",[520,839,538],{"class":530},[520,841,541],{"class":526},[520,843,544],{"class":530},[520,845,846],{"class":547},"tenoncms\u002Fsqlite",[520,848,551],{"class":530},[520,850,554],{"class":530},[520,852,853,855,857,860,862,864,866,869,871],{"class":522,"line":564},[520,854,527],{"class":526},[520,856,531],{"class":530},[520,858,859],{"class":534}," posts",[520,861,538],{"class":530},[520,863,541],{"class":526},[520,865,544],{"class":530},[520,867,868],{"class":547},".\u002Fcms\u002Fcollections\u002Fposts",[520,870,551],{"class":530},[520,872,554],{"class":530},[520,874,875],{"class":522,"line":589},[520,876,561],{"emptyLinePlaceholder":560},[520,878,879,881,884,886,888],{"class":522,"line":609},[520,880,567],{"class":526},[520,882,883],{"class":526}," default",[520,885,816],{"class":580},[520,887,583],{"class":534},[520,889,586],{"class":530},[520,891,892,895,897,899,901,903,906,908,910],{"class":522,"line":626},[520,893,894],{"class":592},"  database",[520,896,596],{"class":530},[520,898,837],{"class":580},[520,900,583],{"class":534},[520,902,551],{"class":530},[520,904,905],{"class":547},".\u002Fcms.db",[520,907,551],{"class":530},[520,909,793],{"class":534},[520,911,606],{"class":530},[520,913,914,917,919,922,925,928,930,933],{"class":522,"line":643},[520,915,916],{"class":592},"  secret",[520,918,596],{"class":530},[520,920,921],{"class":534}," process",[520,923,924],{"class":530},".",[520,926,927],{"class":534},"env",[520,929,924],{"class":530},[520,931,932],{"class":534},"TENON_SECRET",[520,934,935],{"class":530},"!,\n",[520,937,938,941,943,945,947],{"class":522,"line":654},[520,939,940],{"class":592},"  collections",[520,942,596],{"class":530},[520,944,531],{"class":530},[520,946,574],{"class":534},[520,948,949],{"class":530},"},\n",[520,951,952,954,956],{"class":522,"line":691},[520,953,790],{"class":530},[520,955,793],{"class":534},[520,957,554],{"class":530},[510,959,961],{"className":512,"code":960,"language":515,"meta":516,"style":516},"const all = await cms.find(\"posts\");\nconst one = await cms.findOne(\"posts\", { where: { slug: \"hello-world\" } });\n",[505,962,963,997],{"__ignoreMap":516},[520,964,965,968,971,973,976,979,981,984,986,988,991,993,995],{"class":522,"line":523},[520,966,967],{"class":570},"const",[520,969,970],{"class":534}," all ",[520,972,577],{"class":530},[520,974,975],{"class":526}," await",[520,977,978],{"class":534}," cms",[520,980,924],{"class":530},[520,982,983],{"class":580},"find",[520,985,583],{"class":534},[520,987,551],{"class":530},[520,989,990],{"class":547},"posts",[520,992,551],{"class":530},[520,994,793],{"class":534},[520,996,554],{"class":530},[520,998,999,1001,1004,1006,1008,1010,1012,1015,1017,1019,1021,1023,1025,1027,1030,1032,1034,1037,1039,1041,1044,1046,1048,1050,1052],{"class":522,"line":557},[520,1000,967],{"class":570},[520,1002,1003],{"class":534}," one ",[520,1005,577],{"class":530},[520,1007,975],{"class":526},[520,1009,978],{"class":534},[520,1011,924],{"class":530},[520,1013,1014],{"class":580},"findOne",[520,1016,583],{"class":534},[520,1018,551],{"class":530},[520,1020,990],{"class":547},[520,1022,551],{"class":530},[520,1024,676],{"class":530},[520,1026,531],{"class":530},[520,1028,1029],{"class":592}," where",[520,1031,596],{"class":530},[520,1033,531],{"class":530},[520,1035,1036],{"class":592}," slug",[520,1038,596],{"class":530},[520,1040,544],{"class":530},[520,1042,1043],{"class":547},"hello-world",[520,1045,551],{"class":530},[520,1047,538],{"class":530},[520,1049,538],{"class":530},[520,1051,793],{"class":534},[520,1053,554],{"class":530},[1055,1056,1057,1058,1060,1061,924],"tip",{},"While these examples show that collections should be in there own files, they don't have to be. ",[505,1059,507],{}," only adds types. You can also write the object straight into ",[505,1062,499],{},[1064,1065,1066,1067,1070,1071,1070,1074,1070,1077,1080,1081,1084],"warning",{},"Every document also gets ",[505,1068,1069],{},"id",", ",[505,1072,1073],{},"createdAt",[505,1075,1076],{},"updatedAt",[505,1078,1079],{},"publishedAt"," and ",[505,1082,1083],{},"hasDraft",". Do not use these names for your own fields.",[497,1086,1088],{"id":1087},"globals","Globals",[484,1090,1091,1092,1094,1095,596],{},"A global is a single document, such as a footer, a cookie banner or contact details. It has no list and no ",[505,1093,1069],{}," to look up. Define it with ",[505,1096,1097],{},"defineGlobal()",[510,1099,1102],{"className":512,"code":1100,"filename":1101,"language":515,"meta":516,"style":516},"import { defineGlobal } from \"tenoncms\";\n\nexport const footer = defineGlobal({\n  label: \"Footer\",\n  fields: {\n    copyright: { type: \"text\" },\n    email: { type: \"text\" },\n  },\n});\n","cms\u002Fglobals\u002Ffooter.ts",[505,1103,1104,1125,1129,1146,1161,1169,1190,1211,1215],{"__ignoreMap":516},[520,1105,1106,1108,1110,1113,1115,1117,1119,1121,1123],{"class":522,"line":523},[520,1107,527],{"class":526},[520,1109,531],{"class":530},[520,1111,1112],{"class":534}," defineGlobal",[520,1114,538],{"class":530},[520,1116,541],{"class":526},[520,1118,544],{"class":530},[520,1120,548],{"class":547},[520,1122,551],{"class":530},[520,1124,554],{"class":530},[520,1126,1127],{"class":522,"line":557},[520,1128,561],{"emptyLinePlaceholder":560},[520,1130,1131,1133,1135,1138,1140,1142,1144],{"class":522,"line":564},[520,1132,567],{"class":526},[520,1134,571],{"class":570},[520,1136,1137],{"class":534}," footer ",[520,1139,577],{"class":530},[520,1141,1112],{"class":580},[520,1143,583],{"class":534},[520,1145,586],{"class":530},[520,1147,1148,1150,1152,1154,1157,1159],{"class":522,"line":589},[520,1149,593],{"class":592},[520,1151,596],{"class":530},[520,1153,544],{"class":530},[520,1155,1156],{"class":547},"Footer",[520,1158,551],{"class":530},[520,1160,606],{"class":530},[520,1162,1163,1165,1167],{"class":522,"line":609},[520,1164,646],{"class":592},[520,1166,596],{"class":530},[520,1168,651],{"class":530},[520,1170,1171,1174,1176,1178,1180,1182,1184,1186,1188],{"class":522,"line":626},[520,1172,1173],{"class":592},"    copyright",[520,1175,596],{"class":530},[520,1177,531],{"class":530},[520,1179,664],{"class":592},[520,1181,596],{"class":530},[520,1183,544],{"class":530},[520,1185,671],{"class":547},[520,1187,551],{"class":530},[520,1189,688],{"class":530},[520,1191,1192,1195,1197,1199,1201,1203,1205,1207,1209],{"class":522,"line":643},[520,1193,1194],{"class":592},"    email",[520,1196,596],{"class":530},[520,1198,531],{"class":530},[520,1200,664],{"class":592},[520,1202,596],{"class":530},[520,1204,544],{"class":530},[520,1206,671],{"class":547},[520,1208,551],{"class":530},[520,1210,688],{"class":530},[520,1212,1213],{"class":522,"line":654},[520,1214,784],{"class":530},[520,1216,1217,1219,1221],{"class":522,"line":691},[520,1218,790],{"class":530},[520,1220,793],{"class":534},[520,1222,554],{"class":530},[510,1224,1226],{"className":512,"code":1225,"filename":801,"language":515,"meta":516,"style":516},"export default defineCms({\n  \u002F\u002F ...\n  globals: { footer },\n});\n",[505,1227,1228,1240,1246,1259],{"__ignoreMap":516},[520,1229,1230,1232,1234,1236,1238],{"class":522,"line":523},[520,1231,567],{"class":526},[520,1233,883],{"class":526},[520,1235,816],{"class":580},[520,1237,583],{"class":534},[520,1239,586],{"class":530},[520,1241,1242],{"class":522,"line":557},[520,1243,1245],{"class":1244},"sHwdD","  \u002F\u002F ...\n",[520,1247,1248,1251,1253,1255,1257],{"class":522,"line":564},[520,1249,1250],{"class":592},"  globals",[520,1252,596],{"class":530},[520,1254,531],{"class":530},[520,1256,1137],{"class":534},[520,1258,949],{"class":530},[520,1260,1261,1263,1265],{"class":522,"line":589},[520,1262,790],{"class":530},[520,1264,793],{"class":534},[520,1266,554],{"class":530},[510,1268,1270],{"className":512,"code":1269,"language":515,"meta":516,"style":516},"const footer = await cms.getGlobal(\"footer\");\n",[505,1271,1272],{"__ignoreMap":516},[520,1273,1274,1276,1278,1280,1282,1284,1286,1289,1291,1293,1296,1298,1300],{"class":522,"line":523},[520,1275,967],{"class":570},[520,1277,1137],{"class":534},[520,1279,577],{"class":530},[520,1281,975],{"class":526},[520,1283,978],{"class":534},[520,1285,924],{"class":530},[520,1287,1288],{"class":580},"getGlobal",[520,1290,583],{"class":534},[520,1292,551],{"class":530},[520,1294,1295],{"class":547},"footer",[520,1297,551],{"class":530},[520,1299,793],{"class":534},[520,1301,554],{"class":530},[484,1303,1304,1305,1308],{},"A global that was never saved reads as ",[505,1306,1307],{},"{}",". Handle missing values in your templates.",[1310,1311,1312,1313,1316,1317,1320,1321,1323,1324,924],"note",{},"Tenon adds two globals on its own: ",[505,1314,1315],{},"general"," (site title, tagline, favicon) and ",[505,1318,1319],{},"seo"," (title template, description, share image). They live on the admin's ",[488,1322,134],{}," page. See ",[1325,1326,180],"a",{"href":1327},"\u002Fdocs\u002Fcore\u002Fbuilding-your-site\u002Fpages-and-seo#site-settings",[497,1329,1331],{"id":1330},"options","Options",[484,1333,1334],{},"Collections and globals take the same options, except where the table says otherwise.",[1336,1337,1338,1346,1351,1355,1361,1372,1383,1389,1398,1406,1412],"field-group",{},[1339,1340,1343,1344,924],"field",{"name":1341,"type":45,":required":1342},"fields","true","The fields of each document. See ",[1325,1345,45],{"href":46},[1339,1347,1350],{"name":1348,"type":1349},"label","string | { en, de, … }","The name in the admin. Defaults to the key. Pass an object to translate it.",[1339,1352,1354],{"name":1353,"type":1349},"description","Short text under the name, above the form and on the Settings page.",[1339,1356,1360],{"name":1357,"type":1358,":badges":1359},"titleField","string","[{\"label\":\"Collections only\",\"color\":\"callout\"}]","The field the admin shows in lists and pickers. Defaults to the first field.",[1339,1362,1364,1365,1367,1368,1371],{"name":1363,"type":1358},"permalink","If you want to serve a collection through a route, like ",[505,1366,636],{}," you have to set the permalink. E.g. ",[505,1369,1370],{},"{slug}"," is a field placeholder on that document. You can also choose another field or even multiple. The sitemap, links and the live preview use it.",[1339,1373,1376,1377,1380,1381,924],{"name":1374,"type":1375},"localized","boolean","Store the values per language. Default ",[505,1378,1379],{},"false",". See ",[1325,1382,167],{"href":168},[1339,1384,1386,1387,924],{"name":1385,"type":1375},"drafts","Keep a draft next to the published version. Default ",[505,1388,1342],{},[1339,1390,1392,1393,1395,1396,924],{"name":1391,"type":1375},"schedule","Editors can plan a publish or unpublish for later. Needs ",[505,1394,1385],{},". Default ",[505,1397,1379],{},[1339,1399,1402,1403,924],{"name":1400,"type":1401},"access","Access","Who can read, create, update and delete. By default, everyone reads published content and signed-in users do the rest. See ",[1325,1404,1405],{"href":206},"Access control",[1339,1407,1409,1410,924],{"name":1408,"type":171},"hooks","Functions that run on reads, writes and deletes. See ",[1325,1411,171],{"href":172},[1339,1413,1416,1434,1462,1476,1484],{"name":1414,"type":1415},"nav","{ display, group, icon, order }",[484,1417,1418,1419,1422,1423,1429,1430,1433],{},"Where the entry shows in the admin. ",[505,1420,1421],{},"icon"," is a ",[1325,1424,1428],{"href":1425,"rel":1426},"https:\u002F\u002Flucide.dev\u002Ficons",[1427],"nofollow","Lucide"," name and ",[505,1431,1432],{},"display"," can be",[1435,1436,1437,1444,1450,1456],"ul",{},[1438,1439,1440,1443],"li",{},[505,1441,1442],{},"\"content\""," (the sidebar, default)",[1438,1445,1446,1449],{},[505,1447,1448],{},"\"settings\""," (the built-in Settings page)",[1438,1451,1452,1455],{},[505,1453,1454],{},"\"main\""," (the top bar)",[1438,1457,1458,1461],{},[505,1459,1460],{},"\"none\""," (don't show at all)\n:::",[1339,1463,1467,1468,1471,1472,1475],{"name":1464,"type":1465,":badges":1466},"tabs","Record\u003Cstring, { label, icon }>","[{\"label\":\"Admin only\",\"color\":\"note\"}]","UI Tabs in the admin form. A field picks its tab with ",[505,1469,1470],{},"tab: \"name\"",". Fields without a ",[505,1473,1474],{},"tab"," show above the tabs.",[1339,1477,1480,1481,924],{"name":1478,"type":1479,":badges":1466},"fieldsets","Record\u003Cstring, { label, description, collapsible }>","Boxes around fields in the admin form. A field picks its box with ",[505,1482,1483],{},"fieldset: \"name\"",[1339,1485,1487,1488,1491,1492,1395,1494,924],{"name":1486,"type":1375,":badges":1359},"sitemap","List the documents in ",[505,1489,1490],{},"\u002Fsitemap.xml",". Needs a ",[505,1493,1363],{},[505,1495,1342],{},[484,1497,1498,1080,1500,1502],{},[505,1499,1464],{},[505,1501,1478],{}," change only the admin. The stored document keeps its shape:",[510,1504,1506],{"className":512,"code":1505,"language":515,"meta":516,"style":516},"export const posts = defineCollection({\n  tabs: {\n    content: { label: \"Content\", icon: \"file-text\" },\n    meta: { label: \"Meta\", icon: \"tag\" },\n  },\n  fields: {\n    title: { type: \"text\", required: true, tab: \"content\" },\n    body: { type: \"richtext\", tab: \"content\" },\n    date: { type: \"date\", tab: \"meta\" },\n  },\n});\n",[505,1507,1508,1524,1533,1570,1605,1609,1617,1659,1691,1724,1728],{"__ignoreMap":516},[520,1509,1510,1512,1514,1516,1518,1520,1522],{"class":522,"line":523},[520,1511,567],{"class":526},[520,1513,571],{"class":570},[520,1515,574],{"class":534},[520,1517,577],{"class":530},[520,1519,535],{"class":580},[520,1521,583],{"class":534},[520,1523,586],{"class":530},[520,1525,1526,1529,1531],{"class":522,"line":557},[520,1527,1528],{"class":592},"  tabs",[520,1530,596],{"class":530},[520,1532,651],{"class":530},[520,1534,1535,1538,1540,1542,1545,1547,1549,1552,1554,1556,1559,1561,1563,1566,1568],{"class":522,"line":564},[520,1536,1537],{"class":592},"    content",[520,1539,596],{"class":530},[520,1541,531],{"class":530},[520,1543,1544],{"class":592}," label",[520,1546,596],{"class":530},[520,1548,544],{"class":530},[520,1550,1551],{"class":547},"Content",[520,1553,551],{"class":530},[520,1555,676],{"class":530},[520,1557,1558],{"class":592}," icon",[520,1560,596],{"class":530},[520,1562,544],{"class":530},[520,1564,1565],{"class":547},"file-text",[520,1567,551],{"class":530},[520,1569,688],{"class":530},[520,1571,1572,1575,1577,1579,1581,1583,1585,1588,1590,1592,1594,1596,1598,1601,1603],{"class":522,"line":589},[520,1573,1574],{"class":592},"    meta",[520,1576,596],{"class":530},[520,1578,531],{"class":530},[520,1580,1544],{"class":592},[520,1582,596],{"class":530},[520,1584,544],{"class":530},[520,1586,1587],{"class":547},"Meta",[520,1589,551],{"class":530},[520,1591,676],{"class":530},[520,1593,1558],{"class":592},[520,1595,596],{"class":530},[520,1597,544],{"class":530},[520,1599,1600],{"class":547},"tag",[520,1602,551],{"class":530},[520,1604,688],{"class":530},[520,1606,1607],{"class":522,"line":609},[520,1608,784],{"class":530},[520,1610,1611,1613,1615],{"class":522,"line":626},[520,1612,646],{"class":592},[520,1614,596],{"class":530},[520,1616,651],{"class":530},[520,1618,1619,1621,1623,1625,1627,1629,1631,1633,1635,1637,1639,1641,1643,1645,1648,1650,1652,1655,1657],{"class":522,"line":643},[520,1620,657],{"class":592},[520,1622,596],{"class":530},[520,1624,531],{"class":530},[520,1626,664],{"class":592},[520,1628,596],{"class":530},[520,1630,544],{"class":530},[520,1632,671],{"class":547},[520,1634,551],{"class":530},[520,1636,676],{"class":530},[520,1638,679],{"class":592},[520,1640,596],{"class":530},[520,1642,685],{"class":684},[520,1644,676],{"class":530},[520,1646,1647],{"class":592}," tab",[520,1649,596],{"class":530},[520,1651,544],{"class":530},[520,1653,1654],{"class":547},"content",[520,1656,551],{"class":530},[520,1658,688],{"class":530},[520,1660,1661,1663,1665,1667,1669,1671,1673,1675,1677,1679,1681,1683,1685,1687,1689],{"class":522,"line":654},[520,1662,761],{"class":592},[520,1664,596],{"class":530},[520,1666,531],{"class":530},[520,1668,664],{"class":592},[520,1670,596],{"class":530},[520,1672,544],{"class":530},[520,1674,774],{"class":547},[520,1676,551],{"class":530},[520,1678,676],{"class":530},[520,1680,1647],{"class":592},[520,1682,596],{"class":530},[520,1684,544],{"class":530},[520,1686,1654],{"class":547},[520,1688,551],{"class":530},[520,1690,688],{"class":530},[520,1692,1693,1695,1697,1699,1701,1703,1705,1707,1709,1711,1713,1715,1717,1720,1722],{"class":522,"line":691},[520,1694,738],{"class":592},[520,1696,596],{"class":530},[520,1698,531],{"class":530},[520,1700,664],{"class":592},[520,1702,596],{"class":530},[520,1704,544],{"class":530},[520,1706,751],{"class":547},[520,1708,551],{"class":530},[520,1710,676],{"class":530},[520,1712,1647],{"class":592},[520,1714,596],{"class":530},[520,1716,544],{"class":530},[520,1718,1719],{"class":547},"meta",[520,1721,551],{"class":530},[520,1723,688],{"class":530},[520,1725,1726],{"class":522,"line":735},[520,1727,784],{"class":530},[520,1729,1730,1732,1734],{"class":522,"line":758},[520,1731,790],{"class":530},[520,1733,793],{"class":534},[520,1735,554],{"class":530},[497,1737,120],{"id":1738},"presets",[484,1740,1741,1742,1380,1745,924],{},"Most sites need the same few things: pages with nested URLs, a navigation menu and SEO. Presets give you these as ready-made collections and globals from ",[505,1743,1744],{},"tenoncms\u002Fpresets",[1325,1746,120],{"href":121},[497,1748,1750],{"id":1749},"types","Types",[484,1752,1753],{},"The schema is the type. You write no interfaces, and reads return typed documents:",[510,1755,1757],{"className":512,"code":1756,"language":515,"meta":516,"style":516},"const post = await cms.findOne(\"posts\", { where: { slug } });\npost?.title; \u002F\u002F string\npost?.date; \u002F\u002F string | null | undefined\n\ncms.find(\"postz\"); \u002F\u002F type error: unknown collection\ncms.find(\"posts\", { where: { titel: \"Hi\" } }); \u002F\u002F type error: unknown field\n",[505,1758,1759,1805,1821,1834,1838,1863],{"__ignoreMap":516},[520,1760,1761,1763,1766,1768,1770,1772,1774,1776,1778,1780,1782,1784,1786,1788,1790,1792,1794,1797,1799,1801,1803],{"class":522,"line":523},[520,1762,967],{"class":570},[520,1764,1765],{"class":534}," post ",[520,1767,577],{"class":530},[520,1769,975],{"class":526},[520,1771,978],{"class":534},[520,1773,924],{"class":530},[520,1775,1014],{"class":580},[520,1777,583],{"class":534},[520,1779,551],{"class":530},[520,1781,990],{"class":547},[520,1783,551],{"class":530},[520,1785,676],{"class":530},[520,1787,531],{"class":530},[520,1789,1029],{"class":592},[520,1791,596],{"class":530},[520,1793,531],{"class":530},[520,1795,1796],{"class":534}," slug ",[520,1798,790],{"class":530},[520,1800,538],{"class":530},[520,1802,793],{"class":534},[520,1804,554],{"class":530},[520,1806,1807,1810,1813,1815,1818],{"class":522,"line":557},[520,1808,1809],{"class":534},"post",[520,1811,1812],{"class":530},"?.",[520,1814,619],{"class":534},[520,1816,1817],{"class":530},";",[520,1819,1820],{"class":1244}," \u002F\u002F string\n",[520,1822,1823,1825,1827,1829,1831],{"class":522,"line":564},[520,1824,1809],{"class":534},[520,1826,1812],{"class":530},[520,1828,751],{"class":534},[520,1830,1817],{"class":530},[520,1832,1833],{"class":1244}," \u002F\u002F string | null | undefined\n",[520,1835,1836],{"class":522,"line":589},[520,1837,561],{"emptyLinePlaceholder":560},[520,1839,1840,1843,1845,1847,1849,1851,1854,1856,1858,1860],{"class":522,"line":609},[520,1841,1842],{"class":534},"cms",[520,1844,924],{"class":530},[520,1846,983],{"class":580},[520,1848,583],{"class":534},[520,1850,551],{"class":530},[520,1852,1853],{"class":547},"postz",[520,1855,551],{"class":530},[520,1857,793],{"class":534},[520,1859,1817],{"class":530},[520,1861,1862],{"class":1244}," \u002F\u002F type error: unknown collection\n",[520,1864,1865,1867,1869,1871,1873,1875,1877,1879,1881,1883,1885,1887,1889,1892,1894,1896,1899,1901,1903,1905,1907,1909],{"class":522,"line":626},[520,1866,1842],{"class":534},[520,1868,924],{"class":530},[520,1870,983],{"class":580},[520,1872,583],{"class":534},[520,1874,551],{"class":530},[520,1876,990],{"class":547},[520,1878,551],{"class":530},[520,1880,676],{"class":530},[520,1882,531],{"class":530},[520,1884,1029],{"class":592},[520,1886,596],{"class":530},[520,1888,531],{"class":530},[520,1890,1891],{"class":592}," titel",[520,1893,596],{"class":530},[520,1895,544],{"class":530},[520,1897,1898],{"class":547},"Hi",[520,1900,551],{"class":530},[520,1902,538],{"class":530},[520,1904,538],{"class":530},[520,1906,793],{"class":534},[520,1908,1817],{"class":530},[520,1910,1911],{"class":1244}," \u002F\u002F type error: unknown field\n",[1435,1913,1914,1925,1936],{},[1438,1915,1916,1917,1920,1921,1924],{},"A ",[505,1918,1919],{},"required"," field is never ",[505,1922,1923],{},"null"," or missing.",[1438,1926,1927,1080,1930,1933,1934,924],{},[505,1928,1929],{},"select",[505,1931,1932],{},"populate"," change the result type. See ",[1325,1935,147],{"href":148},[1438,1937,1938,1939,1380,1942,924],{},"The same types reach the browser through ",[505,1940,1941],{},"createClient()",[1325,1943,1944],{"href":160},"HTTP API and client",[484,1946,1947,1950],{},[505,1948,1949],{},"defineCms()"," also checks the schema when it starts. A relation to an unknown collection or a condition on an unknown field stops the server with an error that lists every problem.",[1952,1953,1954],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}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 .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":516,"searchDepth":557,"depth":557,"links":1956},[1957,1958,1959,1960,1961],{"id":499,"depth":557,"text":500},{"id":1087,"depth":557,"text":1088},{"id":1330,"depth":557,"text":1331},{"id":1738,"depth":557,"text":120},{"id":1749,"depth":557,"text":1750},"Describe content in TypeScript and get typed documents back.","md",null,{},{"title":41,"description":1962},"IODNHkWNscHk4o3ankSDUcd11T_X2w4sI3IE3yd3kpQ",[1969,1971],{"title":32,"path":33,"stem":34,"description":1970,"children":-1},"What happens under the hood. One CMS instance in your app, the ways your code and the admin reach it, what runs at startup, and how Vite fits in.",{"title":50,"path":46,"stem":47,"description":1972,"children":-1},"Pick a field type, set its options and check its values.",1795884675744]