Getting started

Your first site with ssg

From nothing installed to a built site and an audit report.

How do I install it?

With Rust 1.89 or newer, from crates.io:

cargo install ssg
ssg --version

Or download a prebuilt package from the 0.0.69 release: .tar.gz archives for Linux (glibc and musl) and macOS, a .zip and an .msi for Windows, and .deb, .rpm and .pkg packages. Each has a .sha256 file and a .asc signature beside it; the security page shows how to check them.

How do I start a project?

ssg -n mysite
cd mysite

This creates config.toml, content/, data/, static/ and templates/. It uses the older command-line form, so ssg prints a deprecation warning; the form still works and is due to be removed in 1.0.

How do I build it?

ssg build -f config.toml

The site is written to the output_dir in config.toml, public/ in a new project. The build prints the quality gate's score as it finishes.

How do I preview it?

ssg dev -f config.toml

Open https://static-site-generator.com/. Changes to content or templates rebuild the site and refresh the page.

How do I check it?

ssg check -f config.toml            # validators only, writes nothing
ssg audit -o public -f config.toml  # the fifteen gates, on the built files

Run the audit before you deploy. On a freshly scaffolded project it reports findings to fix, such as the placeholder base_url; set base_url to your site's address and work through the rest.

How do I deploy it?

ssg deploy --target github-pages -f config.toml

The command reference lists the other targets.