Skip to content

Writing content ​

Put Markdown pages in the site's content folder (the root of its local-markdown source). Each page starts with YAML front matter. id identifies it in commands; path is the public URL.

md
---
id: questions
path: /questions
title: Questions
---

# Questions

Write prose and [link to another page](/help).

```component
name: accordion
items:
  - title: When do edits go live?
    answer: When you explicitly publish this page.
```

pnpm foliwake page check validates pages and component data, reporting file, line, column and a suggested fix. pnpm foliwake dev serves working files at http://127.0.0.1:3000/; diagnostics are also available at /_dev/diagnostics.

Local raster images can be referenced with a relative path such as ./images/road.jpg. Foliwake generates sized variants and strips metadata. Remote image URLs and SVG images are not supported in current content. A source may also name pictures by an art key, ![alt](art:watering/can-near-bed), resolved in the folder _art/ by the page's country (see art keys). Images after the first section load lazily, when the reader scrolls near them (site setting media.loading, see configuration and storage).

Tables use GitHub-style pipe syntax: a header row, a --- row (:---, :---: and ---: align a column left, center or right), then the rows. Cells may hold emphasis, code and links; write \| for a | inside a cell. A row with too few or too many cells is a warning, and the row is padded or cut to the header. Tables are not supported inside ::: blocks. The HTML shape is in the content contract.

Writing a file does not make it live. Continue with preview and publishing.

Readable blocks (prototype) ​

Readable Markdown blocks are a bounded prototype. A page explicitly opts in with authoring: blocks-v1; existing Markdown and YAML components remain supported.

markdown
---
id: practice
path: /practice
title: Watering practice
lang: en
authoring: blocks-v1
---
# Watering practice

Read the question, then choose an answer.

:::question

## Which tools suit watering the bed?

- [ ] Small can only
- [x] Small can and hose
- [ ] All small cans
- [ ] Hose only

> The hose reaches the whole bed; the can waters close by.

:::

Ordinary page content continues here.

The prototype also supports :::hero with a level-two heading, an optional description paragraph and an optional image. It produces the same HTML as the existing YAML hero fence:

markdown
:::hero

## Learn to water

Short lessons and clear explanations.

![A garden bed at dusk.](./images/road.jpg)

:::

It does not support arbitrary component names or section containers. Fields are plain text: unsupported formatting is an error, not silently removed. Questions have exactly one correct answer, at least two answers and a required explanation. Their interface text ("Answer and explanation", "Correct answer") is English or Russian, chosen from the page lang; a page without lang uses the site shell language, English. Any other language on a page with a question is an error rather than a silent fallback. Their frontend must declare and provide the question component.

Markers need their own lines, with blank lines around the enclosed content. A normal Markdown viewer shows the markers and the answer key; use Foliwake’s local preview to see the interactive card. Correct answers are delivered to the browser: this is practice content, not secure examination scoring. See current limitations.

Labels, articles and other references in text ​

When the site code declares a reference kind (a file references/<kind>.json, for example sign or law), write a reference as inline code or as a link:

markdown
Water at `sign:2.4`. See [Morning and evening together](law:article_29_10).

`sign:2.4` becomes the sign's picture, with its name (in the page language) as the alternative text; [text](law:…) keeps your text and becomes a link or a marked term. Which table entry is used depends on a page field the table names, such as country: ge. It works in running text, headings, tables and the fields of blocks.

  • To show the text itself, put a space after the colon: `sign: 2.4`, or use a code block.
  • An unknown value (`sign:2.44`) is a warning: the page is published, the code stays visible and is marked, and the warning suggests the nearest value. A value that does not look like one (`sign:2,4`) stays plain code, with a warning.
  • A page without the field the table needs (country) is an error: add it to the front matter, or ask for it in the source's mapping rule.

The tables are site code: they change with a code release, and a page shows the table of the code it was prepared with. See the contract, content-components.md §3.7.