English (Google TR) | 中文
Fork of D7z-Project
Gitea Pages implemented with reference to Github Pages.
xcaddy
utility is required to generate the Caddy executable with the following command
xcaddy build --with github.com/mohmadhabib/caddy-gitea-pages
# List the current modules
. /caddy list-modules | grep gitea
We also provides linux/amd64
and linux/arm64
images:
docker pull ghcr.io/mohmadhabib/caddy-gitea-pages:nightly
After installing Caddy, write the following configuration in Caddyfile
.
{
order gitea before file_server
}
:80
gitea {
# Gitea server address
server https://yourGiteaInstanceURL.com
# Gitea Token
token please-replace-it
# Default domain, similar to Github's github.io
domain pages.example.com
}
The token requires the following permissions:
organization:read
repository:read
user:read
More detailed configuration can be found in Caddyfile
The repository https://gitea.com/owner/repo.git
corresponds to owner.example.com/repo
in the example configuration.
To access the CNAME
configured domain, you need to access the <owner>.example.com/<repo>
domain of the repository, which needs to be done only once.
Note: You need to have gh-pages
branch and index.html
file in the branch to access the repository, if you still can't access it, you can restart Caddy to clear the cache.
This project was inspired by 42wim/caddy-gitea.
uses Apache-2.0