Example block
A worked example or code sample; it projects onto the unit named by its unit field rather than getting its own page.
| Property | Type | Required | Description |
|---|---|---|---|
| id | identifier | yes | |
| title | utf8 | yes | |
| unit | identifier | no | |
| narrative | utf8 | no | |
| code_lang | utf8 | no | |
| code | utf8 | no | |
| expected | utf8 | no | |
| audience | Audience | no | |
| tags | list<utf8> | no |
wcl
example clone_cmd {
title = "Cloning a repository"
unit = git_cli
narrative = "Copy a remote repository locally."
code_lang = "console"
code = <<'SH'
$ git clone https://github.com/owner/repo
SH
expected = "A repo/ directory with full history."
}