A static site server for Forgejo/Gitea instances. https://pages.gay
Go to file
hazycora 06a35520c3
All checks were successful
Deploy to VPS / build_site (push) Successful in 4s
fix error page status codes
how did this bug last this long
2024-05-17 22:03:38 -05:00
.forgejo/workflows use keydb-cli in deploy.yml 2024-04-03 19:05:53 -05:00
cache check err != nil before fallback check 2024-04-26 14:50:12 -05:00
certificates Use SubjectTransformer, update dependencies 2024-04-25 01:54:43 -05:00
errors add error pages 2024-03-29 23:03:26 -05:00
forgejo re-fetch if value of file is suddenly empty 2024-04-05 22:11:37 -05:00
handler fix error page status codes 2024-05-17 22:03:38 -05:00
pagerouter make requests add .html & .htm file extensions as fallback 2024-04-26 14:59:19 -05:00
redirects change code structure 2024-03-26 13:41:12 -05:00
render rework PageRouters heavily 2024-04-05 16:31:05 -05:00
utils add error pages 2024-03-29 23:03:26 -05:00
views fix code blocks in markdown.tmpl 2024-04-25 02:43:34 -05:00
.gitignore Rewrite in Go 2023-10-23 03:45:45 -05:00
go.mod [chore] go mod tidy 2024-04-26 14:57:38 -05:00
go.sum [chore] go mod tidy 2024-04-26 14:57:38 -05:00
LICENSE.md Relicense to OQL 2024-04-16 16:38:49 -05:00
local_test exit on error local_test 2024-04-03 18:02:07 -05:00
main.go Use SubjectTransformer, update dependencies 2024-04-25 01:54:43 -05:00
README.md Relicense to OQL 2024-04-16 16:38:49 -05:00
serve.go fix alt-svc header 2024-04-05 16:28:20 -05:00


A static site server for Forgejo instances.


sign into git.gay and make a repository called "pages". place static files in the repository (index.html for the homepage!) on the default branch, and visit https://username.pages.gay in a browser!

you can make a page for a project by making a branch named "pages" in another repository, and putting your static files there. it can then be accessed at https://username.pages.gay/repo.

custom domains

to use a custom domain, create a .domains file in your repository with the domain you'd like to use.

then, add a DNS CNAME record on your domain pointing to [[branch.]repo.]user.pages.gay.

for apex domains, where CNAME records don't work, just add an A record pointing to, an AAAA record pointing to 2605:a142:2135:4519::1, and a TXT record with the content [[branch.]repo.]user.pages.gay.


selfhosting the pages.gay server somewhere else is simple- but you need a separate host for this. unlike typical web servers, where you can put them behind nginx and be fine, this server handles its own SSL in order to support custom domains.

git clone https://git.gay/gitgay/pages
cd pages
go build

configuration is done through a .env file:

# the PAGES_DOMAIN should be just the domain, with no leading period:
# FORGEJO_USER_URL is needed for generated repository links if FORGEJO_URL is a local address inaccessible by users

# mock ACME_DIRECTORY_URL, useful for testing:
# ACME_DIRECTORY_URL=https://acme.mock.directory/
# staging LetsEncrypt:
# ACME_DIRECTORY_URL=https://acme-staging-v02.api.letsencrypt.org/directory
# actual LetsEncrypt:

# A Cloudflare API token with Zone Edit permissions for the domain you'll be hosting this on.
# This is used for solving the ACME challenges.


  • username.pages.gay pages
  • username.pages.gay/repo pages
  • custom domains
  • https support
  • auto-renewal of certificates
  • support SPAs with _redirects file
  • markdown rendering (set back with go rewrite, TODO!)


the pages.gay server is copyright (c) hazycora 2023. it's under the OQL.

made with ❤️ by besties