Skip to main content

For your AI and the curious

Pages, layouts and partials

How a page file becomes a web page. The frontmatter fields, which layout a page gets, what a partial can see, and the variables.

On this page

A page file holds two things: frontmatter, and the content that goes inside <main>. A layout wraps the content, partials supply the shared pieces, and SiteShip writes the document and its <head>.

This page is the architecture topic of the connector's guide tool, in more detail than How a SiteShip site is put together.

A page is frontmatter plus main

---
title: Teeth Whitening
description: Whitening in one visit, from $299. Book online.
image: /assets/images/whitening.jpg
---
<section class="py-20">
  <h1 class="text-4xl font-bold">Teeth Whitening</h1>
  <p>Call {{ site.phone }} to book.</p>
</section>
  • The file's place is its address: pages/about.html is /about, pages/services/index.html is /services.
  • A page never has <html>, <head>, <body>, a header or a footer. A page that does is refused (author.page_has_document_shell).
  • A page is .html or .md. Liquid works in both. In a Markdown page, Liquid inside a code block or inline code prints as written.
  • Markdown is turned into HTML before Liquid runs. So a Liquid loop in a Markdown page cannot produce a Markdown list. Write the list as HTML:
<ul>{% for s in data.services %}<li>{{ s.name }}</li>{% endfor %}</ul>

Frontmatter is YAML

A colon inside an unquoted value is a YAML error, and the file is refused (author.frontmatter_yaml_invalid). Quote such values. Also quote a value that starts with {, [, *, &, @ or #.

title: "Services: What We Do"

Frontmatter fields

Every field is optional.

Field Type What it does
title string The page title. Used in <title>, the share title, breadcrumbs and feeds. Leave the site name out; SiteShip adds it.
description string The meta description, share description and search snippet.
image string The share image. Falls back to defaultImage in data/site.yaml.
layout string A layout under templates/, without the extension.
robots string The robots meta tag, for example noindex.
date string ISO date the content was written. Sorts a collection and feeds the RSS feed. Never hides a page.
publishDate string ISO date the page goes live. Hidden from listings, the feed and the sitemap until then.
draft boolean true keeps the page off the site until removed.
modified string ISO date of the last real change. Used as <lastmod> in the sitemap.
tags string or list Tag pages and related posts.
keywords string or list Extra words site search finds the page by. Not written into the page.
type string A schema hint. type: faq writes FAQPage schema from data/faq.json.
scripts string or list Script addresses to load on this page (https://… or /assets/js/…).
route object Makes a page per item of a data list. See Data files and generated pages.
perPage number Items per page on a paginated listing.
collection string Treat this page as the listing for another collection folder.
item_template string A partial used to render each item on a listing.
sort_by, order string Listing sort field and direction (asc or desc). The default is date, newest first.
limit, offset number The most items a listing shows, and how many to skip.
where object or list Keep only the listing items whose fields match.

Two more, by behaviour:

  • search: false keeps a page out of site search and leaves it in the sitemap.
  • access:, members_only: and memberTier: are refused (author.membership_unsupported). There are no members-only pages.

Your own fields are allowed and read as page.yourfield. An unknown key that is close to a known field is reported as author.frontmatter_typo.

Layout overrides

Every page uses templates/layout.html. A layout starts at <body> and puts {{ content }} where the page goes:

<body class="bg-white text-secondary-900 min-h-screen flex flex-col">
  {% render 'header' %}
  <main id="main-content" class="flex-1">
    {{ content }}
  </main>
  {% render 'footer' %}
</body>

SiteShip writes everything above <body>. A hand-written <!DOCTYPE>, <html>, <head>, <title>, meta tag, canonical link or stylesheet link in a layout or partial is dropped and reported (author.engine_head_tag).

Three optional overrides. The first match wins, and each one also starts at <body>:

Page Layout used
Markdown files in pages/<dir>/ templates/<dir>/single.html
pages/<dir>/index.html templates/<dir>/archive.html. Tag pages use templates/<dir>/tag.html.
layout: name in the frontmatter templates/name.html

A layout with no {{ content }} is reported (author.layout_missing_content_slot). A layout: that names a missing file is refused (author.layout_missing).

There is no {% extends %} and no block inheritance.

Extra head tags

templates/components/head.html holds extra head tags only: a font <link>, a verification <meta>, a third-party head script. SiteShip puts it into the head itself, so the layout does not render it.

Partials and what they see

Shared pieces are partials in templates/components/. Render one by its bare name, never its path:

{% render 'header' %}
{% render 'service-card', service: s %}

A partial always sees these, with nothing passed:

Variable What
site data/site.yaml
data Every data/*.json list
page The current page's frontmatter
item, params On a generated page: its data entry and the address parts
currentPath, canonicalUrl, year The current address, its full form, and the year

Anything else is passed as an argument, as service: s is above. A loop variable from the page is not visible inside a partial unless you pass it.

Markup that repeats, such as a card or a call-to-action band, belongs in a partial rendered in a loop. A {% render %} of a partial that does not exist is refused (author.component_missing).

Variables

Variable Where What
site Everywhere site.name, site.phone, site.menu, site.address.city, and any field you add
data.x Everywhere data/x.json. A hyphen works: data.practice-areas
page Everywhere This page's frontmatter
content Layouts The rendered page
item, params Generated pages The data entry, and the address parts
posts, pagination, collection Listing pages The collection's pages, and paging
currentPath, canonicalUrl, year Everywhere For active menu links, share links and the copyright line
breadcrumbs, toc Posts and deep pages The trail to this page, and its headings
readingTime, relatedPosts, prevPost, nextPost, shareLinks Posts Reading time, related and neighbouring posts, share links

toc comes from a Markdown page's headings. An HTML page has none.

Liquid, briefly

{{ site.name }}
{{ page.title | default: site.name }}
{{ post.date | date: "%B %d, %Y" }}
{% if site.phone %}…{% elsif site.email %}…{% else %}…{% endif %}
{% assign featured = data.services | where: "featured", true | limit: 3 %}
{% assign total = price | times: qty %}
  • It is elsif, not elseif or else if.
  • There are no operators inside {{ }}. Use the filters plus, minus, times and divided_by.
  • Filters are the standard Liquid set plus where, group_by, limit, markdownify and json. An unknown filter is reported (author.unknown_filter).
  • where: "field", value keeps the items whose field equals the value. When the field holds a list, it matches if the list contains the value.

A phone link strips the punctuation:

<a href="tel:{{ site.phone | remove: ' ' | remove: '(' | remove: ')' | remove: '-' }}">{{ site.phone }}</a>

Something wrong on this page? Email support@siteship.ai. Checked on November 14, 2026.

Built in a chat

Home page of Low Tide Coffee, a coffee shop website built with SiteShip

Coffee shop

Low Tide Coffee

The prompt that built it

Build a website for Low Tide Coffee, a small coffee shop and roastery at 14 Harbor Street, Beaufort, SC. We roast our own beans in the back room. Open every day 7am to 3pm. Phone (843) 555-0114. A menu with prices (drip, cortado, cold brew, oat-milk latte, biscuits and pastries). Two house blends sold in the shop: Marsh Blend and Dock Street Dark. Catering for offices and events, with an enquiry form (name, email, date, number of people, message). Pages: Home, Menu, Our beans, Catering. Look: warm and moody. Dark roasted brown and cream with a burnt-orange accent, an elegant serif for headlines with a clean sans for text, a photo of coffee being poured in the hero, and a menu laid out like a printed cafe menu.

Swap in your own business details. Your AI will ask five quick questions if anything is missing.

Add SiteShip to your AI

SiteShip is a connector you add once. You'll create your free account when you connect. No card needed.

https://app.siteship.ai/mcp
ChatGPT
  1. Open ChatGPT on the web and go to Settings, then Apps and connectors.
  2. Choose Add custom connector (you may need to switch on Developer mode under Advanced).
  3. Name it SiteShip, paste the address above and choose OAuth.
  4. Sign in to SiteShip when asked, then start a new chat and say: Get started with SiteShip.

Custom connectors need a paid ChatGPT plan.

Claude
Add to Claude

This opens Claude with SiteShip filled in. Click Add, sign in to SiteShip, then say: Get started with SiteShip.

Or add it by hand

  1. Open Claude and go to Customize, then Connectors.
  2. Click Add, then Add custom connector.
  3. Name it SiteShip and paste the address above.
  4. Sign in to SiteShip when asked, then start a new chat and say: Get started with SiteShip.
Grok

Go to grok.com/connectors, choose New Connector, then Custom, and paste the address above.

Gemini

In the Gemini web app, open Apps/Connectors settings, add a custom connector and paste the address above. (US accounts only for now.)

Other AI apps and coding tools
  1. Open your AI app's settings and look for Connectors, Apps, Integrations or MCP servers.
  2. Add a custom (remote) connector and paste the address above.
  3. Sign in to SiteShip when asked, then start a new chat and say: Get started with SiteShip.

Works with any app that accepts a remote MCP server, including coding tools such as Claude Code, Cursor, VS Code and Codex.

Coding tools

Claude Code

claude mcp add --transport http siteship https://app.siteship.ai/mcp

Codex

codex mcp add siteship --url https://app.siteship.ai/mcp

Then say: Get started with SiteShip.