A self-hosted Gitea Pages server with static hosting, route filters, and JavaScript handlers.
This project is part of Dragon's Zone HomeLab.
gitea-pages serves content from Gitea repositories and adds a small routing layer on top of normal Pages-style hosting.
It is designed for self-hosted deployments and supports:
- static file serving from a Pages branch
- JavaScript route handlers with Goja
- reverse proxy routes
- custom domains
- private page access with Gitea OAuth
- caching, storage, and event helpers for scripts
For Chinese documentation, see README_zh.md.
Warning
This project is intended for self-hosted environments. Domain ownership is not verified for page aliases.
Requirements:
- Go
1.25+ make
Build:
make gitea-pagesRun:
./gitea-pages -conf config.yaml- Server configuration: config.yaml
- Page routing and security:
.pages.yamlin the page branch - JavaScript filter APIs: pkg/filters/goja/README.md
Examples are available in examples:
examples/hello_worldexamples/js_hello_worldexamples/js_routerexamples/js_storageexamples/js_wsexamples/js_sse
Run tests:
make testRun formatting:
make fmtRun a local example:
go run ./cmd/local/main.go -path examples/js_hello_worldLicensed under Apache-2.0.