Check a site
This guide fixes the errors and the warnings of a build, and stops a site with a fault in CI.
Errors
An error stops the build, and the build writes no file. Each line names the file and the fault:
flight-manual: docs/index.md: link to a file that is not a page or a file of the site: instal.md
Fix the link or the anchor in the Markdown file, then build again. The checks lists each error.
Warnings
A warning does not stop the build:
flight-manual: warning: docs/index.md:5: the heading h3 "Deep" skips a level after h1
built 4 pages into _site, with 1 warning
A warning of a Markdown page names the file and the line. flight-manual check runs the same checks and writes no file:
$ flight-manual check
flight-manual: warning: docs/index.md:5: the heading h3 "Deep" skips a level after h1
checked 4 pages: 1 warning
| Warning | Fix |
|---|---|
| A picture with no alternative text | Give the picture a text: . For a picture that is only decoration, give an empty title: . |
| A heading that skips a level | Use the next level: ## after #, ### after ##. |
| A pair of colors below its contrast | Make the text darker or the background lighter in the style sheet, and build again. |
Stop a bad build in CI
Run check -strict in CI, or build with -strict. Each warning is then an error, and the job fails with the exit code 1:
flight-manual check -strict
flight-manual build -strict _site
With -strict, a warning prints as an error, with no word warning::
flight-manual: docs/index.md:5: the heading h3 "Deep" skips a level after h1
Next: Deploy to GitHub Pages.