The checks of a build

flight-manual build checks each page and the style of a site. Some faults stop the build, and the others are warnings. With -strict, each warning is an error too, and the build writes no file.

Errors

An error stops the build, and the build writes no file. Each error line starts with the file and, for the site file, the line number. The tables give the text of each error after the file name, its cause, and its repair. A word in capitals, such as KEY, stands for a value.

The site file

Error Cause Repair
a line is not a list of words A line has a quote or a brace in a place where Tcl does not allow it. Put the value in braces: title {A "quoted" name}.
a brace or a quote has no end A value in braces or quotes has no closing brace or quote. Add the closing } or ".
each line is a key and one value: WORDS A line has more than two words. Put a value with spaces in braces: title {My site}.
unknown key "KEY" of format 1 The key is not one of the keys. Fix the name of the key, or remove the line.
the key "KEY" is twice in the file The same key is on two lines. Remove one of the lines.
the first key must be "format 1" The file does not start with format 1. Make format 1 the first key.
format N is not known: must be 1 The value of format is not 1. Write format 1.
the key "KEY" is missing A key that each site needs, title or url, is not there. Add the key.
url must start with http:// or https:// and end with "/": URL The URL has no scheme or no / at its end. Write the full URL of the site, such as https://example.com/docs/.
assets is a list of pairs: a source and its folder in the output The value of assets has an odd count of words. Give each source a folder: assets {docs/images images}.
the capability "CAP" of a plugin is not known: must be file The key allow has a word other than file. Write allow file, or remove the key.
repo must start with http:// or https:// The value of repo is not a URL. Write the URL of the repository.
search must be json, 1, or 0 The value of search is not known. Write search 1 or search 0.

The list of pages

Error Cause Repair
a group line is "group NAME" A group line has no name, or more than one word. Write group Guides, or group {Start here}.
a page line is "FILE ?PATH? ?LABEL?": WORDS A page line has more than three words. Put a label with spaces in quotes or braces.
a page is a Markdown file (.md): FILE The file of a page does not end with .md. Name the Markdown file of the page.
a page path is "", a folder that ends with "/", or a file .html: PATH The page path has another form. Write "", install/, or about.html.
a page path is relative and has no "..": PATH The page path starts with / or has ... Write the path from the top of the site.
the file FILE is twice in the list One Markdown file is on two lines. Remove one of the lines.
the page path "PATH" is twice in the list Two pages have the same path. Give one of them another path.
the folder of pages "DIR" does not exist There is no key pages, and the folder of the key docs does not exist. Make the folder, or give the key pages or docs.
the file of pages "FILE" does not exist The key pages names a file that does not exist. Fix the path. It is relative to the folder of the site file.
the site has no pages The list of pages is empty. Add a Markdown file to the folder docs, or a page to the list.
the page FILE does not exist A page of the list has no file. Fix the path, or make the file.
the page path search/ is the page of the search: give the page another path A page has the path of the search page. Give the page another path, or turn the search off with search 0.

The outputs

Error Cause Repair
two pages go to FILE Two pages give the same output file. Give one of the pages another path.
two files go to FILE: A and B Two assets, or an asset and a page, give the same output file. Change the folder of one of the assets in the key assets.
two files go to FILE: the build and SOURCE An asset has the path of a file that the build writes, such as sitemap.xml. Change the folder of the asset.
two files go to FILE: the search and SOURCE An asset has the path of search.json or assets/search.js. Change the folder of the asset.
a plugin and SOURCE both write FILE The hook files of a plugin gives a path that another file has. Change the path in the plugin.
the asset "SOURCE" does not exist A source of the key assets does not exist. Fix the path. It is relative to the source folder.
Error Cause Repair
link to a file that is not a page or a file of the site: HREF A relative link goes to a file that is not a page or an asset, and the site has no key repo, or the file is outside the source folder. Fix the link, add the file to assets, or add the key repo.
link to a missing page of the site: HREF A full link to the URL of the site, such as https://example.com/docs/instal/, goes to no page or file. Fix the link.
link to a missing anchor: HREF The page of the link has no heading or element with this id. Fix the anchor. The anchor of a heading is its text in lower case with - for each space.

The style and the plugins

Error Cause Repair
the style "NAME" is not a built-in style (modern) or a folder The key style names no built-in style and no folder. Fix the name or the path.
unknown slot {{NAME}}: the slots are ... A template has a slot that does not exist. Use one of the slots.
the slot {{content}} must be in a <main> element page.html breaks a rule of the page template. Put {{content}} in <main id="main">.
the <main> element needs an id for the skip link The <main> element has no id. Add an id: <main id="main">.
a <nav> element needs a name (aria-label) A <nav> has no aria-label. Add a name: <nav aria-label="Pages">.
the first link must go to the main part: href="#ID" The first link of the template is not the skip link. Make the first element <a href="#main">Skip to the content</a>.
the plugin FILE does not exist The key plugins names a file that does not exist. Fix the path. It is relative to the folder of the site file.
PLUGIN: HOOK: MESSAGE A hook of a plugin raised an error. Read the message, and fix the plugin.
FILE: MESSAGE The Markdown of a page, or a hook of a plugin for that page, raised an error. Read the message.

Warnings

Check The fault
Alternative text A picture of the Markdown with no text, such as ![](pic.png). A picture that is only decoration has an empty title: ![](pic.png ""). On a page of a plugin, an <img> with no alt attribute.
Headings A heading that is more than one level below the heading before it, such as an h4 after an h2. The first heading of a page must be an h1.
Contrast A pair of colors of a style sheet of the style below its least ratio: 4.5 to 1 for text, and 3 to 1 for the focus ring and the lines of a control (WCAG 2.2 AA). Styles and templates lists the pairs. The check reads each .css file of the style folder, in the light and the dark theme.

A warning names the file and the fault. A warning of a Markdown page also names the line of the heading or the picture:

flight-manual: warning: docs/index.md:5: the heading h3 "Deep" skips a level after h1

A warning of a page of a plugin names the page path, and a warning of the contrast names the style sheet. flight-manual check gives the same warnings with no output folder (Commands).

Next: How a build works.