1
0
Fork 1
mirror of https://git.gay/gitgay/pages-server.git synced 2026-02-09 11:16:12 +01:00
A static site server for Forgejo instances.
  • Go 96.4%
  • Shell 3.6%
Find a file
2026-02-03 14:32:54 -06:00
.forgejo/workflows use redis-cli 2024-09-28 03:08:19 -05:00
cache heavy refactor 2025-01-02 12:15:46 -06:00
certificates fix certmagic for subdomains 2025-07-21 07:13:43 -05:00
errors Add specific error message for failing to find repository 2025-01-22 00:15:20 -06:00
forgejo remove now-unused size field on tree files 2025-11-20 20:56:51 -06:00
handler disallow other methods 2025-11-20 21:00:44 -06:00
redirects add forcing redirect option 2025-08-24 15:25:08 -05:00
render fix streaming of larger files 2025-11-20 18:47:31 -06:00
timer heavy refactor 2025-01-02 12:15:46 -06:00
utils fix streaming of larger files 2025-11-20 18:47:31 -06:00
views fix code blocks in markdown.tmpl 2024-04-25 02:43:34 -05:00
.gitignore heavy refactor 2025-01-02 12:15:46 -06:00
go.mod update stuff 2026-01-21 04:27:26 -06:00
go.sum update stuff 2026-01-21 04:27:26 -06:00
LICENSE.md Relicense to OQL 2024-04-16 16:38:49 -05:00
local_test update ipv6 address in local_test 2024-10-26 12:16:12 -05:00
main.go path handling cleanup 2025-11-13 15:22:49 -06:00
README.md drop usage docs (link to pages.gay site instructions) 2026-02-03 14:32:54 -06:00
serve.go use new SetQUICHeaders function 2024-10-14 05:41:30 -05:00

pages.gay

A static site server for git.gay's pages.gay service

usage

follow instructions on pages.gay!

selfhosting

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:
PAGES_DOMAIN=pages.gay
FORGEJO_URL=https://git.gay
# FORGEJO_USER_URL is needed for generated repository links if FORGEJO_URL is a local address inaccessible by users
FORGEJO_USER_URL=https://git.gay
PORT=80
HTTPS_PORT=443

ACME_ACCEPT_TERMS=true
ACME_EMAIL=example@example.com
# 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:
ACME_DIRECTORY_URL=https://acme-v02.api.letsencrypt.org/directory

# 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.
CLOUDFLARE_TOKEN=abcd1234

features

  • username.pages.gay pages
  • username.pages.gay/repo pages
  • custom domains
  • https support
  • auto-renewal of certificates
  • support SPAs with _redirects file
  • markdown rendering

license

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

made with ❤️ by besties