Building & Previewing

When you'd like to generate your site, run the build command from within your project root:

1vendor/bin/jigsaw build

Jigsaw will generate your static HTML and place it in the /build_local directory by default.

Using the default site structure, /build_local will look like this:

build_local
assets
build
css
main.css
js
main.js
mix-manifest.json
images
jigsaw.png
index.html
source
tasks
vendor
...

Watching files for changes

To compile your site's assets and keep watching for changes, you can run the following command:

1npm run watch

Now, any time a file changes in your project, webpack will recompile your assets and Jigsaw will regenerate your updated static HTML pages to /build_local.

Previewing with PHP

To quickly preview your site, use the serve command:

1vendor/bin/jigsaw serve

You can now view your site at http://localhost:8000 in your browser.

You can also optionally specify the environment and port to serve like so:

1vendor/bin/jigsaw serve production --port=8080

This will serve your /build_production directory at http://localhost:8080.