No description
  • HTML 44.7%
  • Go 32.1%
  • CSS 23.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Satya Benson e0f675fc20 Version the stylesheet URL so CSS changes reach browsers
style.css is served without cache headers, so browsers cached it heuristically for weeks (10% of its age) and kept the old copy after the long-link fix. Pages now link it as style.css?v=<mtime>, which changes whenever the file does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 11:26:42 -04:00
static Keep logins across restarts; wrap long links 2026-10-07 10:59:20 -04:00
templates Version the stylesheet URL so CSS changes reach browsers 2026-10-07 11:26:42 -04:00
.gitignore microblog 2026-10-05 18:48:52 -04:00
config.example.json Keep logins across restarts; wrap long links 2026-10-07 10:59:20 -04:00
go.mod microblog 2026-10-05 18:48:52 -04:00
go.sum microblog 2026-10-05 18:48:52 -04:00
LICENSE microblog 2026-10-05 18:48:52 -04:00
main.go Version the stylesheet URL so CSS changes reach browsers 2026-10-07 11:26:42 -04:00
README.md Keep logins across restarts; wrap long links 2026-10-07 10:59:20 -04:00

microblog

A small single-author microblog ("Pauper") in Go. Posts are Markdown files in content/, with optional attached images in content/files/. The author logs in with a password to write, edit, pin and delete posts; readers get the post list, single-post pages, search and an RSS feed. Everything is served under /r on port 6001.

Running

cp config.example.json config.json   # then edit it
go build -o microblog .
./microblog

config.json (not tracked) holds:

  • password_hash: SHA-256 (hex) of the login password, e.g. printf '%s' 'your password' | sha256sum
  • api_key_hash: optional SHA-256 (hex) of a separate key for POST /r/api/post (header X-API-Key); when empty, the login password is accepted
  • session_secret: a long random string that signs login cookies, e.g. openssl rand -hex 32; changing it signs every browser out
  • posts_per_page, blog_url (used in the RSS feed), blog_title, blog_description

Logins are signed cookies that last 400 days and renew while you use them, so you stay signed in until you log out; restarts don't affect them. Without session_secret, a random one is made at startup and restarts sign you out.

License

MIT. The fonts in static/fonts keep their own licenses (SIL Open Font License).