LibraryEditorial layoutCards layout

GitHub Flavored Markdown as SheetMill accepts it, plus the frontmatter, section, card and attribute rules of SheetMill sheets.

Updated

SheetMill reads CommonMark with the GitHub Flavored Markdown extensions for tables, strikethrough, task lists and autolinks. Every example below is Markdown source, shown as code.

Inline text

Emphasis

*italic* or _italic_
**bold** or __bold__
***bold and italic***
~~struck through~~

Code spans

Run `smill check` before review.
Use ``a `tick` inside`` with a longer run of backticks.

Text inside a code span is literal, including *, _ and braces.

Escaping

\*not italic\*
1986\. A year, not a list item
\# not a heading

A backslash before ASCII punctuation makes it a literal character.

Line breaks

First paragraph line
continues the same paragraph.

A blank line starts a new paragraph.
End a line with a backslash\
to force a hard break.

Blocks

Headings

# Level one
## Level two
### Level three
#### Level four

In a sheet, root-level ## starts a section and ### starts a card; other levels stay ordinary content.

Lists

- milk
- bread
  - whole grain
  - rye

1. preheat
2. bake
3. cool

Indent nested items to line up with the parent item's text.

Task lists

- [x] write the sheet
- [x] run smill check
- [ ] ask for review

Quotes and rules

> Quoted text can span
> several lines.
>
> > And nest.

---

Three or more -, * or _ draw a thematic break. Keep a blank line above ---: directly under text it makes a level-two heading, which starts a new section.

Code and tables

Fenced code blocks

```sh
smill check sheets/
```

~~~json
{"title": "demo"}
~~~

Put a language name after the opening fence. To show a fence inside a fence, make the outer fence longer, as this card does.

Tables

| Key | Action | Count |
| :-- | :-: | --: |
| `q` | quit | 1 |
| `w` | write | 12 |

Colons in the delimiter row align columns left, centre or right.

Pipes inside cells

Tip

| Shell | Meaning |
| :-- | :-- |
| `a \| b` | pipe output |

Escape a literal | in a cell with a backslash, even inside a code span.

SheetMill structure

Frontmatter

---
title: Tide tables
description: Reading tide charts at a glance.
category: outdoors
tags: [tides, sailing]
---

title is required; unknown fields are kept as metadata, not dropped.

Sections and cards

Short intro before the first section.

## Reading charts {.cols-2 #charts}
### High water {#high-water}
Card content.

### Spring tides {.col-span-2 .tip #spring}
More card content.

Sections accept #id and .cols-N (1 to 6). Cards accept #id, .col-span-N, .row-span-N, .note, .tip and .warning.

Attribute placement

Warning

- item
{.compact}

#### Detail {.note}

Both lines fail with ATTR003: groups are only allowed at the end of root ## and ### headings. Write \{.x} or a code span to show braces as text.

Stable IDs

Note

## Install {#install}
### From source {#from-source}

Without #id, SheetMill derives one from the title, so renaming a heading changes its link. IDs must be unique in the sheet.