commit 2010f9b85b2e0d0604292bd03c23ecb7712b6ab5
parent 548139e09e4835330dbdfa001da78628a4d6d5a2
Author: William Harrison <87287585+wdhdev@users.noreply.github.com>
Date: Sat, 18 Jul 2026 14:24:21 +0800
Merge pull request #120 from dragsbruh/codeberg-pages
Update instructions for Codeberg Pages
Diffstat:
1 file changed, 35 insertions(+), 7 deletions(-)
diff --git a/src/guides/codeberg-pages.md b/src/guides/codeberg-pages.md
@@ -7,31 +7,59 @@ tags: guides
# Setting up Codeberg Pages with an is-a.dev subdomain
-This guide will walk you through the process of setting up a Codeberg Pages website and pointing your is-a.dev subdomain to it.
+This guide will walk you through the process of setting up a Codeberg Pages (or any git-pages host) website and pointing your is-a.dev subdomain to it.
## Create a Codeberg Pages Website
First, you'll need to create a website on Codeberg Pages. Follow the instructions in the [Codeberg Pages Guide](https://docs.codeberg.org/codeberg-pages/).
-### Create the Domain File
+For detailed and alternative methods, see instructions on [git-pages.org](https://git-pages.org/) or [grebedoc.dev](https://grebedoc.dev/).
-Create a JSON file inside domains directory (`domains/subdomain.json`) with the following content and submit a pull request:
+## Create the Domain File
+
+Create a JSON file inside domains directory (`domains/subdomain.json`) with the following content:
+
+```json
+{
+ "owner": {
+ "username": "your-github-username",
+ "email": "your-email@example.com"
+ },
+ "records": {
+ "CNAME": "codeberg.page"
+ }
+}
+```
+
+## Verifying Your Domain
+
+Create a JSON file inside domains directory (`domains/_git-pages-repository.subdomain.json`) with the following content:
```json
{
"owner": {
- "username": "your-codeberg-username",
+ "username": "your-github-username",
"email": "your-email@example.com"
},
"records": {
- "CNAME": "pages.your-codeberg-username.codeberg.page"
+ "TXT": "https://codeberg.org/USERNAME/REPOSITORY.git"
}
}
```
-### Add `.domains` file
+## Submit a Pull Request
+
+Make sure you have created the above two files properly, and then submit a Pull Request.
+
+## Add a Repository Webhook
+
+- Navigate to the webhooks section of your Codeberg repository: <https://codeberg.org/USERNAME/REPOSITORY/settings/hooks>
+- Click `Add webhook` and select `Forgejo` in the dropdown menu.
+- Set `Target URL` to `https://subdomain.is-a.dev` and set `Branch filter` to `pages`
+- Now submit the form using `Add webhook` button at the bottom.
-Once your PR is merged, Make a `.domains` file to point your website to your new `.is-a.dev` domain and add your subdomain (`your-subdomain.is-a.dev`) to it.
+Now, make sure your site's html and other content is stored in the `pages` branch of your repository.
+After your pull request is merged, you can do a push to the pages branch to activate your domain.
### Done!