9 Cheat sheet
Every construct on one page: front matter, cells, divs, references and shortcodes, with a link to the chapter that explains each.
Reference: Cheat sheet · CLI · Configuration · Cell options · Troubleshooting · Accessibility · Licensing
Every construct taliesin supports fits in the seven tables below. Anything you can write that is not named on this page is either plain CommonMark, which just works, or not something taliesin implements.
9.1 Front matter
| Key | What it does | Chapter |
|---|---|---|
title: | The document title: drives <title>, the title block, and social meta | Configuration reference |
subtitle: | A secondary line under the title | Configuration reference |
author: | A name, a list of names, or a structured list with affiliations | Configuration reference |
date: | Publication date; sorts a listing: | Configuration reference |
description: | Summary for the meta description and the social-share unfurl | Configuration reference |
categories: | Tags for the page; each becomes a <category> in the Atom feed | Configuration reference |
image: | The picture on a listing: card and the og:image a shared link unfurls with | Configuration reference |
image-alt: | The alt text for that picture; required whenever image: is set | Configuration reference |
draft: | Holds a page out of the build; the preview still shows it, badged | Configuration reference |
title-block-style: | none hides the visible <h1> title block (the title still drives <title>, OpenGraph, nav) | Configuration reference |
toc: | Forces the table of contents on or off (automatic by default) | Configuration reference |
bibliography: | A .bib file, enabling [@key] citations | Rich writing |
execute: | Document-wide cell defaults (cache:) | Configuration reference |
listing: | Turns the page into an index: a card per document | Configuration reference |
hero: | A landing-page banner with a headline and call-to-action buttons | Configuration reference |
That is every top-level front-matter key taliesin recognizes. See Configuration reference.
9.2 Cells
| Syntax | What it does | Chapter |
|---|---|---|
{python} | Executes against a warm Jupyter kernel | Executable content |
{js} | Runs in the browser, wired into the reactive graph | Interactive documents |
{mermaid} | Renders a diagram client-side | Rich writing |
{=html} | Raw HTML, emitted verbatim | Rich writing |
{bash} {sql} {julia} {rust} | Highlighted, never executed. Unlike a plain ```bash fence these take #| options, so a label: plus lst-cap: turns one into a numbered listing | Executable content |
#| | Leading cell-option prefix (most languages) | Cell-options reference |
//| | Leading cell-option prefix ({js}) | Cell-options reference |
%%| | Leading cell-option prefix ({mermaid}) | Cell-options reference |
9.3 Cell options
| Option | What it does | Chapter |
|---|---|---|
#| echo: | false hides the source listing; the cell still runs | Cell-options reference |
#| include: | false hides both source and output | Cell-options reference |
#| cache: | false opts the cell out of the _freeze/ cache | Cell-options reference |
#| label: | A fig-/lst-/tbl- name makes the output numbered and cross-referenceable | Cell-options reference |
#| fig-cap: | A caption that makes the output a numbered figure | Cell-options reference |
#| lst-cap: | A caption that makes the source a numbered listing | Cell-options reference |
#| tbl-cap: | A caption that makes the output a numbered table | Cell-options reference |
#| code-fold: | Collapses the listing into a closed (or, with show, open) <details> | Cell-options reference |
#| code-summary: | The label on a folded listing | Cell-options reference |
//| name: | Publishes a {js} cell’s return value under this name | Cell-options reference |
//| viewof: | The cell returns a DOM input registered under this name | Cell-options reference |
//| input: | Comma-separated names this cell re-runs on | Cell-options reference |
9.4 Divs
| Syntax | What it does | Chapter |
|---|---|---|
::: {.callout-note} | An informational aside | Rich writing |
::: {.callout-tip} | A tip or a recommendation | Rich writing |
::: {.callout-warning} | A caution the reader should not skip | Rich writing |
::: {.column-margin} | Floats into the right margin on a wide screen, folds into the flow on a narrow one | Rich writing |
::: {.column-page} | Widens a block up to the page width | Rich writing |
Three attributes go inside the braces. title="…" sets a callout’s heading (else a
leading heading, else the kind) and collapse="true" folds it into a native <details>
("false" starts it open); both are callout-only. layout-ncol=3 lays a plain div’s
blocks out as an N-column grid. Any class this table does not name is passed straight
through to the <div> for your own CSS, and is not diagnosed.
9.5 Math
| Syntax | What it does | Chapter |
|---|---|---|
$…$ | Inline math, in running text | Rich writing |
$$…$$ | Display math, standing on its own | Rich writing |
$$…$$ {#eq-x} | A numbered display equation, cross-referenceable as @eq-x | Rich writing |
All three render server-side with KaTeX at build time, fonts inlined, so a built page needs no network. The last row is the one worth seeing: Equation 9.1 below is written that way, and this sentence references it.
9.6 References
| Syntax | What it does | Chapter |
|---|---|---|
[@key] | A citation, resolved against bibliography: | Rich writing |
@fig-name | Cross-reference to a numbered figure | Rich writing |
@sec-name | Cross-reference to a heading carrying {#sec-name} | Rich writing |
@tbl-name | Cross-reference to a numbered table | Rich writing |
@eq-name | Cross-reference to a numbered equation | Rich writing |
@lst-name | Cross-reference to a numbered listing | Rich writing |
[^label] | A footnote, rendered as a margin sidenote next to the line that cites it | Rich writing |
{#anchor} | An explicit id on a heading, figure, or equation, for an @-reference to target | Rich writing |
9.7 Shortcodes
| Syntax | What it does | Chapter |
|---|---|---|
{{< include path/to/partial.tmd >}} | Splices another file’s contents in before parsing | Rich writing |
{{< input name="k" type="slider" >}} | A labelled, keyboard-accessible control (slider, number, checkbox, text, or select) wired into the reactive graph | Interactive documents |