Static site generator using Go templates.
Find a file
2026-03-19 23:11:50 +01:00
.gitignore Added gitignore 2026-03-19 22:47:03 +01:00
go.mod Automatically refresh on file changes 2026-03-19 22:47:40 +01:00
go.sum Automatically refresh on file changes 2026-03-19 22:47:40 +01:00
License.txt Added license and readme 2026-03-18 04:04:32 +01:00
main.go Use 0755 instead of 0644 for directories 2026-03-19 23:11:50 +01:00
Readme.md Automatically refresh on file changes 2026-03-19 22:47:40 +01:00
root.go Initial commit 2026-03-18 03:56:55 +01:00

sitegen

Static site generator using Go templates.

Installation

go install codeberg.org/nimbletools/sitegen

Usage

Make a layout.html and a pages folder. In your layout, use {{ yield . }} somewhere. This is where the page contents will go. Routes are automatically computed from the files and folders in pages. You can use the static folder for any static files.

To start a development server in the current directory:

sitegen watch

When the development server is running, the browser will automatically refresh the page when a file is updated on disk.

Building

To build the static site to the build folder in the current directory:

sitegen build

Example structure

* `layout.html`
* `pages/index.html` -> `/`
* `pages/about.html` -> `/about`
* `pages/projects/index.html` -> `/projects`
* `pages/projects/sitegen.html` -> `/projects/sitegen`