The site itself is structured with a single top-level page and a
series of posts beneath that (in the posts
directory). It is
hosted in an AWS S3 bucket fronted by Cloud Front.
The source for each page or post is an Org document. The top-level
page sources can be found in pages
and that for posts in
posts
. The Org documents are published to HTML via HTML export into a directory named
www
.
The publication process is run by invoking Emacs, telling it to load
the file lisp/indie-org.sh.el
, and telling it to invoke the
function iosh/publish
therein:
emacs --batch -l lisp/indie-org.sh.el --eval '(iosh/publish)'
When publishing to the live site, the www
directory is simply
copied to the S3 bucket using the aws
CLI.
Since it is tedious to type these commands over & over, a Gnu
Makefile
is provided: building the site locally is
make
and publishing it is make prod
.
The remainder of this chapter is a guided tour of the code intended to leave the reader in a position to put their own Org-generated static site on the Indieweb. Much of the work has been encapsulated in the indie-org Emacs package, but there is still a fair amount of per-site customization required.