This one sets out everything that renders. Bold, italic, both,
struck through, inline code,
a link within the site,
a link outside it, an autolink https://example.com.
Heading levels
The body starts at ##; # belongs to the title in the front matter.
Third level
Fourth level
Fifth level
Sixth level
Paragraphs and line breaks
An ordinary paragraph. The line below ends in two spaces, so it breaks where it
is told to.
This is the second line of that break, still inside the same paragraph.
And this is a new paragraph.
Inline formatting
<kbd> is for keys, so โ + K is written as keyboard
elements rather than as text. Subscripts give H2O and superscripts
give x2. Highlights use mark, and an abbreviation can
carry its expansion: CDN.
Emoji shortcodes render too: โจ ๐ ๐
Lists
Unordered, two levels deep:
- The first item
- The second, long enough that it has to wrap, which is how the hanging indent
under a wrapped line gets checked
- Nested once
- Nested twice
- Nested again
- The third
Ordered, starting at 3:
- Third
- Fourth
- Sub-step one
- Sub-step two
- Fifth
A task list:
- Something already done
- Another finished thing
- Not yet
- Not this either
Quotes
A single paragraph.
A quote can hold a second paragraph, and inline formatting, and
code.
A nested quote:
The inner one.
Back to the outer.
Code
TypeScript, with a filename:
content.config.ts
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
export default defineContentConfig({
collections: {
writing: defineCollection({
type: 'page',
source: 'writing/*.md',
schema: z.object({
title: z.string(),
date: z.string(),
description: z.string().optional(),
}),
}),
},
})
A deliberately long line, to confirm that a code block scrolls within its own box rather than widening the page:
nuxt generate --preset=static --no-experimental-json-payload --log-level=verbose --dir=/tmp/out --dotenv=.env.production.local
No language, so it is drawn as plain monospace:
plain text
and a second line
Tables
| Left | Centred | Right |
|---|---|---|
| a | b | c |
| A cell long enough to wrap, which is where the alignment gets checked | bold | code |
| Short | Medium | 1234567 |
| Two columns | and a narrow table |
|---|---|
| one | two |
Pictures
A narrow one, smaller than the column and so left at its own size:
A full-width one, which opens larger:
A very wide one:
A portrait:
A square:
And small in the middle of a sentence: the words carry on after it.
A rule
That was a --- above.
Notes
A note is written with the words it explains, so the sentence reads as it would without it and the note can say what it is about:
:fn[the words]{is="what they mean"}
So :fn directive1 attaches to
anything โ code2
included, and something emphasised3. The note itself
is written out at the foot of the article, where a phrase4
opens it, and the whole explanation links back to the words.
Several notes in one paragraph collect in the order they are written: first5 and second6.
There are enough of them in this article to fill the fold, which shows five7 and a line of the sixth before the rest are folded away. Opening it8 is what the control under them does.
Raw HTML
Open for more
What is folded away can be a paragraph or a list:
- one
- two
A centred HTML block.
Notes
- directive1the inline form: a name in brackets, then attributes in braces (back to note 1)
code2formatting inside the noted words is kept, and the collected note shows it too (back to note 2)- something emphasised3which is the shape most notes here take (back to note 3)
- a phrase4held in the article's own colour, so each note has one strong point to find it by (back to note 4)
- first5the first note written on this line (back to note 5)