Go re-implementation of Typecho, a lightweight blog platform.
Pre-alpha. See PLAN.md for the milestone roadmap.
MySQL, MariaDB and SQLite are intentionally not supported. If your existing
Typecho site runs on MySQL, migrate to PostgreSQL first (e.g. with pgloader)
before pointing typecho-go at the database.
cp config.example.yaml config.yaml
# edit config.yaml — at minimum set db.dsn and site.secret
make run
curl http://127.0.0.1:8080/healthz
make build # local binary -> bin/typecho
make release # cross-compile linux/amd64, linux/arm64, windows/amd64, darwin/arm64
Unit tests are pure-Go and run offline:
make test
Integration tests require a reachable PostgreSQL. Point the
TYPECHO_TEST_DSN env var at one; tests are gated by the integration build
tag:
export TYPECHO_TEST_DSN='postgres://tc:tc@localhost:5432/tc?sslmode=disable'
make test-integration
CI (CNB) starts a postgres:16-alpine service and exports the DSN
automatically; see .cnb.yml.
HTTPS is opt-in. Set server.https.enabled: true and provide cert_file / key_file
in config.yaml. HTTP-to-HTTPS redirection is a separate switch
(server.https.redirect_http).
| Aspect | Typecho (PHP) | typecho-go |
|---|---|---|
| Runtime | PHP 7.4+ | Single static Go binary |
| Database | MySQL / PostgreSQL / SQLite | PostgreSQL only |
| Theme engine | Native PHP includes | Go html/template — PHP themes not compatible |
| Plugin system | PHP hook dispatch | Go compile-time registration + runtime enable/disable — PHP plugins not compatible |
| URL structure | Configurable permalinks | Same |
| DB schema | typecho_* (7 tables) | Same |
| Passwords | phpass ($P$...) | phpass verification + bcrypt for new; transparent upgrade on first login |
| XML-RPC | Built-in | Opt-in via config.yaml |
MIT. See LICENSE. Inspired by Typecho (GPL-2.0) — schema and URL layout reused for compatibility, no PHP source code included.