Build and publish
Build Hill Notes for publishing, and put it on a web host.
The built site is a folder of plain files that any web host can serve.
Build it
Stop statac serve with Ctrl+C, and in the site’s folder:
statac build
Wrote 6 pages and 1 other file to `_site` in 0.00 seconds.
_site now holds the whole site, as plain files:
_site/index.html
_site/about/index.html
_site/walks/index.html
_site/walks/ben-ledi/index.html
_site/walks/ben-vorlich/index.html
_site/walks/schiehallion/index.html
_site/site.6c2c6beb.css
Each page is an index.html in a folder named by its URL. The
stylesheet’s name has a mark that changes whenever the stylesheet
does, so that a browser never shows an old copy. See
Building and publishing.
Give the site its URL
Add the URL you will publish the site at to statac.yaml:
url: https://hillnotes.example
Hill Notes builds the same without it. Feeds, social cards, a sitemap and webmentions need the URL, and Statac leaves each out until you set it, with a note saying so. Set it now, so that each works as soon as you add it.
Keep published.txt
statac serve and statac build keep a list of every URL the site has
published, in published.txt. If you keep the site in git, commit
published.txt with it. If you later rename a page, so that the site no
longer publishes its old URL, Statac warns you and gives the line that
keeps the old URL working. See
keep track of published URLs.
Put it on a host
Any web host that serves plain files can serve the site. Copy the
contents of _site to the folder your host serves from. On a host you
reach over SSH, rsync copies only what changed:
rsync -a --delete _site/ ailsa@hillnotes.example:/var/www/hill-notes/
--delete removes files from the host that the site no longer has. To
upload after every build, see put it on a host.
What next
You’ve published Hill Notes. From here, each part of the site has a guide of its own:
- Writing: links, images, code and callouts in a page’s content
- Lists, tags and series: tag pages, pagination, and lists of your choosing
- Feeds, sitemaps and other files: a feed for the walks
- Drop-ins: ready-made snippets for photos, videos, search and more
More parts of this tutorial are coming: see what’s coming.
Something unclear or wrong? Open an issue.