The official documentation can be found on https://codeberg.page, but I think it is confusing and incomplete if you want multiple pages and are using a custom domain name.
So, on the official documentation they say one has to create a repository named “pages” for the static website, but then what if one has multiple websites? It's also plain annoying to have such a name for a repository. Anyway, the following steps allow you to have multiple static pages on Codeberg without having to name them “pages”, ugh.
This will save the nice graph that shows all the contributions you made, and all the file versioning history of course.
git remote rename origin old-origin-github
git remote add origin https://codeberg.org/CynicusRex/quitfacebook.git
git branch -M pages
git push --set-upstream origin --all
git push --set-upstream origin --tags
git init
It will probably show you the following message: “hint: Using 'master' as the name for the initial branch. This default branch name […] The just-created branch can be renamed via this command: git branch -m <name>”git branch -m pages
You see, the repository needn't be named pages, but the branch does. Which is great because now we can have multiple pages with distinct names. The official documentation makes it seem as if one is limited to one page.git add .
git commit -m "first commit"
git remote add origin https://codeberg.org/CynicusRex/quitfacebook.git
git push -u origin pages
– – – – –
* This typo is intentional, apparently.
Assuming you have a custom domain name, do the following. If you don't, then the official documentation probably suffices.
quitfacebook.org
www.quitfacebook.org
pages.quitfacebook.cynicusrex.codeberg.page
Type: A Record, Host: @, Value: 217.197.91.145, TTL: Automatic
Type: AAAA Record, Host: @, Value: 2001:67c:1401:20f0::1, TTL: Automatic
Type: CNAME Record, Host: www, Value: quitfacebook.cynicusrex.codeberg.page., TTL: Automatic
Type: TXT Record, Host: @, Value: quitfacebook.cynicusrex.codeberg.page., TTL: Automatic
All is done. Now you might have to wait for a couple of hours until the domain configurations get updated. Also, don't forget to unpublish your page on GitHub.
Enjoy your day.
– – – – –
* Credits to Jan Wildeboer for helping with this.
Ψ
Search for https://fosstodon.org/@stardust/110202336827539450 (fosstodon invite) on your preferred Mastodon server while logged in, comments appear below.