Configuration
Building your site
Section titled “Building your site”There is no build step on the hosting side: CodeFloe serves the files it is given, exactly as they are.
That leaves two ways to publish, and which you want depends on whether your site needs generating.
Publish from a branch
Section titled “Publish from a branch”If your site is already plain HTML, put it on a branch and select that branch in the Pages settings. CodeFloe publishes its contents whenever it changes.
Build and publish from Actions
Section titled “Build and publish from Actions”If your site is generated (Astro, Hugo, Jekyll, MkDocs, a bundler) build it in Forgejo Actions and push the result to your Pages branch. Keep the source on one branch and the built site on another, so generated files never land in the branch you work in.
A working example lives at codefloe/pages-example.
Set working-directory to whatever directory your generator writes into: dist, public, _site, build.
The branch is force-pushed each time, so it holds the current site rather than a commit per build, and the commit message records which source revision produced it.
You get the full build log, like any other workflow, you choose the toolchain and its versions, and the branch always shows exactly what is being served.
Custom Domains
Section titled “Custom Domains”A site can be served under a domain of your own. It takes a DNS record and the domain added in the repository’s Pages settings.
-
Point the domain at CodeFloe
Section titled “Point the domain at CodeFloe”For a subdomain such as
www.example.com, create a CNAME record pointing at your subdomain oncodefloe.page:An apex domain such as
example.comcannot be a CNAME. Either use your provider’sALIASorANAMErecord type with the same target, or point A and AAAA records at CodeFloe directly:Prefer
ALIASwhere you have it. The addresses above can change, and a record that follows the name keeps working when they do. -
Add the domain in CodeFloe
Section titled “Add the domain in CodeFloe”-
Go to your repository’s Pages settings
-
Add your domain in the Domains section
-
Set it as the primary domain
The DNS record decides which servers a visitor reaches. This step is what tells CodeFloe which repository the domain belongs to, so both are needed.
-
A certificate is issued once the record resolves, and renewed from then on. There is nothing to upload.
Your site is served at the root of a custom domain, not under /<repository>/, so the base path described above is not needed there.
You can add up to 20 domains. One of them has to be the primary, which is the address CodeFloe links to from the repository; the rest serve the same site.
Custom domains are optional, and removing the last one is allowed. Your codefloe.page address keeps working either way, so a site is never left without a way to reach it.
Next Steps
Section titled “Next Steps”- Technical Details - Learn about infrastructure and usage limits
- Forgejo Actions - Build your site before publishing it