Static Site Setup

The easiest way to setup a new project is using the CLI tool.

Install

npm i -g zox-cli

Required global tools

node to run the project

git for cloning the project

tsc for compiling typescript

Optional global tools

browserify for building frontend scripts

watchify for watching frontend scripts for changes

sass for building css

Usage

zox init <template-name> <project-name>

Example

zox init static-site-handlebars my-site

Custom templates

zox init <username>/<repo> <my-project>

Publishing

First make sure to set the remote origin for the source repository and the www repository.

Then build static files.

Finally commit and push all changes on both repositories.

Depending on which template project you used it might have a command that does all this for you, eg:

npm run build-publish

Previous article

Routing

Next article

Page Data