Preview, check and deploy from your terminal.
pagehaus is a small, free tool for plain HTML sites. See your site on your computer
exactly as it will be online, includes and all; catch broken links before your visitors do; and upload it in
one command.
pagehaus serve
Your site at localhost, with Server Side Includes filled in and your own 404 page. Pages reload by themselves when you save.
pagehaus check
Broken links and images, Photo.JPG linked as photo.jpg, links to
files on your computer, missing titles. Works on any static site.
pagehaus deploy
Uploads the folder to your Pagehaus site, after checking it. Try it first with
--dry-run; undo it from your site's history.
Install
Homebrew (macOS, Linux):
brew install pagehaus/tap/pagehaus
Or download it. macOS (Apple silicon; Intel Macs: osx-x64) and Linux
(linux-x64, linux-arm64):
curl -L https://github.com/pagehaus/cli/releases/latest/download/pagehaus-osx-arm64.tar.gz | tar -xz pagehaus
sudo mv pagehaus /usr/local/bin/
Windows: download pagehaus-win-x64.zip and unzip it.
With .NET: dotnet tool install -g pagehaus.
All downloads: the latest release.
What it looks like
$ pagehaus check
Checked /Users/sam/bakery: 5 pages, 7 files.
problem: links to /img/team.jpg, but the file is named img/Team.JPG. That works on Windows and Mac, not on a web server: the case must match.
in about.html, index.html, menu.html
1 problem, 0 warnings.
$ pagehaus deploy
Deploying to bakery: 7 files, 84.2 KB zipped...
1 new: /menu.html
6 replaced: /404.html, /about.html, /img/Team.JPG, /index.html, /style.css, /thanks.html
Done: https://bakery.pagehaus.site/
Open source
The tool is MIT-licensed, at github.com/pagehaus/cli. Its Server Side Includes engine is the one Pagehaus hosting uses, so what you preview is what you get, and it's on NuGet as Pagehaus.Ssi for your own .NET projects. To deploy from GitHub on every push, there's the Deploy to Pagehaus action. Our website templates are open source too.
Built with open source
Pagehaus itself stands on open-source software, and we're grateful to the people who make it: nginx, Caddy, SFTPGo, ClamAV, .NET, SQLite and restic.
Questions
Is it free?
Yes, and open source (MIT licence). serve and check work on any static site, hosted anywhere. deploy uploads to Pagehaus, on any plan, Free included.
Do I need .NET or anything else installed?
No. The downloads are a single file for Windows, macOS or Linux. If you already have the .NET SDK, dotnet tool install -g pagehaus works too.
How is pagehaus serve different from other local servers?
It processes Server Side Includes the way Pagehaus does (the same code), shows your 404.html for missing pages, and reloads open pages when you save a file. Most local servers either don't do includes at all, or need Apache configured for them.
Does deploy delete files I removed?
Not yet: new and changed files are uploaded, and files you deleted on your computer stay on your site until you delete them in the dashboard. Every deploy is saved in your site's version history first.
Can I deploy from GitHub Actions or another CI?
Yes. On GitHub, use the Deploy to Pagehaus action from the Marketplace: three lines in a workflow. Anywhere else, set the PAGEHAUS_TOKEN environment variable to an API token instead of logging in.
Can I use the Server Side Includes engine in my own code?
Yes: it's the Pagehaus.Ssi package on NuGet, for .NET. It does what Apache's mod_include does (include, echo, set, config, flastmod, fsize; no exec), with limits that keep untrusted pages safe.