https://github.com/roblillack/tack
tack is a static site generator.
https://github.com/roblillack/tack
golang static-site-generator web website
Last synced: 3 months ago
JSON representation
tack is a static site generator.
- Host: GitHub
- URL: https://github.com/roblillack/tack
- Owner: roblillack
- License: mit
- Created: 2012-08-22T19:07:07.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2022-07-12T16:47:51.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T00:32:50.031Z (about 2 years ago)
- Topics: golang, static-site-generator, web, website
- Language: Go
- Homepage: http://burningsoda.com/software/tack/
- Size: 577 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# tack
A static site generator for the long run.
[](https://github.com/roblillack/tack/actions/workflows/go.yml)
[](https://pkg.go.dev/github.com/roblillack/tack)
[](https://coveralls.io/github/roblillack/tack)
[](https://goreportcard.com/report/github.com/roblillack/tack)

[](LICENSE)
[](https://bestpractices.coreinfrastructure.org/projects/6239)
The project's goal is to create and maintain a sustainable tool that does the
(arguably pretty easy) job of filling HTML templates with content well enough
now and in ten years when you come back to update that minimal website you own.
Website: https://burningsoda.com/software/tack \
Manpage: https://github.com/roblillack/tack/blob/master/tack.1.md
#### Installation
Download binaries for FreeBSD, Linux, macOS (ARM & Intel), NetBSD, OpenBSD, or Windows from [the release page](https://github.com/roblillack/tack/releases) or install from source (you will need to have Git and Go installed) like this:
```
go get github.com/roblillack/tack
```
#### Usage
Create directory for your site somewhere using a structure like this:
```
mysite Your website project dir
├── content Contains a subdir per page
│ ├── about-me Page will be available at /about-me
│ │ ├── default.yaml Page variables, page will use "default" template
│ │ ├── body.md One page variable "content" will hold this files'
│ │ │ content processed as HTML.
│ │ └── me.jpg All files not recognized as metadata or markup will
| | be regarded as assets and be copied to output as is.
│ ├── bikes Another page, /bikes
│ │ └── body.md Works, even if no other page variables are defined.
│ └── work Again, another page: /work
│ └── serious.yaml Different template used here.
├── templates
│ ├── default.mustache The default template, used by /about-me and /bikes.
│ └── serious.mustache Another template, used by /work
├── public Files in here will not be touched and will be copied
│ ├── style.css over to output/ as is.
│ ├── logo.png
│ └── js
│ ├── main.js
│ ├── tracker.js
│ └── library.js
└── site.yaml Optional site-wide metadata and variables
```
##### Commands
**Build the site** (default action):
```
tack
```
**Serve with auto-reload** for development:
```
tack serve
```
Opens http://localhost:8080/ and automatically rebuilds when files change.
**List all pages** in your site:
```
tack list
```
**Get help**:
```
tack help
```
##### Command Line Options
- `-d` Enable debug mode (shows detailed build information)
- `-s` Enable strict mode (fails when undefined variables are referenced)
##### Examples
Build from a different directory:
```
tack /path/to/my/site
```
Development with debugging:
```
tack -d serve
```
Strict mode for catching template errors:
```
tack -s
```
##### Supported File Extensions
- **Templates**: `.mustache`, `.mu`, `.stache`
- **Metadata**: `.yaml`, `.yml`
- **Markup**: `.md`, `.mkd`
Once you're done, copy over the content of `output/` to a hosting service of your choice.
#### Documentation
Learn more on the [tack website](https://burningsoda.com/software/tack)
#### Features that will not be part of future tack versions
There are lots of features that are more or less a standard part of static site
generators nowadays but don't really align well with the goals of the project and
therefor will not be added to tack.
- Plugin support
- Image resizing
- JavaScript transpilation
- JavaScript bundling
- JavaScript minification
#### Features that might be implemented as part of future tack versions
- Sitemap creation
- CSS transpilation (we used to have less support)
- TOML file metadata support
- Liquid template support
- More configuration options
#### Contributing
To report bugs, or to propose new features, please see [the tack bug tracker](https://github.com/roblillack/tack/issues).
If you'd like to contribute, feel free to create a pull request to implement new features or bug-fixes. Ensure that all code has a proper unit test and is written in idiomatic Go.
Regarding security concerns, please see the separate [Security Policy](./SECURITY.md)
#### License
[MIT/X11](https://github.com/roblillack/tack/blob/master/LICENSE).