Elements
Everything you can write in a post or a page, with the snippet that makes each piece. Copy one and change the words.
This page shows what the text of a post can hold. Plain Markdown covers most of it. For the rest, Spica ships a few small pieces you drop in with one line: a figure, a gallery, a video, a note and a button. Each one has a snippet right under it.
Headings
A post’s title is the one top-level heading. Inside the text, use level 2 for sections and level 3 and 4 for the parts inside them. A post with three or more headings gets a contents list beside the text.
A level 3 heading
A level 4 heading
A level 5 heading
A level 6 heading
Text styles
A paragraph is plain text with a blank line above and below. Write bold for strong points, italic for a title or a stress, and strikethrough for something you changed your mind about. Marked text uses the lime pen, and Ctrl + S shows a key. Inline code sits in a soft box, and a link takes the accent color. Water is H2O and E = mc2.
Write **bold**, *italic* and ~~strikethrough~~. <mark>Marked text</mark>, <kbd>Ctrl</kbd> + <kbd>S</kbd>,
inline `code` and a [link](/about/). H<sub>2</sub>O and E = mc<sup>2</sup>.
Lists
- A bulleted list needs a dash and a space.
- Items can run to two lines when the thought needs it, and the line breaks cleanly under the first word of the item.
- A nested item moves in by one step.
- Nested lists can go as deep as you like.
- A list can end on a short item.
- Numbered lists count for you.
- Start every line with
1.if you like; Markdown fixes the numbers. - A third step.
- A finished task
- A task still to do
- A bulleted list needs a dash and a space.
- A nested item moves in by one step.
1. Numbered lists count for you.
2. A second step.
- [x] A finished task
- [ ] A task still to do
Quote and rule
Good design is mostly good manners. The reader should notice the words, not the letters.
A line of three dashes draws a short rule between two parts of a post:
> Good design is mostly good manners.
---
Table
| Piece | What it does | Option you will use |
|---|---|---|
| Figure | A picture with a caption | wide |
| Gallery | Pictures in a grid or a strip | columns, style |
| Video | A video that loads on click | id, poster |
| Note | A box for a tip or a warning | type |
| Button | A link that looks like a button | style |
A table wider than the column scrolls inside itself on a phone, so the page never shifts sideways.
| Piece | What it does |
| --- | --- |
| Figure | A picture with a caption |
Footnote
Some facts need a source or a side note.1 A footnote adds a small number in the text and a list at the bottom of the page, with a link back.2
Some facts need a source.[^1]
[^1]: This is the first footnote.
Code
Wrap code in three backticks and name the language after them. Rouge colors it in light and dark mode, and a Copy button shows when you hover over the block.
// Count the words in a draft.
const words = (text) => text.trim().split(/\s+/).filter(Boolean).length;
console.log(words("Two typefaces are enough"), "words");
.card {
border-radius: 0.9rem;
background: var(--surface);
color: var(--ink);
}
# Copy this week's drafts to the backup drive.
rsync -av --delete ~/Documents/writing/ /Volumes/backup/writing/
Figure
A picture with a caption. The picture is cropped to a fixed shape, so the page does not jump while it loads.
{% include figure.html src="/assets/img/posts/using-white-space.webp" alt="Abstract shapes" caption="White space gives each shape room." %}
Add wide=true to let the picture run past the text column in a post that has no contents list beside it, and ratio="wide" for a 16:9 frame (the others are square and tall).
{% include figure.html src="/assets/img/posts/palette-from-one-color.webp" alt="Abstract shapes" caption="A wide figure, 16:9." wide=true ratio="wide" %}
Gallery
Square thumbnails in a grid. Click one to open it large; Esc closes it and the arrow keys move between pictures. Without JavaScript each thumbnail is a link to the full picture.
{% include gallery.html images="/assets/img/a.webp, /assets/img/b.webp, /assets/img/c.webp" alts="First|Second|Third" columns=3 %}
A folder works too. Every .webp, .jpg and .png in it goes in, and the smaller -480 and -960 copies are skipped. For a project, images=page.gallery reads the list from its front matter.
{% include gallery.html folder="/assets/img/trip" %}
{% include gallery.html images=page.gallery columns=2 %}
Carousel
The same pictures as a strip you swipe or scroll. It snaps to each picture and needs no JavaScript to move.
{% include gallery.html folder="/assets/img/posts" style="carousel" %}
Video
A video that loads only when you ask for it. Until the click, nothing is fetched from the video site.
{% include video.html id="VIDEO_ID" title="A short walk through the theme" poster="/assets/img/my-poster.webp" %}
{% include video.html provider="vimeo" id="123456789" title="Studio tour" %}
Use the part of the YouTube address after v= as the id. The poster is optional; without one you get a plain tinted panel.
Notes
A note is a colored box for something the reader should not miss. There are three types.
{% include note.html type="tip" text="A tip saves time. Press **Esc** to close a picture." %}
The same boxes work in plain Markdown. Put a line with the class right under the paragraph:
A plain paragraph made into a tip.
A plain paragraph made into a warning.
A plain paragraph made into a tip.
{: .tip}
A plain paragraph made into a warning.
{: .warning}
Buttons
Accent Dark Outline Text link Outside link
{% include button.html label="Accent" url="/about/" style="accent" %}
{% include button.html label="Outside link" url="https://example.com/" style="outline" icon="arrow-up-right" %}