A lightweight static site generator for documentation, built in Go.
- Fast builds — Compile Markdown to HTML in milliseconds
- Simple configuration — YAML-based site configuration
- Themeable — Customizable HTML layouts with Go templates
- Navigation — Automatic sidebar navigation from page weights
- Search — Full-text search index generation
- RSS — Automatic RSS feed generation
- Sitemap — XML sitemap generation
- Dev server — Live reload development server
# Install
go install github.com/EdgarOrtegaRamirez/siteforge/cmd/siteforge@latest
# Initialize a new site
siteforge init
# Build the site
siteforge build
# Serve locally
siteforge serveCreate a siteforge.yaml file:
title: My Documentation
description: Project documentation
base_url: https://example.com/
theme: default
language: en
build:
out_dir: public
content_dir: content
theme_dir: themes
static_dir: staticCreate Markdown files in the content/ directory with optional front matter:
---
title: Page Title
weight: 1
---
# Page Title
Your content here.siteforge/
├── content/ # Markdown content files
├── static/ # Static assets (CSS, JS, images)
├── themes/ # HTML themes
│ └── default/
│ └── layouts/ # HTML templates
├── siteforge.yaml # Site configuration
└── public/ # Generated output
| Command | Description |
|---|---|
siteforge init |
Initialize a new site |
siteforge build |
Build the static site |
siteforge serve |
Start development server |
siteforge version |
Print version |
cmd/siteforge/ CLI entry point (Cobra)
internal/
├── build/ Build pipeline orchestrator
├── config/ YAML configuration parser
├── feed/ RSS feed generator
├── markdown/ Goldmark-based Markdown renderer
├── nav/ Navigation sidebar builder
├── search/ Full-text search index builder
├── serve/ Development file server
├── sitemap/ XML sitemap generator
└── template/ Go template engine
- Markdown parsing — Goldmark (CommonMark-compliant)
- Navigation sorting — Weight-based with title fallback
- Search indexing — TF-IDF-style scoring (title matches weighted 10x)
- Front matter parsing — Simple key:value extraction
- Slug generation — Lowercase, hyphenated, alphanumeric only
MIT