Rewritten version of jsSiteBuilder.