Skip to main content

Models

Overview

The /models export of the @hv/cms package contains zod schemas and type aliases representing normalized CMS objects.

Blocks

The ContentBlockType is a union of all possible inline content types. A Block could be something like a media hero, rich text, a carousel with product tiles, etc.

See the adding a cms content type guide for a step by step walkthrough of adding new content block types.

Block Types

IDNameDescription
articleArticleBlockIncludes text blocks and table of contents with slots for other content blocks
articleCardArticleCardBlockCard representation of article
carouselCarouselBlockCarousel as with array of content blocks as slides
gridGridBlockGrid with content block children as grid items
mediaBlockHeroMediaBlockHeroBlockImage based media section containing text block overlays. Differnet variants available for layout and positioning
mediaBlockHeroVimeoMediaBlockHeroVimeoBlockMedia Block Hero with Vimeo video as the primary media
mediaBlockHeroYouTubeMediaBlockHeroYouTubeBlockMedia Block Hero with YouTube video as the primary media
mediaCardMediaCardBlockCard with rich text and image
mediaCardVimeoMediaCardVimeoBlockCard with rich text and Vimeo video
mediaCardYouTubeMediaCardYouTubeBlockCard with rich text and YouTube video
mediaHeroMediaHeroBlockFull width Hero block with image and rich text overlay
mediaHeroVimeoMediaHeroVimeoBlockFull width Hero Block containing Vimeo video
mediaHeroYouTubeMediaHeroYouTubeBlockFull width Hero Block containing YouTube video
productTileProductTileBlockShopable Product Tile
simpleProductTileSimpleProductTileBlockReduced layout product tile
textTextBlockRich text block, markdown or html
personalizedContentBlockPersonalizedContentBlockBlock accepting child content blocks for different customer segments
vendorRenderedVendorRenderedBlockVendor Rendered Block - for CMSs that render their own content, such as Builder.io

Pages

The Page type us a union of possible CMS page types. These are pieces of content that live at a url. All page types define page metadata fields. There are different page types so that standalone pages can have varying templates.

Page Types

IDNameDescription
contentContentPageComposed of only an array of content blocks
articleArticlePageArticle page has article specific fields like "read time" along with a content block headers and body content

Navigation and related types represent a site navigation tree

Theme