Capella Jekyll documentation
Pages and blocks
Build your pages from Capella's nine block types and 22 variants, with every field and a short example of each.
Every page is a list of blocks in its front matter, under blocks:. Each item is one block, shown in the order you list them.
The quickest way to start is the /blocks/ catalogue. It shows every block and variant live, with a Copy snippet button. Paste the snippet under blocks: and change the words. The same page is in your copy at /blocks/ when you run the site.
---
layout: home
title: "About"
description: "One sentence for search engines."
top: wash
blocks:
- type: hero
variant: centered
heading: Hello, I'm **Capella**
text: A writer and photographer who travels slowly.
- type: story
text: |
**Capella** is a writer from Lisbon.
note: Writing since 2016
---
Use layout: home for a page made of blocks. Add permalink: to give the page its address, and a link to it under capella.nav in _config.yml. Anything you write below the front matter appears after the blocks, as plain Markdown text.
YAML is fussy about two things. Keep the indentation exactly as in the examples (spaces, never tabs). If a line of text contains a colon followed by a space, wrap it in quotes: text: "Note: I'm away in August.".
Settings every block has
| Field | What it does |
|---|---|
type |
Which block: hero, page-head, featured, posts, story, facts, quote, cta or contact. |
variant |
Which look of that block. Each block lists its own below. Leave it out for the first one listed. |
id |
The anchor of the block, such as id: posts for a link to #posts. It defaults to the block’s type, so give each block an id if one page uses the same type twice. |
tone |
The background: default (the white page), band (pale grey, like the footer), wash (the grey wash of the home page header) or ink (a dark band that turns every color inside to its dark version). |
space |
The space above and below: normal (the default), tight or none. |
hidden |
true switches the block off without deleting it. |
Page-level settings in the front matter:
top: washpaints the header and the first block on the grey wash, as on the home page. Use it with a first block that hastone: wash(hero) or awashpage head.header: centeredgives the page the centered header. See Settings.noindex: trueandsitemap: falsekeep a page out of search engines. See SEO.
Words with underlines
In a hero heading, wrap a word in *single stars* to underline it, or in **double stars** to underline it in coral. Page head headings, CTA lines and story notes take Markdown too, and story text takes **double stars** to show a word in coral.
Hero
The page’s big hello, and its one h1. Fields: heading (line breaks are kept), text, action and image.
| Variant | What it looks like |
|---|---|
portrait (default) |
Words on the left, a tall photo on the right that runs to the bottom of the block. |
text |
Words only, left-aligned. For when you have no photo. |
centered |
Words only, centered. Good on a category or About page. |
- type: hero
variant: portrait
tone: wash
heading: |
I'm Capella
I love *travel*, **photography**
and *writing*
text: A place where I share everything I love.
action:
label: Subscribe
url: "#newsletter"
icon: mail
image:
src: /assets/img/demo/hero-capella.webp
alt: A traveller in a felt hat and a camel coat
position: "50% 100%"
actionis the italic link under the text.iconis any icon name from_includes/icons/and defaults tomail.#newsletterpoints at the newsletter form in the footer. That anchor exists only whencapella.footerisfull.imageis forportraitonly.src,altandpositionwork as described in Pictures. The hero looks best with a cut-out (a transparent background), about 1600 pixels wide.levelish1by default. Setlevel: h2only on a page that already has anh1.
Page head
The top of an archive page (a category, the blog, a tag list) with the page’s one h1.
| Variant | What it looks like |
|---|---|
wash (default) |
Left-aligned on the grey wash. Set top: wash in the page’s front matter so the header above it is grey too. |
plain |
Left-aligned on the white page. |
centered |
Centered. Good for a short page such as a category. |
Fields:
label: the small uppercase line above the heading (“Category”).heading: the big line. Markdown works.text: a short intro.count: true: shows “12 posts”. Withcategory: Travelit counts that category, withtag: lightthat tag, and with neither it counts every post.crumbs: true: shows “Home / Travel” above the heading.crumb:gives the last crumb other words.level:h1(default) orh2.
- type: page-head
label: Category
heading: Travel
text: Slow trips, small towns and the pictures that came home with me.
count: true
category: Travel
crumbs: true
Featured
The posts you mark with featured: true in their front matter, newest first. If no post is marked, the block has nothing to show.
| Variant | What it looks like |
|---|---|
row (default) |
A small label above a track of posts you can swipe or scroll. Three show at once on a wide screen, two on a tablet, one and a bit on a phone. With more than three posts, arrow buttons appear. |
single |
The newest featured post as one big feature: photo beside its title, excerpt and a “Read more” button. |
Fields:
heading: the label above a row. The default is “Featured posts”.limit: row only, how many posts at most. The default is 6.post: single only, the title of the post to show. Without it, the newest featured post.eager:trueif this block holds the biggest photo near the top of the page, so it loads first.
- type: featured
variant: single
tone: band
eager: true
The arrows use a few lines of JavaScript. Without it they stay hidden and the track still scrolls.
Posts
A list of your posts.
| Variant | What it looks like |
|---|---|
mixed (default) |
Posts on the left as rows, every third one as a wide photo, an optional sponsor card, and the sidebar on the right (below the posts on phones). |
list |
Rows only, with the sidebar. |
grid |
Three across (two on a tablet, one on a phone) with excerpts and no sidebar. For the blog page. |
Fields:
heading: an optional heading.head: titlemakes it a big serif heading, andintroadds a paragraph under it. Withouthead, it’s the small label.category: only posts in this category, by name (Travel).tag: only posts with this tag.limit: how many posts. The default is 6.offset: skip this many first.exclude_featured: true: leaves out posts markedfeatured, for when they’re already shown above.paginate: true: shows every post, six at a time (the number ispaginatein_config.yml), with page numbers underneath. This works only inindex.html. Other pages uselimit.wide_every:mixedonly, every Nth post is a wide one. The default is 3.sponsor:mixedonly, the id of a sponsor from_data/sponsors.yml, shown after the 5th post.sponsor_afterchanges that number.sidebar: false: hides the sidebar inmixedandlist.more: a button under the posts when they aren’t paginated, withlabelandurl.eager:trueif the first photo is the biggest on the page.
- type: posts
variant: grid
heading: Latest posts
limit: 9
exclude_featured: true
more:
label: All posts
url: /blog/
Story
The big lead paragraph of an About page, with one small bold line under it.
| Variant | What it looks like |
|---|---|
lead (default) |
Left-aligned, with a hairline under the note. |
centered |
Centered, for a short statement. |
Fields: text, in Markdown, with a blank line between paragraphs. note is the small bold line under it.
Facts
Rows with a small uppercase label and the content beside it, like “Topics”, “Edu & career” and “Mentions” on the demo’s About page.
| Variant | What it looks like |
|---|---|
rows (default) |
The label on the left, the content on the right. Stacks on phones. |
stacked |
The label above the content at every width. |
Fields: heading is an optional heading for the whole block. Without it, the row labels become the page’s h2 headings. rows is the list. Each row has a label, an optional intro in Markdown, and one of these:
list: short items, set in three columns:["Slow travel", "Street photography"].timeline: columns, each with aheadingandentriesthat havetitle,placeandyears.mentions: rows withyear,nameandnote. The name is plain text, such as a magazine.
- type: facts
rows:
- label: Topics
intro: What you'll find here.
list: [Slow travel, Street photography, Packing light]
- label: Mentions
mentions:
- year: 2024
name: Example Journal
note: Best Travel Blogs
Quote
One kind word from a reader or a partner.
| Variant | What it looks like |
|---|---|
side (default) |
Who said it on the left, the big quote on the right. Stacks on phones. |
centered |
The quote centered, the name under it. |
Fields: quote (plain text, no quote marks needed), name, role (one line; Markdown links work) and avatar (a photo path, optional).
Call to action
A big serif line with a highlighted link at the end of it, like “Let’s make something amazing together. Start by saying hi.”
| Variant | What it looks like |
|---|---|
centered (default) |
Centered. |
left |
Left-aligned. |
Fields: heading has the words. Line breaks are kept. The last line is bold and the link follows it on the same line. link has a label and a url.
- type: cta
heading: |
Let's make something amazing together
Start by
link:
label: saying hi
url: /contact/
Contact
A details card and a message form. There’s no map, so the page stays fast.
| Variant | What it looks like |
|---|---|
split (default) |
The details card on the left, the form on the right on wide screens. Stacked on phones. |
form |
The form only, centered. |
details |
The card only. |
Fields for the card: place and region (the card’s heading, “Lisbon, Portugal”), address (lines are kept), email, phone, others (a line of other places, such as Porto | Madeira | Faro) and button (label and url). heading and intro go above the form. form sets where messages go. See Newsletter and contact forms.
The three home pages
index.htmlis the main one: the hero with a portrait, a row of featured posts, then the mixed list with page numbers and a sponsor card.home-2.htmlhas the centered header, a centered hello, one big featured post, then the latest five posts and a button to the blog page. It’s at/home-2/.home-3.htmlhas words only at the top, the featured row, then a grid of posts with no sidebar. It’s at/home-3/.
home-2.html and home-3.html are examples, kept out of search engines and the sitemap. To use one as your home page, copy its blocks: (and header: centered for the first) into index.html. Delete the two files when you don’t need them.
Adding a page
- Copy
about.html, rename it, and changetitle,description,permalinkand the blocks. - Add a link to it under
capella.navin_config.yml.
For a page of plain text, use layout: home with a page-head block and write below the front matter.
Hiding or removing the catalogue
/blocks/ is in your copy so you can copy snippets while you build. Search engines are told to ignore it. If you don’t want it public, delete blocks.html.