A minimal, fast static site generator built with Go. Solid as granite, powered by Go.
- ✅ Minimal Dependencies - Only goldmark + chroma
- ✅ JSON Frontmatter - No YAML dependencies
- ✅ Syntax Highlighting - Built-in support for 100+ languages with custom Nord themes
- ✅ Professional Design - Clean, readable theme with Nord color scheme
- ✅ Dual Theme Support - Automatic light/dark mode switching
- ✅ Fast Builds - Go's performance for quick iteration
go install github.com/jchavarri/goranite@latestgit clone https://github.com/jchavarri/goranite
cd goranite
go build -o goranitemkdir mysite
cd mysite
# Create config
cat > config.json << EOF
{
"site": {
"title": "My Blog",
"description": "My awesome blog",
"author": "Your Name",
"url": "https://myblog.com"
},
"build": {
"output_dir": "public",
"posts_per_page": 10
}
}
EOF
# Create directories
mkdir -p content/posts static/css static/images
# Create custom CSS (or copy from example/ directory)
touch static/css/custom.css
# Create first post
cat > content/posts/hello.md << EOF
---
{
"title": "Hello World",
"date": "2024-01-15T00:00:00Z",
"tags": ["hello", "first-post"],
"summary": "My first post with Goranite"
}
---
# Hello World
This is my first post with **Goranite**!
## Code Example
\`\`\`go
func main() {
fmt.Println("Hello, Goranite!")
}
\`\`\`
Pretty cool! 🪨
EOFgoranite -build
goranite -serve # Visit http://localhost:8080Posts use JSON frontmatter between --- delimiters:
---
{
"title": "Post Title",
"date": "2024-01-15T00:00:00Z",
"tags": ["go", "blog"],
"summary": "Brief description for the homepage"
}
---
# Your Content Here
Regular **markdown** content with syntax highlighting:
\`\`\`javascript
console.log("Hello, world!");
\`\`\`goranite -build- Generate static sitegoranite -serve- Development server with auto-buildgoranite -new "Title"- Create new post (coming soon)goranite -site /path- Specify site directory (default: .)
Site configuration in config.json:
{
"site": {
"title": "Your Blog Title",
"description": "Blog description",
"author": "Your Name",
"url": "https://yourdomain.com"
},
"build": {
"output_dir": "public",
"posts_per_page": 10
},
"social": {
"twitter": "@yourhandle",
"github": "yourusername"
}
}mysite/
├── config.json # Site configuration
├── content/
│ └── posts/ # Markdown posts
├── static/
│ ├── css/
│ │ └── custom.css # Your custom styles
│ └── images/ # Static images
└── public/ # Generated site (git-ignore this)
Goranite includes custom Nord-based syntax highlighting themes:
- Light mode: Custom
nord-lighttheme with excellent contrast - Dark mode: Official
nordtheme for consistent aesthetics - Complete coverage: All language tokens properly styled
- OCaml/ReasonML: Special focus on functional programming languages
The themes automatically switch based on user's system preference via CSS media queries.
- Learning Go - Great project for Go beginners
- No Node.js - Pure Go, no JavaScript build chains
- Minimal - Only essential dependencies
- Fast - Go's performance for quick builds
- Professional - Clean, readable design perfect for technical blogs
The generated public/ directory contains static files that can be deployed to any static hosting service:
- Netlify - Drag and drop the
public/folder - GitHub Pages - Push to a repository with Pages enabled
- Vercel - Connect your repository for automatic deployments
- Traditional hosting - Upload via FTP/SFTP
- CDN services - Any service that serves static files
Most services support custom domains and HTTPS out of the box.
See CONTRIBUTING.md for development setup and architecture details.
MIT License - see LICENSE file for details.