static
Static is a minimalist? personal? static site generator written in Go.
Features
- Markdown content with YAML frontmatter
- HTML templates
CHILDREN markers to embed lists of pages
- RSS 2.0 feed generation
- Minify (HTML (generated output), CSS, JS)
- Sitemap generation
- Syntax highlighting of code blocks
- Development server with live reload (only watches for changes ^^', not hot reload)
Requirements
Installation
git clone ssh://git@codeberg.org/shiftwave/static.git
cd static
go build ./cmd/static
Usage
# Build the site
./static --build <source_directory> # or directly ./static <source_directory>
# Build and serve with live reload
./static --serve <source_directory>
# Custom port (default: 8080)
./static --serve --port 3000 <source_directory>
The generated site is written to ./dist/ by default (you can choose with the param --output).
Configuration
The site is configured via a config.yaml file at the root of the source directory.
You can use the example.config.yaml file as a template.
Feed frontmatter
For a page to appear in the RSS feed (If you make a blog), it must have the following frontmatter fields (I reduced the list at maximum I could):
| Field |
Type |
Description |
title |
string |
Title of the post |
date |
date |
Publication date (2006-01-02 or RFC 3339) |
description |
string |
Short description shown in feed readers |
Optional fields:
| Field |
Type |
Description |
author |
string |
If it's an other author, overrides the feed-level author_name |
tags |
list |
Mapped to RSS <category> elements |
Example page frontmatter:
---
title: "Hello, world!"
date: 2026-07-27
description: "My first post."
author: "Doctor Who"
tags: ["hello-world", "discover"]
---
Markers
Currently, the only marker created is CHILDREN.
Use CHILDREN markers in your Markdown to embed a list of child pages:
<!-- CHILDREN:blog layout="list" limit=5 sort="date" order="desc" -->
| Attribute |
Default |
Description |
layout |
list |
Template name used to render the list |
sort |
date |
Frontmatter field to sort by |
order |
desc |
asc or desc |
limit |
0 |
Maximum number of items (0 = all) |
License
This project is licensed under the GPL-3.0 license. See the LICENSE file for details.