A first site
This page makes a site of two pages, builds it, and opens it in a browser. You need about five minutes.
The files
Make a folder with a site file and a folder docs/:
my-site/
site.fm
docs/
index.md
install.md
site.fm names the site and its URL:
format 1
title Rocket
url https://example.com/rocket/
docs/index.md is the start page, and docs/install.md is the page install/. A project with a README.md at its top can use it as the start page in place of docs/index.md: the example readme shows how.
# Rocket
Rocket is a small tool. Read [Install](install.md) first.
# Install
Put the program on the `PATH`.
## Check
Run `rocket version`.
A link to a Markdown file of the site goes to its page, and a link with #check goes to the anchor of the heading "Check".
See it
cd my-site
flight-manual serve
serve builds the site and prints its address, http://127.0.0.1:8000/. Open it in a browser. Change a page and save it: the page in the browser shows the change in about a second. Stop the server with Ctrl-C.
The build
flight-manual build -strict _site
The build writes _site/index.html, _site/install/index.html, the search page _site/search/, the style sheet of the style modern, search.json, and sitemap.xml. Copy the folder _site to a web server to publish the site (Deploy).
The menu
With no key pages, the menu has each page in the order of the paths of the files. A list of pages gives the order, the groups, and the labels:
pages {
group Start
docs/index.md
docs/install.md
group Guide
docs/launch.md launch/ "Launch the rocket"
}
The site file has each key, and Styles and templates has the look of a site.
Next: Examples.