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%
| .forgejo/workflows | ||
| cache | ||
| certificates | ||
| errors | ||
| forgejo | ||
| handler | ||
| redirects | ||
| render | ||
| timer | ||
| utils | ||
| views | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE.md | ||
| local_test | ||
| main.go | ||
| README.md | ||
| serve.go | ||
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
_redirectsfile - markdown rendering
license
the pages.gay server is copyright (c) hazycora 2023. it's under the OQL.
made with ❤️ by besties