A static site server for Forgejo/Gitea instances. https://pages.gay
Go to file
hazel e78ee3010c
fix handling of default branches
2023-09-25 20:49:43 -05:00
assets/fonts Improve meta tags 2023-08-01 23:35:30 -05:00
lib fix handling of default branches 2023-09-25 20:49:43 -05:00
views tweak space in markdown template between repo link and h1 2023-08-03 10:27:17 -05:00
.eslintignore initial commit 2023-07-03 21:03:12 -05:00
.eslintrc.cjs update lint rules 2023-08-02 02:45:38 -05:00
.gitignore add test.js to gitignore 2023-07-04 18:32:08 -05:00
.prettierignore initial commit 2023-07-03 21:03:12 -05:00
.prettierrc initial commit 2023-07-03 21:03:12 -05:00
LICENSE initial commit 2023-07-03 21:03:12 -05:00
README.md remove LFS mention cause I'm Not Sure 2023-07-15 15:09:56 -05:00
index.js change port system 2023-08-06 15:55:05 -05:00
package.json switch to undici fetch 2023-09-10 14:22:49 -05:00
pnpm-lock.yaml switch to undici fetch 2023-09-10 14:22:49 -05:00
server.js fix handling of default branches 2023-09-25 20:49:43 -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
npm i

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
  • custom 404 pages per-repo
  • support SPAs with _redirects file
  • markdown rendering


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

made with ❤️ by besties