Add the necessary boilerplate for cli.ts to provide more than one
command, with the resource gathering step split out from the build
step in order for it to be re-usable.
The paths changed in d003ea01 to start with a forward slash, this broke
the create folder detection logic as now it matched the first slash of
the path instead of sub-folder in the path. Fix by ignoring the first
character in the path.
Write all links as absolute refs from the virtual root of the website's
path namespace and then transform these into relative links with the
resolveRefs utility function.
Provide a transformation function that maps absolute references to
resources into relative references based on the location of a page.
This makes it possible to use the same links across multiple pages
in the hierarchy that works when loaded as files from the filesystem.
Set up the basic layout of the site and greybox its content based on
statically generated pages. Content pages uses general base layouts
defined centrally to avoid duplicating code.