Usage

HastySite is a simple command-line program that supports some default commands and options, described in the following sections.

Syntax

hastysite command [ options ]

Default Commands

The following sections define the default commands provided by HastySite. All of them except for init can be modified, and you can also configure your own commands by creating your own min scripts and placing them in the scripts directory.

build

Builds the site by preprocessing contents and assets, processing rules defined in the rules.min file, and creating a temporary file containing the checksums of all newly-generated files. By doing so, the next time this command is executed, only the files that have actually been modified will be copied to the output directory.

The rules.min file processed by this command:

Note

This command can be customized by modifying the scripts/build.min file within your site directory.

clean

Deletes all files and directories in the output and temp directories.

Note

This command can be customized by modifying the scripts/clean.min file within your site directory.

init

Initializes a new HastySite site directory, by creating the following directory structure:

Tip

Default folder paths can be configured in your settings.json file.

page

Generates an empty page content file containing initial metadata. This command asks the user for the following information:

After information has been provided, a new content will be created in the contents directory containing the following metadata properties:

Note

This command can be customized by modifying the scripts/page.min file within your site directory.

post

Generates an empty post content file containing initial metadata. This command asks the user for the following information:

After information has been provided, a new content will be created in the contents/posts directory containing the following metadata properties:

Note

This command can be customized by modifying the scripts/post.min file within your site directory.

Options

By default, HastySite provides the following options to display information about the program or alter its behavior.

-h, --help

Displays the description of all HastySite commands and options.

-l=level, --loglevel=level

Sets the log level to one the following values:

-v, --version

Displays the HastySite version string.