A CMS I built for my own website, using GO and SQLITE https://thomasorus.com/ronbun
  • Go 38.2%
  • Go Template 35.1%
  • CSS 23.9%
  • JavaScript 2.2%
  • Shell 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-06 20:04:38 +02:00
cmd/web Added /uploaded/ path to audio files 2026-09-06 19:53:28 +02:00
internal Remove ability to create new users once of has been created. 2026-05-26 17:21:24 +02:00
tooling Added lightningcss binary and notes on how to use it, minified css 2025-04-21 22:22:59 +02:00
ui Revamped the editing experience 2026-09-06 20:04:38 +02:00
.air.toml Updated air.toml to optimize builds 2026-05-25 21:12:15 +02:00
.gitignore Created build script to avoid building on the production server 2026-05-21 17:21:38 +02:00
deploy.sh Create deploy.sh 2026-05-21 17:21:55 +02:00
download-bdd.sh Added script to download the production BDD 2026-05-24 19:23:17 +02:00
download-processed.sh Added new download scripts to simulate prod 2026-07-18 00:55:20 +02:00
download-uploaded.sh Added new download scripts to simulate prod 2026-07-18 00:55:20 +02:00
go.mod Added search + rate limiting on public POST endpoints 2026-05-26 00:12:54 +02:00
go.sum Added search + rate limiting on public POST endpoints 2026-05-26 00:12:54 +02:00
README.md Updated readme 2026-05-25 21:28:10 +02:00

Ronbun-CMS

A personal CMS created to learn Golang and SQL. To learn more about the goals of the project, you can read this blog post.

The project was made following Alex Edward's excellent Let's go book. I changed a lot of things, and had the author's authorization to share the code.

Road to open source

  • Create a new table for static data like the site title, rss feed name, etc
  • On first launch, redirect to account creation, then on site customization, then create default pages : 1st blog post, about page, etc
  • Remove my design files but keep the necessary styles
  • Popup before "Delete this page" happens
  • Show archive of pages on the home by default
  • Rewrite the AI image processing code
  • Write tons of tests

Local Development

You need to make a few preparations to dev locally.

Requirements

  • Go 1.24

Create a self-signed cert

In order to have https locally, we need to create a self-signed certificate using the generate_cert.go file. On mac if Go was installed with homebrew:

mkdir tls
cd tls
go run /opt/homebrew/Cellar/go/1.24.1/libexec/src/crypto/tls/generate_cert.go --rsa-bits=2048 --host=localhost
cd ..

Give lightning CSS the right to execute

chmod +x ./tooling/lightningcss

Live reload

Then use air to launch the project in dev mode:

go tool air -- -dev

Visit

Build to production

Unfortunately the webp package needs cgo, install a compiler with

brew install FiloSottile/musl-cross/musl-cross

And then run:

CC=x86_64-linux-musl-gcc CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static"' -o ./build/ronbun ./cmd/web/