Skip to main content
This guide walks you through building a complete Primo site from scratch. You’ll create multiple page types, build several blocks, and set up a site that’s ready for content editors to use.
If you’re looking for a faster introduction, check out the Quickstart guide first.

Watch the workflow

Create a site from a starter

Watch the workflow in Primo. Download video · Download captions
  1. Choose Create Site from the dashboard.
  2. Give the new site a name.
  3. Browse starters in the Marketplace.
  4. Choose Hawthorn Veterinary and review its design.
  5. Review optional blocks, then create your site.
  6. Your new site is ready in the dashboard.

Overview

By the end of this guide, you’ll have:
  • A site with two page types you create: General Page and Blog Post
  • Five reusable blocks (Hero, Text, Image, Card Grid, Footer)
  • A working navigation system
  • Content ready for editors to manage

Download the complete example

Download the first site workspace to compare the finished blocks, fields, page types, and content with this guide. Extract the ZIP into its own folder. After installing primo-cli, run from the extracted folder:
Open the editor URL printed by the CLI and verify the sample pages. This first run imports the source and any library blocks. The editor is read-only in files mode. To edit in the browser, stop it with Ctrl+C, then run primo dev --author cms. The included README explains the field connections and differences from the browser tutorial. Use a copy if you want to keep the original example.

Prerequisites

Step 1: Create Your Site

1

Initialize the site

When you first access Primo, create a new site. Give it a descriptive name like “My First Site”.
The site name is for internal organization. You can change it later in settings.
2

Configure basic settings

Navigate to Site Settings and configure:
  • Site name: An internal name for the dashboard
  • Domain: Connect a hostname through the dashboard
  • Site fields: Add global branding and navigation content as needed
You can always update these settings later. For now, focus on getting the structure in place.

Step 2: Build Your Component Library

Create five example blocks in the server’s Library: Hero, Text, Image, Card Grid, and Footer. These are names for the Svelte blocks you build below, not built-in block presets. Text and Image are also field type names; the blocks here use those fields to create page sections. A Hero is an introductory section with a headline and button. A Card Grid repeats a card design for several items. You can choose other names and designs for your own sites.

Block 1: Hero

The Hero block will be the first thing visitors see on your homepage.
1

Create the Hero block

Open Library → Create Block. Name it “Hero”.
2

Write the component

3

Add fields

Add these content fields:
  • headline (Text) - Main headline
  • subheadline (Text) - Supporting text
  • cta_text (Text) - Button text
  • cta_link (URL) - Button destination URL
  • background_image (Image, optional) - Background image URL
The component is already set up to use these fields. Just add them in the field editor.
Your Hero block is complete and saved to your component library. It’s ready to use on any page type.

Block 2: Text

A simple text block for content sections.
1

Create the Text block

Create a new block called “Text”.
2

Write the component

3

Add fields

Add these fields:
  • content (Rich Text) - The main content
  • alignment (Select) - Options: “left”, “center”, “right”
Save the Text block and check it with formatted sample content.

Block 3: Image

A block for displaying images with optional captions.
1

Create the Image block

Create a new block called “Image”.
2

Write the component

3

Add fields

Add these fields:
  • image (Image) - The image to display (includes URL and alt text)
  • alt_text (Text, optional) - Override alt text if needed
  • caption (Text, optional) - Image caption
  • full_width (Switch/Toggle) - Whether to use full width
Your Image block is complete. It handles images with captions and full-width options.

Block 4: Card Grid

A flexible grid for displaying cards (useful for features, team members, etc.).
1

Create the Card Grid block

Create a new block called “Card Grid”.
2

Write the component

3

Add fields

Add these fields:
  • cards (Repeater) - Array of card objects with:
    • title (Text)
    • description (Text, optional)
    • image (Image, optional)
    • link (URL, optional)
  • columns (Number) - Number of columns (the example code falls back to 3 when empty)
Save the Card Grid block and preview several cards, including one without an image or link.
Primo supplies the page-level <footer> wrapper, so this block uses a <div>. You can copy the block into each page type. Each type keeps its own section content; use Site Field references when values should be shared across types.
1

Create the Footer block

Create a new block called “Footer”.
2

Write the component

3

Add fields

Add these fields:
  • copyright_text (Text) - Copyright notice
  • links (Repeater) - Footer links with:
    • label (Text)
    • url (URL)
Save your Footer block. Add it to each page type that needs a footer.
You now have five reusable blocks in your component library. These can be used across all your sites!

Step 3: Define Page Types

Create General Page for the homepage and About page, and Blog Post for articles. The names identify your templates; they do not assign URLs or special behavior.

Page Type 1: General Page

1

Create General Page

Open Pages → Manage page types → Create page type. Name it “General Page” and choose an icon and color.
2

Configure available blocks

In the Blocks tab, add Hero, Text, Image, Card Grid, and Footer from the library. This creates independent copies in your site. Enable these blocks for the body slot:
  • Hero
  • Text
  • Image
  • Card Grid
These blocks will be available for editors to add in the body slot. We’ll add the Footer to the footer slot later.
3

Add page fields

Add these page-level fields:
  • meta_title (Text) - SEO title
  • meta_description (Text) - SEO description

Page Type 2: Blog Post

1

Create Blog Post page type

Create a new page type called “Blog Post”.
2

Configure available blocks

Enable the site’s Text and Image blocks for this type:
  • Text
  • Image
Blog posts typically have simpler layouts. You can always add more blocks later.
3

Add page fields

Add these fields:
  • title (Text) - Post title
  • author (Text) - Author name
  • publish_date (Date) - Publication date
  • featured_image (Image) - Featured image
  • excerpt (Text) - Short description
  • meta_title (Text) - SEO title
  • meta_description (Text) - SEO description
The Date input uses YYYY-MM-DD; resolved values can also include an ISO timestamp. Format it with an explicit UTC time zone to avoid displaying the previous day, for example new Date(publish_date).toLocaleDateString("en-US", { timeZone: "UTC" }). This field does not schedule publication.

Step 4: Create Pages

Now let’s create actual pages using these page types.

Create the Homepage

1

Open the homepage

Open the homepage created with your blank site. Use “General Page” as its page type. The homepage is the root page at /; creating a normal page named Home does not make it the homepage.
2

Add blocks

Add blocks in this order:
  1. Hero - Add a headline and call-to-action link
  2. Text - Add an introduction section
  3. Card Grid - Add 3 feature cards
  4. Text - Add a closing section
You can reorder blocks by dragging them in the editor.
3

Fill in content

Edit each block with your content:
  • Hero: Welcome message and primary button link
  • Text: Introduction to your site
  • Card Grid: Three feature highlights
  • Text: Call to action or closing message
4

Set page metadata

Fill in the page fields:
  • Meta title: “Home - My Site”
  • Meta description: “Welcome to my site built with Primo”

Create a Blog Post

1

Create blog post

Create a new page with “Blog Post” page type.
2

Fill page fields

Set:
  • Title: “Getting Started with Primo”
  • Author: Your name
  • Publish date: Select a date from the date picker
  • Excerpt: A short description
3

Add content blocks

Add:
  1. Text block with your blog post content
  2. Image block for illustrations
You can add multiple Text and Image blocks to create rich blog post layouts.

Create the About Page

1

Create about page

Create a page named About with slug about using the General Page type. It can use the same type as the homepage while having different sections and content.
2

Build the page

Add:
  1. Hero - “About Us” headline
  2. Text - Your story
  3. Card Grid - Team members or values
  4. Image - Team photo or office image
Add the Footer block to each page type so it appears on every page:
1

Add Footer to General Page

Open the General Page type editor and add the Footer block to the Footer slot.
Blocks in the footer slot appear on every page of this type and can’t be removed by editors.
2

Add Footer to other page types

Repeat for the Blog Post type. About already uses General Page, so it gets that type’s shared footer.
Each page type has its own footer section content. Use Site Field references for copyright and links if you want one shared value across page types.
3

Set the shared footer content

Edit the shared footer section in each page type to add:
  • Copyright text
  • Footer links (Privacy Policy, Terms, Contact, etc.)

Step 6: Connect navigation and page metadata

Use the footer’s links repeater to add links to /, /about, and your blog post’s actual path. To create /blog/getting-started, create a Blog parent page and a child with slug getting-started. Page type names do not add URL prefixes. Give the Hero block’s CTA the URL /about. Open each link in the page preview to verify its destination. The SEO fields you created do not generate tags automatically. In each page type’s Head HTML, add:
The Blog Post’s title, author, and featured_image fields also need Page Field references in a display block to appear on the page. Until you build that header block, include the visible post title and author in the Text section.

Step 7: Publish your site

Use a deployed CMS with a connected hostname. If you built locally, deploy your workspace before following these steps.
1

Save and review

Save open block, section, and site dialogs. Preview each page and test links, text alignment, image alt text, and mobile layouts.
2

Publish

Click Publish → Publish changes. This publishes the site, including all its pages. Wait for success, then open your connected domain and confirm the new content and metadata.

What You’ve Built

You now have:
  • ✅ A site structure with two page types
  • ✅ Five reusable blocks in your component library
  • ✅ Multiple published pages with real content
  • ✅ Navigation and footer configured
  • ✅ A site ready for content editors

Next Steps

Writing Components

Learn advanced techniques for building reusable components.

Working with Fields

Explore all field types and how to use them effectively.

Defining Page Types

Master page type configuration for complex content structures.

Using the Editor

Learn how content editors use Primo to manage pages.
All the blocks you created are saved in your component library. You can reuse them in future sites, saving time on every new project.