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
ID | Name | Description |
---|---|---|
article | ArticleBlock | Includes text blocks and table of contents with slots for other content blocks |
articleCard | ArticleCardBlock | Card representation of article |
carousel | CarouselBlock | Carousel as with array of content blocks as slides |
grid | GridBlock | Grid with content block children as grid items |
mediaBlockHero | MediaBlockHeroBlock | Image based media section containing text block overlays. Differnet variants available for layout and positioning |
mediaBlockHeroVimeo | MediaBlockHeroVimeoBlock | Media Block Hero with Vimeo video as the primary media |
mediaBlockHeroYouTube | MediaBlockHeroYouTubeBlock | Media Block Hero with YouTube video as the primary media |
mediaCard | MediaCardBlock | Card with rich text and image |
mediaCardVimeo | MediaCardVimeoBlock | Card with rich text and Vimeo video |
mediaCardYouTube | MediaCardYouTubeBlock | Card with rich text and YouTube video |
mediaHero | MediaHeroBlock | Full width Hero block with image and rich text overlay |
mediaHeroVimeo | MediaHeroVimeoBlock | Full width Hero Block containing Vimeo video |
mediaHeroYouTube | MediaHeroYouTubeBlock | Full width Hero Block containing YouTube video |
productTile | ProductTileBlock | Shopable Product Tile |
simpleProductTile | SimpleProductTileBlock | Reduced layout product tile |
text | TextBlock | Rich text block, markdown or html |
personalizedContentBlock | PersonalizedContentBlock | Block accepting child content blocks for different customer segments |
vendorRendered | VendorRenderedBlock | Vendor 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
ID | Name | Description |
---|---|---|
content | ContentPage | Composed of only an array of content blocks |
article | ArticlePage | Article page has article specific fields like "read time" along with a content block headers and body content |
Navigation
Navigation
and related types represent a site navigation tree