From 74e8925bec62a7774eef5a9b34d9b03478c2da81 Mon Sep 17 00:00:00 2001 From: pat-s Date: Wed, 12 Jun 2024 10:20:37 +0000 Subject: [PATCH] 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 Co-committed-by: pat-s --- .cspell.json | 142 ++++++++++++++++++ .cspell/codeberg.txt | 2 - .markdownlint.yaml | 2 +- .woodpecker/lint.yaml | 7 + README.md | 3 + content/advanced/using-webhooks.md | 4 +- content/ci/actions.md | 2 +- content/codeberg-pages/using-custom-domain.md | 2 +- content/collaborating/repo-permissions.md | 2 +- content/collaborating/resolve-conflicts.md | 4 +- content/getting-started/email-settings.md | 2 +- content/getting-started/licensing.md | 2 +- content/git/using-lfs.md | 2 +- .../improving-codeberg/contributing-code.md | 2 +- .../improving-documentation/style-guide.md | 11 +- content/integrations/read-the-docs.md | 2 +- content/security/2fa.md | 4 +- 17 files changed, 168 insertions(+), 27 deletions(-) create mode 100644 .cspell.json delete mode 100644 .cspell/codeberg.txt diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 0000000..4bf8690 --- /dev/null +++ b/.cspell.json @@ -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"] +} diff --git a/.cspell/codeberg.txt b/.cspell/codeberg.txt deleted file mode 100644 index afb831d..0000000 --- a/.cspell/codeberg.txt +++ /dev/null @@ -1,2 +0,0 @@ -Codeberg -Forgejo diff --git a/.markdownlint.yaml b/.markdownlint.yaml index ea1d3d0..9cae6a2 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -137,5 +137,5 @@ MD046: # MD048/code-fence-style - Code fence style MD048: - # Code fence syle + # Code fence style style: 'backtick' diff --git a/.woodpecker/lint.yaml b/.woodpecker/lint.yaml index ddbd3d9..5cd17a5 100644 --- a/.woodpecker/lint.yaml +++ b/.woodpecker/lint.yaml @@ -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 '{**,.*}/{*,.*}' diff --git a/README.md b/README.md index 03eac18..78f4630 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/content/advanced/using-webhooks.md b/content/advanced/using-webhooks.md index 2d8311c..acbcf39 100644 --- a/content/advanced/using-webhooks.md +++ b/content/advanced/using-webhooks.md @@ -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. diff --git a/content/ci/actions.md b/content/ci/actions.md index 3e4a2ef..c6cc84a 100644 --- a/content/ci/actions.md +++ b/content/ci/actions.md @@ -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 ``` diff --git a/content/codeberg-pages/using-custom-domain.md b/content/codeberg-pages/using-custom-domain.md index 5f459f7..7f0b572 100644 --- a/content/codeberg-pages/using-custom-domain.md +++ b/content/codeberg-pages/using-custom-domain.md @@ -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. diff --git a/content/collaborating/repo-permissions.md b/content/collaborating/repo-permissions.md index c45e61a..4f82a5c 100644 --- a/content/collaborating/repo-permissions.md +++ b/content/collaborating/repo-permissions.md @@ -101,7 +101,7 @@ The table below gives an overview of what collaborators are allowed to do when g {% fas_icon "check" %} - Configure branch settings (protect/unprotect, enable force-push) + Configure branch settings (protect/un-protect, enable force-push) {% fas_icon "times" %} {% fas_icon "times" %} {% fas_icon "check" %} diff --git a/content/collaborating/resolve-conflicts.md b/content/collaborating/resolve-conflicts.md index 4bbe462..f4855c7 100644 --- a/content/collaborating/resolve-conflicts.md +++ b/content/collaborating/resolve-conflicts.md @@ -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. diff --git a/content/getting-started/email-settings.md b/content/getting-started/email-settings.md index 5a2556d..94a4056 100644 --- a/content/getting-started/email-settings.md +++ b/content/getting-started/email-settings.md @@ -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 %} diff --git a/content/getting-started/licensing.md b/content/getting-started/licensing.md index 7ef5f18..0f0c6ea 100644 --- a/content/getting-started/licensing.md +++ b/content/getting-started/licensing.md @@ -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 diff --git a/content/git/using-lfs.md b/content/git/using-lfs.md index 0f177c5..f9937a7 100644 --- a/content/git/using-lfs.md +++ b/content/git/using-lfs.md @@ -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. diff --git a/content/improving-codeberg/contributing-code.md b/content/improving-codeberg/contributing-code.md index 640bb76..edaa2f3 100644 --- a/content/improving-codeberg/contributing-code.md +++ b/content/improving-codeberg/contributing-code.md @@ -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. diff --git a/content/improving-documentation/style-guide.md b/content/improving-documentation/style-guide.md index d0be81c..fba1ca5 100644 --- a/content/improving-documentation/style-guide.md +++ b/content/improving-documentation/style-guide.md @@ -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) diff --git a/content/integrations/read-the-docs.md b/content/integrations/read-the-docs.md index b81939a..27b3b58 100644 --- a/content/integrations/read-the-docs.md +++ b/content/integrations/read-the-docs.md @@ -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 %} diff --git a/content/security/2fa.md b/content/security/2fa.md index 71c8289..bab5c7f 100644 --- a/content/security/2fa.md +++ b/content/security/2fa.md @@ -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.
 $ 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