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.gay subdomain.

Option 1: A user site at user.pages.gay

  1. On git.gay, create a public repository named pages.
  2. Add your static files to the main branch.
  3. Push to the repository.
  4. Your site is available at user.pages.gay, where user is 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

  1. Open the repository for your project.
  2. Create a new empty branch named pages.
  3. Add your static files to that branch.
  4. Push the branch.
  5. Your site is available at user.pages.gay/repo, where repo is 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:

  1. In the same branch that holds your page content, create a file named .domains containing the domain you want to use.

  2. Add a DNS CNAME record on your domain pointing to:

    [branch].[repo].[user].pages.gay
    
  3. 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

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 on main.
  • 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.