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 |
---|---|---|
accordion | AccordionBlock | Collapsible structure used to organize and hide or reveal content. |
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. |
menuBar | MenuBarBlock | Navigation component that contains an array of links and a CTA. The links are displayed in a dropdown in mobile. |
personalizedContentBlock | PersonalizedContentBlock | Block accepting child content blocks for different customer segments. |
productTile | ProductTileBlock | Shopable Product Tile. |
promoCarousel | PromoCarouselBlock | Carousel component that uses promo text components as its slides. |
promoText | PromoTextBlock | Text block with positioning used in the Promo Carousel component. |
simpleProductTile | SimpleProductTileBlock | Reduced layout product tile. |
text | TextBlock | Rich text block, markdown or html. |
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 content types so that standalone pages can have varying templates.
Page Content Types
ID | Name | Description |
---|---|---|
simple | SimplePageContent | Composed of only an array of content blocks. |
article | ArticlePageContent | 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.
Footer
Footer
and related types represent a site navigation tree that sits on the bottom of the site pages.
Theme
Theme
and related types used to change the look and feel of the site.