Fork me on GitHub
I AM TACK.

tack

a sustainable static site generator

Background

A static site generator has one, arguably pretty easy, job: To fill existing HTML templates with content provided by the user in text form.

Since 2012, this project's goal is provide a tool does this job well enough, but on the other hand ensures, that the tool stays simple enough to still work exactly the same way in one, five, or ten years from now:

No feature creep, no incompatible configuration files, or deprecated template languages.

About

Tack is a command-line application that compiles input files in various markup languages into a static website. It is strongly modeled after Bonsai[1] & Stacey and is a lot less complex to setup and operate than nanoc, or more modern alternatives, like Hugo.

The software is written in Go and is available for FreeBSD, Linux, macOS, NetBSD, OpenBSD, and Windows.

Installation

On a Mac, simply run:

brew install roblillack/-/tack

For other operating systems, feel free to download binaries from the release page or install from source (you will need to have Git and Go installed) like this:

go get github.com/roblillack/tack

Commands

Project structure

A tack project dir basically is structured like this:

Managing content

Any page of your site will have to be in its own directory. The template used to render a page will be taken from the basename of the metadata file, with a fallback of default if page metadata file exists.

The URL component, or permalink, of a page is derived from the directory name. A potentially leading enumeration prefix is trimmed from the name.

Example:

Given this content/ directory inside a project dir:

content/
├── about-me
│   ├── default.yaml
│   ├── body.md
│   └── me.jpg
├── bikes
│   └── body.md
└── work
    └── serious.yaml

a website would be created that contains three pages:

Special Variables

Next to the user-provided page and site variables, the following special variables are available to use in the templates:

For any page:

Additionally, the currently being rendered page gets these special variables:

Extending tack

Tack does not contain any plugin functionality. To extends this tools functionality, built something around it to automatically generate content or metadata files.

Software tack is based on

Plumbing together a tool like this in virtually no time would not be possible without an ecosystem of frameworks and libraries that you'll only find in the OSS space. Tack is standing on the shoulders of the following giants:

Earlier versions of the tool (up until 0.5.1) were written in C# and leveraged the “Common Language Runtime (CLR)”. These versions used the following libraries:

License

MIT/X11

Footnotes

[1]: Tack should even be downward compatible to older Bonsai versions (up until ~1.2.x). As long as Mustache (instead of Liquid) is used as a template language and LESS (instead of SASS) for style sheets, most Bonsai sites shall be tack-able out-of-the-box.