Write the pages

This guide shows how a Markdown file becomes a page: the title, the links, the pictures, the code, the notes, and the tables.

The title and the description

The first heading of a file is the title of its page. It is the <title> of the page and its label in the menu, unless the list of pages gives a label. Start each page with one # heading.

The first paragraph is the meta description of the page, which search engines show. Write a first paragraph that says what the reader gets from the page.

# Install

This page installs Rocket on Linux and checks that it runs.

Link to the Markdown file of a page. The build writes the link of the page:

Read [Install](install.md) first, then [the check](install.md#check).
You write The build writes, on the page guide/
install.md ../install/
install.md#check ../install/#check
#check #check
https://example.com/ https://example.com/

The anchor of a heading is its text in lower case, with a - for each space. Punctuation other than - and _ goes out: ## Check the result! has the anchor check-the-result.

A link to a page or an anchor that does not exist is an error of the build. A link to a file of the source folder that is not part of the site goes to the file in the repository, if the site file has the key repo. Else it is an error too.

A bare URL in the text, such as https://example.com/, is a link.

Pictures

The build copies only the pages and the assets to the output. Put pictures in a folder and copy it with the key assets of the site file:

assets  {docs/images images}

A pair can also name one file: assets {docs/guide/bell.png guide}. Then link to the picture with its path from the Markdown file:

![The menu of a site on a phone](images/menu.png)

Give each picture a text that says what it shows. A picture that is only decoration has an empty text and an empty title: ![](images/line.svg ""). The build gives a warning for each picture with no text and no empty title.

Code

A fenced code block with a language gets highlight for Tcl (tcl), the shell (sh, bash, shell, console, zsh), Zig (zig), and JSON (json):

```tcl
puts "Hello"
```

A block with another language, or with no language, shows the text with no highlight. Use text for output and for files with no language.

Notes

A quote that starts with [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], or [!CAUTION] is a note with a title, as on GitHub:

> [!WARNING]
> The build writes over the files of the output folder.

Tables

A table of GitHub Markdown is a table. A wide table scrolls on a narrow screen, and the page does not.

Headings

Use ## for the sections of a page and ### for the parts of a section. Do not skip a level: an ### after a # gives a warning. The headings of level 2 and 3 make the table of contents of the page.

What shows as text

Raw HTML, an HTML comment, and front matter show as text. Write Markdown, or make the HTML with a plugin.

Next: Give a site its look.