Getting Started
Download
You can download one of the following pre-built HastySite binaries:
Building from Source
Alternatively, you can build HastySite from source as follows:
- Download and install nim.
- Download and build Nifty, and put the nifty executable somewhere in your $PATH.
- Clone the HastySite repository.
- Navigate to the HastySite repository local folder.
- Run the following command to download HastySite’s dependencies.
nifty install
- Run the following command to compile HastySite:
nim c -d:release hastysite.nim
Tip
You should put the compiled HastySite executable somewhere in yout $PATH.
Running HastySite
To create a new site, run the following command in an empty directory:
hastysite init
This will create the following default directory structure:
- assets/ — Your site assets
- fonts/
- styles/
- contents/ — Your site contents.
- output/ — Your static web site.
- rules.min — Rules to process your contents and assets.
- scripts/ — Scripts to manage your site.
- settings.json — Your site configuration.
- temp/ — Temporary files and folders will be placed here.
- templates/ — Mustache templates.
Tip
Default folder paths can be configured in your settings.json file.
Then, create your first page by running the following command and specifying the page ID and Title:
hastysite page ID: home Title: Home Page ----- id: home title: "Home Page" content-type: page ----- Create page? [yes/no]: y
Finally, run the following command to generate your site contents (just an empty home page for now) and copy the default assets.
hastysite build Preprocessing... Processing rules... - Writing file: output/index.html - Copying: assets/fonts/SourceSansPro-Regular.woff -> output/fonts/SourceSansPro-Regular.woff - Copying: assets/fonts/SourceSansPro-It.woff -> output/fonts/SourceSansPro-It.woff - Copying: assets/fonts/fontawesome-webfont.woff -> output/fonts/fontawesome-webfont.woff - Copying: assets/fonts/SourceCodePro-Regular.woff -> output/fonts/SourceCodePro-Regular.woff - Copying: assets/fonts/SourceSansPro-Bold.woff -> output/fonts/SourceSansPro-Bold.woff - Copying: assets/fonts/SourceSansPro-BoldIt.woff -> output/fonts/SourceSansPro-BoldIt.woff - Writing file: output/styles/hastysite.css - Writing file: output/styles/site.css - Writing file: output/styles/luxbar.css - Writing file: output/styles/hastyscribe.css - Writing file: output/styles/fonts.css Postprocessing... All done.
That’s it! You can view the result by serving the output directory from any web server.