In this guide you will learn how Spress works and how easy is to publish a site.
The best way to get Spress is to download the PHAR file:
$ curl -LOS https://github.com/spress/Spress/releases/download/v2.1.3/spress.phar $ chmod +x spress.phar
if you want use the executable globally, move it to
$ sudo mv spress.phar /usr/local/bin/spress
Globally installing of Spress involves a few steps:
C:\Users\username> cd C:\bin C:\bin> echo @php "%%~dp0spress.phar" %%* > spress.cmd C:\bin> exit
C:\Users\username> spress --version Spress - The static site generator version x.y.z
Lets create a sample site and build it. With Spress executable, you have two options:
Lets create our site using Spresso theme:
$ spress new:site /your-site-dir spresso $ cd /your-site-dir $ spress site:build --server --watch # Browse to localhost:4000
new:site command Spress creates a new site using Spresso theme. Next,
you can build your site with
site:build command. You'll get the result at
--server option launches a built-in server which lets you see your site at
--watch option tells Spress to watch your files for changes.