How do I set up a static site on pages.gay?
Updated
You can publish a static site on pages.gay by creating a repository on git.gay and pushing your files to it. There are two paths: a user site, which uses a public repository named pages, or a project site, which uses an empty branch named pages inside an existing repository. Your site then appears at user.pages.gay or user.pages.gay/repo. The whole setup takes minutes, and no build step is required — pages.gay serves the static files you push.
Before you start
- A git.gay account (pages.gay is built around git.gay repositories).
- Static files ready to upload: HTML, CSS, fonts, images, and anything else the site needs.
- Basic familiarity with git — creating a repo, creating a branch, and pushing commits.
- Optional: a custom domain if you don't want to use the default
pages.gaysubdomain.
Option 1: A user site at user.pages.gay
- On git.gay, create a public repository named
pages. - Add your static files to the main branch.
- Push to the repository.
- Your site is available at
user.pages.gay, whereuseris your git.gay username.
The repository name is what matters here — it must be pages, and it must be public.
Option 2: A project site at user.pages.gay/repo
- Open the repository for your project.
- Create a new empty branch named
pages. - Add your static files to that branch.
- Push the branch.
- Your site is available at
user.pages.gay/repo, whererepois the repository name.
This keeps the site content separate from your project's main branch, so your source code and your published files don't mix.
Caching: why your update isn't showing
pages.gay uses a cache, so changes may not appear for a few minutes after you push. If you need to see an update immediately, force a cache refresh with a hard refresh in your browser: Ctrl + Shift + R. If the change still doesn't appear, confirm you pushed to the correct branch — main for a user site, pages for a project site.
Using a custom domain
To point your own domain at a pages.gay site:
-
In the same branch that holds your page content, create a file named
.domainscontaining the domain you want to use. -
Add a DNS CNAME record on your domain pointing to:
[branch].[repo].[user].pages.gay -
For apex domains, where CNAME records don't work, add these records instead:
- An A record pointing to
213.210.34.143 - An AAAA record pointing to
2a0f:9400:6906:1977::143 - A TXT record with the content
[branch].[repo].[user].pages.gay
- An A record pointing to
Replace [branch], [repo], and [user] with your actual branch name, repository name, and git.gay username.
Self-hosting
If you run your own Gitea or Forgejo server, pages.gay can be self-hosted. The project's documentation covers that setup path — follow it if you'd rather not depend on the hosted service.
Quick reference
| Goal | What to create | Where files go | URL |
|---|---|---|---|
| User site | Public repo named pages |
main branch |
user.pages.gay |
| Project site | Empty branch named pages |
pages branch |
user.pages.gay/repo |
| Custom domain | .domains file in the content branch |
Same branch as content | Your domain |
Common snags
- Repo isn't public or isn't named
pages— the user site won't be created. - Branch name mismatch — a project site needs the branch named exactly
pages; a user site expects content onmain. - Files not pushed — pages.gay serves what's in the repository, so local-only files won't appear.
- Stale content — wait a few minutes or hard-refresh before assuming something is broken.
- Apex domain not resolving — CNAME records don't work at the apex, so use the A, AAAA, and TXT records listed above.