No description
  • HTML 46.7%
  • Go 32%
  • CSS 21.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-18 10:02:11 -05:00
static Keep logins across restarts; wrap long links 2026-10-07 10:59:20 -04:00
templates Send composer photos one at a time; never save a cut-off upload 2026-10-25 19:38:31 -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 Update Go and Markdown dependencies; reject out-of-range pagination 2026-11-18 10:02:11 -05:00
go.sum Update Go and Markdown dependencies; reject out-of-range pagination 2026-11-18 10:02:11 -05:00
LICENSE microblog 2026-10-05 18:48:52 -04:00
main.go Update Go and Markdown dependencies; reject out-of-range pagination 2026-11-18 10:02:11 -05:00
main_test.go Update Go and Markdown dependencies; reject out-of-range pagination 2026-11-18 10:02:11 -05: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).