add spellchecker (#439)

fix #148

Adds a spell checker via `cspell` and fixes some spelling issues in the docs.

Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/439
Co-authored-by: pat-s <patrick.schratz@gmail.com>
Co-committed-by: pat-s <patrick.schratz@gmail.com>
This commit is contained in:
pat-s 2024-06-12 10:20:37 +00:00 committed by Patrick Schratz
parent 72c195924b
commit 74e8925bec
17 changed files with 168 additions and 27 deletions

142
.cspell.json Normal file
View file

@ -0,0 +1,142 @@
{
"version": "0.2",
"language": "en",
"dictionaries": [
// language
"en_us",
// code
"go",
"node",
// package names
"npm"
],
"words": [
"codeberg",
"editview",
"forgejo",
"gitea",
"keycloak",
"knut",
"nord",
"orga",
"pageview",
"styleguide",
"tydata",
"webauthn",
"weblate",
"webp",
"xclip",
"endfor",
"pagefind",
"mray",
"keypair",
"gpgsign",
"signinkey",
"srcset",
"endadmonition",
"TOTP",
"Setext",
"Marlroy",
"preformatting",
"endfor",
"Goldmark",
"Homeserver",
"subpage",
"PKCE",
"block",
"keyid",
"pubring",
"signingkey",
"Browsersync",
"endraw",
"callouts",
"libwebp",
"cwebp",
"Kesi",
"IBAN",
"SEPA",
"fileorpathname",
"oneline",
"eins",
"zwei",
"Commitvia",
"knuts",
"Hostable",
"disroot",
"hostable",
"LICENCE",
"browsable",
"homebrewed",
"libera",
"jumpstart",
"Figshare",
"Zenodo",
"gettext",
"colormix",
"frida",
"reponame",
"yourdomain",
"myproject",
"branchname",
"venv",
"mydocs",
"Hassani",
"Alami",
"Fayçal",
"toctree",
"Malroy",
"Wrzx",
"pacman",
"xbps",
"GENODEF",
"netcup",
"YOURCODEBERGUSERNAME",
"respository",
"mynewfile",
"docstrings",
"autodoc",
"quickstart",
"virtualenv",
"dind",
"Packagist",
"Feishu",
"Gogs",
"noreferrer",
"tabindex",
"CERTDIR",
"nbsp",
"lycheeverse",
"mstruebing",
"davidanson",
"pipelinecomponents",
"corepack"
],
"ignorePaths": [
"**/node_modules/**/*",
"*.webp",
"*.png",
".git/**/*",
".gitignore",
"pnpm-lock.yaml",
"package.json",
"*.svg",
"*.css",
"*.js",
"*.njk",
".cspell.json"
],
// Exclude imports, because they are also strings.
"ignoreRegExpList": [
// ignore mulltiline imports
"import\\s*\\((.|[\r\n])*?\\)",
// ignore single line imports
"import\\s*.*\".*?\"",
// ignore go generate directive
"//\\s*go:generate.*",
// ignore nolint directive
"//\\s*nolint:.*",
// ignore docker image names
"\\s*docker\\.io/.*"
],
"enableFiletypes": ["dockercompose"]
}

View file

@ -1,2 +0,0 @@
Codeberg
Forgejo

View file

@ -137,5 +137,5 @@ MD046:
# MD048/code-fence-style - Code fence style
MD048:
# Code fence syle
# Code fence style
style: 'backtick'

View file

@ -35,3 +35,10 @@ steps:
- yamllint --strict .
when:
path: '*.{yml,yaml}'
spellcheck:
image: docker.io/node:22-alpine
depends_on: []
commands:
- corepack enable
- pnpx cspell lint --no-progress --gitignore '{**,.*}/{*,.*}'

View file

@ -95,6 +95,9 @@ It also uses [PageFind](https://pagefind.app/), a static search library.
Deployment previews are generated for every PR using [Surge.sh](https://surge.sh/) through the corresponding [Woodpecker plugin](https://woodpecker-ci.org/plugins/Surge%20preview%20plugin).
A spellchecker is used to check for spelling errors in the documentation.
To add exceptions to the spellchecker, add them to the `.cspell.json` file.
## License and Contributors
This website (excluding bundled fonts) is licensed under CC BY-SA 4.0. See the [LICENSE](LICENSE.md) file for details.

View file

@ -9,7 +9,7 @@ Webhooks can help you to automate working with your repository. For example it c
Detailed documentation on how to use webhooks can be found in the [forgejo Documentation](https://forgejo.org/docs/latest/user/webhooks/).
The following paragaphs will give concrete examples on how to use webhooks with some services.
The following paragraphs will give concrete examples on how to use webhooks with some services.
Currently, Codeberg offers implementation templates for the following services:
@ -66,7 +66,7 @@ Now go to your Codeberg repository.
3. Click on **Add Webhook** and choose **Forgejo**.
4. Paste the **webhook address** provided by _Read the Docs_ into the **Target URL** field.
5. You can select when the webhook should be triggered using the **Trigger On** setting. For illustrative purposes, we will select **Push Events**; this will trigger the webhook everytime that someone pushes to your repository.
5. You can select when the webhook should be triggered using the **Trigger On** setting. For illustrative purposes, we will select **Push Events**; this will trigger the webhook every time that someone pushes to your repository.
<picture>
<source srcset="/assets/images/advanced/using-webhooks/using-webhooks-codeberg.webp" type="image/webp">

View file

@ -76,7 +76,7 @@ Make sure to replace `{TOKEN}` with the registration token you copied, and `{NAM
```bash
$ ./forgejo-runner register --no-interactive --token {TOKEN} --name {NAME} --instance https://codeberg.org
INFO Registering runner, arch=amd64, os=linux, version=3.3.0.
DEBU Successfully pinged the Forgejo instance server
DEBUG Successfully pinged the Forgejo instance server
INFO Runner registered successfully.
$ ./forgejo-runner generate-config > config.yml
```

View file

@ -92,7 +92,7 @@ The easiest and recommended way is to just setup a CNAME record for your domain,
{% admonition "Warning" %}
With a CNAME record everything on this domain is delegated to `codeberg.page`, which means you cannot setup your own email adress with this method.
With a CNAME record everything on this domain is delegated to `codeberg.page`, which means you cannot setup your own email address with this method.
If you need email or others services, you have to use one of the remaining options.

View file

@ -101,7 +101,7 @@ The table below gives an overview of what collaborators are allowed to do when g
<td> <span style="color: green">{% fas_icon "check" %}</span> </td>
</tr>
<tr>
<td> Configure branch settings (protect/unprotect, enable force-push) </td>
<td> Configure branch settings (protect/un-protect, enable force-push) </td>
<td> <span style="color: red">{% fas_icon "times" %}</span> </td>
<td> <span style="color: red">{% fas_icon "times" %}</span> </td>
<td> <span style="color: green">{% fas_icon "check" %}</span> </td>

View file

@ -169,7 +169,7 @@ You have to resolve this conflict manually, as Git doesn't know how the resultin
### Resolving the conflict
Use your favourite text editor to open the file. The editor will show you the conflict. Git actually added the conflict description into the `README.md` file.
Use your favorite text editor to open the file. The editor will show you the conflict. Git actually added the conflict description into the `README.md` file.
The end of the file now looks like this:
@ -188,7 +188,7 @@ The next line shows you that the current `HEAD` (the last commit on the `main` b
An example repository for [Codeberg Docs](https://docs.codeberg.org).
```
The next line, `=======` seperates the current line from the line proposed in the branch that is to be merged.
The next line, `=======` separates the current line from the line proposed in the branch that is to be merged.
```
An example repository to use with the Codeberg Documentation.

View file

@ -33,7 +33,7 @@ When you're finished, press the button “Set Email Preference” to confirm you
{% admonition "info" %}
Disabling email notifications doesn't mean that you'll stop receiving important messages from the Codeberg organisation.
Disabling email notifications doesn't mean that you'll stop receiving important messages from the Codeberg organization.
{% endadmonition %}

View file

@ -63,7 +63,7 @@ Free software licenses are licenses which respect the [four fundamental software
Both copyleft and permissive license can, or cannot, be free licenses. For example, the [Modified BSD license](https://www.gnu.org/licenses/license-list.en.html#ModifiedBSD) is a permissive non-copyleft free software license.
In the context of licenses, the term "free" means free as in "freedom", not of gratis, but this has often been confused. Still, free software is often also gratis software.
Gratis non-free software usually includes gratis proprietary programs (shareware), demonstration or trial versions, limited versions (crippleware), advertising-supported software (e.g. antiviruses), and usually viruses and worms (the victim doesn't pay to get them).
Gratis non-free software usually includes gratis proprietary programs (shareware), demonstration or trial versions, limited versions (crippleware), advertising-supported software (e.g. antivirus), and usually viruses and worms (the victim doesn't pay to get them).
### Patent usage

View file

@ -7,7 +7,7 @@ eleventyNavigation:
---
Storing large files in Git is usually a bad idea.
They're contained in its history forever, and they enlargen your repository size, which annoys your contributors and increases the cost of storage on Codeberg.
They're contained in its history forever, and they enlarge your repository size, which annoys your contributors and increases the cost of storage on Codeberg.
However, there is a good way to do this:
Using [Git LFS (Large File Storage)][git-lfs], you can easily manage binary files, and remove them permanently when they are no longer necessary.

View file

@ -43,6 +43,6 @@ In the _Codeberg Community Tracker_, there are some issues that are marked using
If you need help or feel stuck, need inspiration or advice, you can always reach out to us in our [Contributing to Codeberg Matrix Channel](https://matrix.to/#/#contributing-to-codeberg:kle.li).
A more comprehensive list of our chatrooms can be found in the [Codeberg Matrix Space](https://matrix.to/#/#codeberg-space:matrix.org).
A more comprehensive list of our chat rooms can be found in the [Codeberg Matrix Space](https://matrix.to/#/#codeberg-space:matrix.org).
Thank you very much for your interest in improving Codeberg.

View file

@ -271,15 +271,6 @@ Adopt one of the following approaches according to the typology of your content
| You're not going nowhere | You're going nowhere |
| He didn't see nothing | He didn't see anything |
We use the standard American spelling conventions, i.e.:
| Do not write | Write |
| :----------------------------- | :----------------------------- |
| flavour; colour; labour | flavor; color; labor |
| analyse; organise; standardise | analyze; organize; standardize |
| catalogue; analogue, dialogue | catalog, analog, dialog |
| defence, licence | defense, license |
| whitelist, blacklist | allowlist, blockist |
| | |
We use the standard American spelling conventions which are enforced by a spellchecker.
- Start names with an upper case letter (e.g. Git instead of git, Markdown instead of markdown)

View file

@ -9,7 +9,7 @@ This article will guide you through integrating Codeberg with [Read the Docs](ht
{% admonition "warning" %}
Forgejo is currenly not official supported by Read the Docs, so this may break in the future.
Forgejo is currently not official supported by Read the Docs, so this may break in the future.
{% endadmonition %}

View file

@ -137,7 +137,7 @@ You can create as many tokens as you'd like: one for each computer, one for each
If you want to clone a repository using the Git CLI and 2FA enabled, you have two choices:
- use `SSH`: you do not have to do any special configuration, just use your ssh_key to login
- use `HTTPS`: for the login you use your username and your generated accesstoken as a password. First time you enter it, it will be saved for your repository.
- use `HTTPS`: for the login you use your username and your generated access token as a password. First time you enter it, it will be saved for your repository.
<pre>
$ git clone https://codeberg.org/username/repo.git
@ -153,7 +153,7 @@ git config --global credential.helper cache
## Troubleshooting
Codeberg's instance of Forgejo is using an [OTP library](https://github.com/pquerna/otp/) to generate 2FA tokens and follows the [RFC 6238 standard](https://datatracker.ietf.org/doc/html/rfc6238) to generate TOTP which uses 30 seconds long timeframes to accept your 2FA code.
Codeberg's instance of Forgejo is using an [OTP library](https://github.com/pquerna/otp/) to generate 2FA tokens and follows the [RFC 6238 standard](https://datatracker.ietf.org/doc/html/rfc6238) to generate TOTP which uses 30 seconds long time frames to accept your 2FA code.
```
00:00 00:30 01:00