Add an HTTP server for development purposes that replies to requests
with both the static resources and on the fly generated pages. This
serves the following needs.
- Modern module scripts requires an origin supporting CORS policies,
which is not supported when pages are read from disk by the browser.
- Provide a way for implemting automatic reloading of pages when changes
are made to the source files.
- Act as the starting point for making interactive features such as
comments and analytics.
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.