Start
Installing
Statac is one program in one file, with nothing to install beside it. On a Mac, use Homebrew. On Linux, use the script. On Windows, use Scoop or a package.
Install with Homebrew
brew install statac-ssg/statac/statac
Homebrew is for a Mac, or a Linux machine that has it.
Install with the script
curl -fsSL https://get.statac.dev | sh
For Linux, or a Mac without Homebrew. The script downloads the package
for your machine, checks it against the release’s SHA256SUMS, and
puts statac in ~/.local/bin and its licences in
~/.local/share/statac. It asks for no password and changes none of
your shell’s files: if ~/.local/bin isn’t on your PATH, it gives you
the line to add.
No curl? wget -qO- https://get.statac.dev | sh does the same.
To choose the release, the folder or both:
curl -fsSL https://get.statac.dev | sh -s -- --version 0.1.0 --to ~/bin
On Linux it installs the musl package, which runs on any
distribution. The same line installs Statac on a machine that builds
your site for you. To read the script before running it, see
tools/install.sh.
Install with Scoop
scoop bucket add statac https://github.com/statac-ssg/scoop-statac
scoop install statac
For Windows with Scoop.
Install from a package
Each release has a package for each kind of machine, and a SHA256SUMS
file to check them by, at
github.com/statac-ssg/statac/releases.
| Machine | The package’s name ends |
|---|---|
| Mac with Apple silicon | aarch64-apple-darwin.tar.gz |
| Mac with an Intel processor | x86_64-apple-darwin.tar.gz |
| Linux, Intel or AMD, glibc 2.35 or later | x86_64-unknown-linux-gnu.tar.gz |
| Linux, ARM, glibc 2.35 or later | aarch64-unknown-linux-gnu.tar.gz |
| Linux, Intel or AMD, any distribution | x86_64-unknown-linux-musl.tar.gz |
| Linux, ARM, any distribution | aarch64-unknown-linux-musl.tar.gz |
| Windows | x86_64-pc-windows-msvc.zip |
A Mac needs macOS 11 or later. Ubuntu 22.04 and Debian 12 have a new
enough glibc. The musl packages run on any Linux, Alpine included.
On a Mac or Linux
-
Download your package and
SHA256SUMSinto one folder, and open a terminal there. -
On a Mac, take the download mark off the package:
xattr -d com.apple.quarantine statac-*.tar.gz -
Check the package:
shasum -a 256 --ignore-missing -c SHA256SUMSIt prints the package’s name and
OK. Anything else, stop. Noshasum? Runsha256sumwithout the-a 256. -
Unpack it, and put
statacwhere your shell looks for programs:tar -xzf statac-*.tar.gz sudo mkdir -p /usr/local/bin sudo mv statac-*/statac /usr/local/bin/Any folder on your
PATHdoes as well.
Warning:
Don’t skip step 2 on a Mac. The packages aren’t signed, and a Mac won’t run one unpacked from a file that still has its download mark.
On Windows
-
Download your package and
SHA256SUMSinto one folder, and open PowerShell there. -
Show the package’s hash:
Get-FileHash statac-*.zip -Algorithm SHA256Compare it with the package’s line in
SHA256SUMS, ignoring capitals. If they differ, stop. -
Unpack it:
Expand-Archive statac-*.zip -
Move
statac.exeto a folder on yourPath, or add its folder toPathin Windows’ settings, under “Edit environment variables for your account”.
What’s in a package?
| File | What it is |
|---|---|
statac |
The program: statac.exe on Windows |
LICENSE-MIT |
The MIT licence |
LICENSE-APACHE |
The Apache-2.0 licence |
THIRD-PARTY.md |
The work of others the program carries, and their licences |
THIRD-PARTY-GRAMMARS.md |
The grammars and themes that colour code, and their licences |
Statac is under MIT or Apache-2.0, at your choice.
Build from the source
For a machine with no package. You need:
- Rust 1.99 or later, which rustup installs
- a C compiler: Xcode’s command line tools on a Mac,
gccorclangon Linux, Visual Studio’s C++ build tools on Windows - CMake
- Perl
- NASM, on a machine with an Intel or AMD processor
In a copy of the source from github.com/statac-ssg/statac, run:
cargo install --locked --path .
The first build takes about a minute on a recent machine, and several on an older one.
Check it worked
statac --version
statac --help
--help lists the nine commands and their options, as statac alone
does. After a command, as in statac build --help, it shows only that
command’s.
Update Statac
| Installed with | Run |
|---|---|
| Homebrew | brew upgrade statac |
| The script | the script again |
| Scoop | scoop update statac |
For a package, repeat its steps with the new release’s package.
Where next?
- Getting started: make a site, watch it in a browser, then build it
- Starting a site: the four questions, and what
statac newwrites - Arriving from another tool: bring a Hugo, Jekyll, Zola or Eleventy site across
Something unclear or wrong? Open an issue on GitHub.