No description
- Go 50.1%
- HTML 31.8%
- CSS 17.5%
- Dockerfile 0.6%
|
|
||
|---|---|---|
| .emergent | ||
| memory | ||
| static | ||
| templates | ||
| test_reports | ||
| .env.example | ||
| .gitconfig | ||
| .gitignore | ||
| auth.go | ||
| db.go | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| handlers.go | ||
| helpers.go | ||
| LICENSE | ||
| main.go | ||
| models.go | ||
| README.md | ||
| templates.go | ||
blogku
A minimal hybrid micro-blog and long-form blog CMS built with Go, HTML/CSS/JS, and MariaDB.
Features
- Micro posts — short thoughts, no title needed
- Long-form posts — markdown with live preview
- RSS feed at
/feed.xml - Dark mode — automatic via
prefers-color-scheme - Single admin user — session-based auth
- Docker Compose — one command to run
Quick Start
cp .env.example .env
# edit .env — at minimum change ADMIN_PASS
docker compose up -d
Open http://localhost:8080 and log in at /login.
Environment Variables
| Variable | Default | Description |
|---|---|---|
ADMIN_USER |
admin |
Admin username (first run only) |
ADMIN_PASS |
changeme |
Admin password (first run only) |
SITE_NAME |
blogku |
Displayed in header and RSS |
SITE_TAGLINE |
micro & long-form thoughts |
Subtitle |
SITE_URL |
http://localhost:8080 |
Full URL for RSS links |
DB_USER |
blogku |
MariaDB user |
DB_PASS |
blogku |
MariaDB password |
DB_NAME |
blogku |
MariaDB database |
PORT |
8080 |
App listen port |
Routes
| Path | Description |
|---|---|
/ |
Public feed (micro + long mixed) |
/post/{slug} |
Single long-form post |
/feed.xml |
RSS feed |
/login |
Login page |
/admin |
Dashboard |
/admin/new?type=micro |
New micro post |
/admin/new?type=long |
New long-form post |
/admin/settings |
Profile settings |
Development (no Docker)
# start mariadb locally, then:
export DB_HOST=127.0.0.1 DB_USER=blogku DB_PASS=blogku DB_NAME=blogku
go run .
Stack
- Go — stdlib
net/http, no framework - MariaDB 11 — utf8mb4
- goldmark — markdown rendering
- bcrypt — password hashing
- HTML/CSS/JS — no frontend framework