Show navigationHide navigation

Schema reference

Project: Test Project

Git integration (from cms/octocms.config.ts)#

  • baseBranch: main — default branch; feature branches are created from here; PRs target this ref.
  • publishedPointerBranch: cms/publish-pointer — branch that holds per-build pointer files under cms/pointers/ so Publish does not commit to a protected base branch.

Field formats (global)#

  • string
  • text
  • markdown
  • boolean
  • reference
  • image
  • number
  • datetime
  • json
  • slug
  • select
  • url
  • color
  • conditional
  • richtext

Collections#

Post (post)#

  • hasMany: yes
FieldLabelFormatFlagsReference
bodyBodymarkdown
featuredImageFeatured Imageimage
metaJSON metadatajsonhint
publishedAtPublisheddatetimehint
slugURL slugslugrequired, hint
tagsTagsstringhint, list
titleEntry titlestringentryTitle, required, hint

Item (item)#

  • hasMany: yes
FieldLabelFormatFlagsReference
bodyBodymarkdown
categoryCategoryselectoptions: general, featured, defaultOption: general
enabledEnabledbooleandefaultBoolean, booleanLabels
flagsFlagsselectmultiple, options: new, sale, defaultOptions: new
sortOrderSort ordernumberhint
titleTitlestringentryTitle

Home Page (homePage)#

  • hasMany: no (singleton-style)
FieldLabelFormatFlagsReference
ctaSubtitleCTA — Subtitlestring
ctaTitleCTA — Titlestring
featuresFeatures — Cardsjsonhint
featuresTitleFeatures — Titlestring
footerTextFooter — Textstring
heroBadgeHero — Badgestring
heroDescriptionHero — Descriptiontext
heroHeadlineHero — Headlinestringhint
heroHeadlineAccentHero — Headline Accentstringhint
heroImageHero — Imageimage
heroImagesHero - Imagesreferencecollections: homeHeroCarousel
howItWorksDescriptionHow It Works — Descriptiontext
howItWorksTitleHow It Works — Titlestring
philosophyBodyPhilosophy — Bodymarkdown
philosophyTitlePhilosophy — Titlestring
stepsHow It Works — Stepsjsonhint
titleTitlestringentryTitle
useCasesUse Cases — Cardsjsonhint
useCasesTitleUse Cases — Titlestring

Blog (blog)#

  • hasMany: no (singleton-style)
FieldLabelFormatFlagsReference
postsPostsreferencehintcollections: post; cardinality: manylegacy collection: post
titleTitlestringentryTitle

Author (author)#

  • hasMany: yes
FieldLabelFormatFlagsReference
bioBiomarkdown
nameNamestringentryTitle
rolesRolesreferencecollections: role; cardinality: many

Role (role)#

  • hasMany: yes
FieldLabelFormatFlagsReference
titleTitlestringentryTitle
  • hasMany: yes
FieldLabelFormatFlagsReference
imageImageimage
titleTitlestringentryTitle, required

Public site cache tags#

Cache your public-page data fetchers (the ones calling query()) with 'use cache' and tag them with OCTOCMS_PUBLIC_CONTENT_CACHE_TAG (octocms:content) from octocms/lib/publicContentCacheTag.ts. The recommended shape is one async helper per page, defined inline at the top of the page file and called from both generateMetadata and the default export — co-located with what consumes it. A single tag covers every reader so they refresh together.

After saveFile, newFile (create entry), and removeFile, buildJsons() calls updateTag for that tag and revalidatePath('/', 'layout'). External cache invalidation can be wired up via a Route Handler that calls revalidateTag(tag, { expire: 0 }).