2020-08-13 03:29:36 -07:00
---
eleventyNavigation:
key: CodebergPages
title: Codeberg Pages
icon: server
order: 60
2020-10-14 12:22:57 -07:00
---
2022-08-04 19:27:47 -07:00
Codeberg Pages allows you to easily publish static websites with a human-friendly address (`{username}.codeberg.page`) via Git on Codeberg.
2023-11-30 14:04:10 -08:00
2022-08-04 19:27:47 -07:00
Follow these simple steps below to get started, or check out the advanced usage below.
2020-10-14 12:22:57 -07:00
2024-03-10 09:13:45 -07:00
1. Create a **public** repository named 'pages' in your user account or organization.
2022-08-04 19:27:47 -07:00
2. Create static content, HTML, stylesheets, fonts or images. Name the homepage file `index.html` .
3. Push your content to the default branch of the new repository.
4. You should now be able to access your content by visiting `{username}.codeberg.page` .
2020-10-14 12:22:57 -07:00
2023-11-30 14:04:10 -08:00
---
This project is developed "in-house" by Codeberg. You can find the source code [here ](https://codeberg.org/Codeberg/pages-server/ ).
See also:
2024-06-11 00:51:22 -07:00
2023-11-30 14:04:10 -08:00
- [codeberg.page ](https://codeberg.page )
- [Troubleshooting (Codeberg Documentation) ](troubleshooting )
- [Features (Codeberg Pages Repository) ](https://codeberg.org/Codeberg/pages-server/src/branch/main/FEATURES.md )
2021-12-01 14:13:34 -08:00
2023-07-08 09:27:44 -07:00
{% assign navPages = collections.all | eleventyNavigation %}
{%- for entry in navPages %}
{% if entry.url == page.url %}
{%- if entry.children.length -%}
2024-06-11 00:51:22 -07:00
2023-07-08 09:27:44 -07:00
< table class = "table" >
< thead >
< th > Find out more in this section: < / th >
< / thead >
< tbody >
{%- for child in entry.children %}
< tr > < td >
< a href = "{{ child.url }}" > {{ child.title }}< / a >
< / tr > < / td >
{%- endfor %}
< / tbody >
< / table >
{% endif %}
{% endif %}
{%- endfor %}
2021-12-01 14:13:34 -08:00
## Advanced Usage: Canonical URLs
The Codeberg Pages server responds to four different URLs:
2021-12-02 08:02:54 -08:00
- `https://raw.codeberg.page/username/reponame/` : raw content, uses correct MIME types (HTML is forbidden though) and is accessible with CORS.
2021-12-01 14:13:34 -08:00
- `https://username.codeberg.page` : user page, points the default branch of a user's or organization's `pages` repository
- `https://username.codeberg.page/reponame/` : repo page, points to the `pages` branch of the repository
- `https://example.org` : custom domain, points to a repo of choice as outlined below
2022-08-04 19:27:47 -07:00
In all cases, you can append a branch using an `@` (e.g. `https://username.codeberg.page/@develop/README.md` ). If the branch name contains a slash (`/`), they need to be replaced with a tilde (`~`) (e.g. the branch `docs/develop` can be accessed via `https://username.codeberg.page/@docs~develop/README.md` ).
2021-12-01 14:13:34 -08:00
2022-08-04 19:27:47 -07:00
## Do you have questions, feedback or have you found a bug?
2021-12-01 14:13:34 -08:00
2022-08-04 19:27:47 -07:00
The source code for Codeberg Pages is maintained over at the [Pages Server repository ](https://codeberg.org/Codeberg/pages-server ); feel free to head there to provide some feedback, suggestions, bug reports or even patches.
If you need general community support or have questions, [Codeberg/Community ](https://codeberg.org/Codeberg/Community ) is a better place to ask, as more people will be watching there to help you out!
2022-01-21 02:36:38 -08:00
We really appreciate your contribution.
2023-07-17 17:43:47 -07:00
## Installing Pages for your own Forgejo instance
2022-01-21 02:36:38 -08:00
2023-07-17 17:43:47 -07:00
Codeberg Pages works with any Forgejo host out there. So if you are running your own Forgejo, you can absolutely run it yourself and help with the development.
2022-08-04 19:27:47 -07:00
Check out the [Pages Server repository ](https://codeberg.org/Codeberg/pages-server ) for more information.