Metadata
A closed block of key: lines is metadata, which html() doesn't write. Anything else is read as ordinary Markdown.
---
title: Sales Report
summary: 'Make it yours: fast.'
order: 2
tags: [svelte, vite]
---
# Report
.
<h1 id="report">Report</h1>
A closed block at the start is metadata whatever it holds, so a page can't open with a rule.
Lines it can't read are reported, but a # line is a YAML comment.
---
## foo
---
.
---
hello
title: x
---
# Doc
.
<h1 id="doc">Doc</h1>
.
hello
Without a closing line, the first is a rule, reported when the block looks like metadata.
---
title: x
.
<hr />
<p>title: x</p>
.
---
---
flag: True
---
.
.
flag: True
---
author:
name: A
---
.
.
name: A
__proto__ is not a key: it would set the metadata object's prototype rather than add an entry.
The line is reported and the rest of the block is still read.
---
__proto__: x
title: Report
---
.
.
__proto__: x
A . in a key is an ordinary character, as YAML reads it, so deploy.name is one key.
---
title: My Site
deploy.provider: cloudflare
deploy.name: my-site
---
# Hi
.
<h1 id="hi">Hi</h1>
A # in a plain value starts a comment to YAML, which drops the rest, so it is reported, and
quoting the value keeps it whole.
---
title: Issue #42
---
.
.
title: Issue #42
A line that isn't a key: line belongs to the value above it, so YAML's indented list takes
tags with it. The rest of the block is still read.
---
tags:
- a
title: x
---
# Doc
.
<h1 id="doc">Doc</h1>
.
- a
A list's plain items hold no ,, brackets or braces, so a quoted item can hold a comma. A list
with a nested list is reported, and its key skipped.
---
tags: [svelte, "a, b", c]
bad: [x[1]]
---
.
.
bad: [x[1]]
A list too long for one line wraps onto the indented lines after its key, the way a formatter writes it, and may end with a comma. It reads as the same list on one line.
---
nav:
[
usage.md,
syntax.md,
development.md,
]
title: Docs
---
.
.