fix(ci): make prettier, lychee and cspell happy (#782)

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/782
This commit is contained in:
Robert Wolff 2026-04-28 12:04:20 +02:00
parent 8215c254bc
commit 5b48c54304
7 changed files with 20 additions and 17 deletions

View file

@ -5,6 +5,7 @@ eleventyNavigation:
parent: CodebergPages
order: 999
---
## Custom error page for 404s
You can replace the default 404 error page that Codeberg Pages will show for missing pages with your own version if you prefer.

View file

@ -5,6 +5,7 @@ eleventyNavigation:
parent: CodebergPages
order: 100
---
{% admonition "Warning" %}
The following instructions depend on the new git-pages server for Codeberg Pages and can currently only be used on sites which are hosted under our `codeberg.page` domain, and not with sites that should be served from custom domains.
@ -25,7 +26,7 @@ To use it, simply add it as a final step to your workflow:
```yaml
- uses: https://codeberg.org/git-pages/action@v2
with:
site: "https://${{ forge.repository_owner }}.codeberg.page/repository-name/"
site: 'https://${{ forge.repository_owner }}.codeberg.page/repository-name/'
token: ${{ forge.token }}
source: _site/
```
@ -36,7 +37,7 @@ Replace `repository-name` in the `site` parameter with the name of your reposito
If your repository is also called `pages`, you can also omit the repository name and deploy directly to the site `https://username.codeberg.page/`.
The `source` parameter should point to the directory (relative to the root, after all previous steps in your workflow) where your site generator has put the generated version of your site.
This directory can also contain the `404.html` and `_redirects` files to customize your sites behaviour, as described in the [advanced documentation](/codeberg-pages/advanced-usage/).
This directory can also contain the `404.html` and `_redirects` files to customize your sites behavior, as described in the [advanced documentation](/codeberg-pages/advanced-usage/).
The `token` will automatically be filled by Forgejo Actions with a secret token, which in turn will automatically be recognized by git-pages as authorizing this workflow to publish to this site.
@ -57,4 +58,3 @@ if: ${{ forge.ref == 'refs/heads/main'}}
This will limit deploys so they only happen when CI is triggered by a push to the `main` branch.
{% endadmonition %}

View file

@ -49,7 +49,7 @@ This page documents the first method. See the [separate page on using Forgejo Ac
1. Create a repository called `pages` under your own username or under the organization you want to create a website for
The website will be published from a branch also called `pages`. You can also set this as the default branch, if you prefer.
The website will be published from a branch also called `pages`. You can also set this as the default branch, if you prefer.
2. Go to **Settings** at the top right of your repository page.
@ -57,7 +57,7 @@ This page documents the first method. See the [separate page on using Forgejo Ac
4. Click the **Add webhook** button in the top right corner of the webhook settings page.
Select **Forgejo** from the drop-down list of webhook types.
Select **Forgejo** from the drop-down list of webhook types.
5. Enter `https://username.codeberg.page/` as the **Target URL**, replacing the `username` with your Codeberg username or organization name. This is the URL your website will be available from.
@ -75,7 +75,7 @@ This page documents the first method. See the [separate page on using Forgejo Ac
3. Click the **Add webhook** button in the top right corner of the webhook settings page.
Select **Forgejo** from the drop-down list of webhook types.
Select **Forgejo** from the drop-down list of webhook types.
4. Enter `https://username.codeberg.page/repository-name/` as the **Target URL**, replacing the `username` with your Codeberg username or organization name, and `repository-name` with the name of your repository. This is the URL your website will be available from.

View file

@ -5,6 +5,7 @@ eleventyNavigation:
parent: CodebergPages
order: 120
---
{% admonition "Warning" %}
Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase.
@ -27,10 +28,10 @@ It improves performance and stability, and fixes various design issues from the
Please be aware of the following changes and deprecated features.
* The recommended way to deploy websites is by directly uploading them to git-pages.
* Content is no longer fetched automatically. You need to use a method that informs git-pages about changes.
* `raw.codeberg.page` is no longer available. CORS headers are now directly set on your page and this workaround is no longer necessary.
* Direct access to repos and branches is no longer possible. You can no longer use the `/repository/@branch` access. `git-pages` restricts you to the website you explicitly deployed. Serving arbitrary resources from Codeberg was a common abuse vector and is going to be deprecated.
- The recommended way to deploy websites is by directly uploading them to git-pages.
- Content is no longer fetched automatically. You need to use a method that informs git-pages about changes.
- `raw.codeberg.page` is no longer available. CORS headers are now directly set on your page and this workaround is no longer necessary.
- Direct access to repos and branches is no longer possible. You can no longer use the `/repository/@branch` access. `git-pages` restricts you to the website you explicitly deployed. Serving arbitrary resources from Codeberg was a common abuse vector and is going to be deprecated.
## The first push
@ -66,11 +67,11 @@ To do this:
3. Click the **Add webhook** button in the top right corner of the webhook settings page.
Select **Forgejo** from the drop-down list of webhook types.
Select **Forgejo** from the drop-down list of webhook types.
4. Enter `https://username.codeberg.page/repository-name/` as the **Target URL**, replacing the `username` with your Codeberg username or organization name, and `repository-name` with the name of your repository. This is the URL your website will be available from.
If your repository *and* your branch are both called `pages`, you can omit the `repository-name` and just push to `https://username.codeberg.page/` directly.
If your repository _and_ your branch are both called `pages`, you can omit the `repository-name` and just push to `https://username.codeberg.page/` directly.
5. Set the **Branch filter** to `pages`.

View file

@ -6,6 +6,7 @@ eleventyNavigation:
author: Fayçal Alami Hassani - https://codeberg.org/ka2in
order: 110
---
{% admonition "Warning" %}
Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase.
@ -36,7 +37,6 @@ To begin with, we will have two separate repositories, both locally and on Codeb
- A main repository for the source files, i.e. where the source files related to your main project will be located.
We will refer to this repository as the `source` repository.
This repository is the one associated with your [mydocs](/codeberg-pages/examples/docs-as-code/#mydocs) folder.
- A second repository for Codeberg pages that we will call the `pages` repository.
This repository will only contain the files available in the `html` folder located under docs/build/html.

View file

@ -5,6 +5,7 @@ eleventyNavigation:
parent: CodebergPages
order: 10
---
{% admonition "Warning" %}
Codeberg Pages is currently migrating from the legacy v2 codebase to the newer [git-pages](https://git-pages.org/) codebase.

View file

@ -87,13 +87,13 @@ export default function (eleventyConfig) {
const navFilter = eleventyConfig.getFilter('eleventyNavigation');
// from the nav tree, find the current page's entry
const entry = navFilter(collections.all).find(page => page.url == this.page.url);
const entry = navFilter(collections.all).find((page) => page.url == this.page.url);
// if the current page has children, create a nav table with a link for each
if (entry.children.length) {
const rows = entry.children.map(child =>
`<tr><td><a href="${ child.url }">${ child.title }</a></td></tr>`
).join('');
const rows = entry.children
.map((child) => `<tr><td><a href="${child.url}">${child.title}</a></td></tr>`)
.join('');
return `<table class="table">
<thead>