> For the complete documentation index, see [llms.txt](https://foe-helper.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://foe-helper.gitbook.io/docs/readme.md). Agents can also search and read this documentation through its [MCP server](https://foe-helper.gitbook.io/docs/~gitbook/mcp).

# FoE Helper – Documentation

Source of the official documentation of the [FoE Helper](https://foe-helper.com) browser extension, published at [**docs.foe-helper.com**](https://docs.foe-helper.com). The site is built with [Retype](https://retype.com).

## Structure

| Path                 | Purpose                                                                                                       |
| -------------------- | ------------------------------------------------------------------------------------------------------------- |
| `languages.json`     | The only list of languages (code = language code of the extension, name, Retype UI texts)                     |
| `modules.json`       | Registry: page slug ↔ box IDs ↔ menu ID ↔ old GitBook addresses (used for redirects and the `[?]` help links) |
| `<lang>/`            | One Retype project per language (`de/`, `en/`, `fr/`), published at `/<lang>/`                                |
| `tools/template/`    | Template for `retype.yml`, `_includes/head.html` (language menu) and `static/` (logo, favicon)                |
| `tools/editions.py`  | Generates `<lang>/retype.yml`, `_includes/head.html` and `static/` from the template and `languages.json`     |
| `tools/site-root.py` | Builds the site root: language switch (`index.html`), `404.html` and `.htaccess` with all redirects           |
| `tools/skill/`       | Scripts for scanning the extension, checking pages and taking screenshots (see `tools/skill/SKILL.md`)        |
| `build.sh`           | Builds everything into `.retype/`                                                                             |

Do not edit the generated files in the language folders (`retype.yml`, `_includes/head.html`, `static/`) – change `tools/template/` and run `python3 tools/editions.py`.

## Build locally

Requirements: [Retype](https://retype.com/guides/getting-started/) 4.6 and Python 3 (standard library only).

```bash
npm install --global retypeapp@4.6.0
./build.sh                  # all languages + site root -> .retype/
cd de && retype start       # live preview of one language
```

## Add a language

1. Add an entry to `languages.json` (`code` = file name in `js/web/_i18n/` of the extension).
2. Run `python3 tools/editions.py`.
3. Translate all pages from `de/` into the new folder.
4. Run `./build.sh`.

The extension needs no change: help links point to `/<language>/…`, and languages without an edition are redirected to English by the generated `.htaccess`.

## Deployment

Every push to **`master`** builds and publishes the site with GitHub Actions ([`.github/workflows/deploy.yml`](https://github.com/mainIine/foe-helper-docs/tree/master/.github/workflows/deploy.yml)). It can also be started by hand under *Actions › Deploy docs › Run workflow*.

1. Install Retype and Python, run `build.sh`.
2. Upload `.retype/` with `rsync --delete` over SSH to the document root of docs.foe-helper.com (Apache). `.well-known/` (Let's Encrypt) is kept.

Repository secrets:

| Secret               | Content                                                  |
| -------------------- | -------------------------------------------------------- |
| `DEPLOY_SSH_KEY`     | Private SSH key of the deploy user                       |
| `DEPLOY_KNOWN_HOSTS` | Host key line of the server (`[host]:222 ssh-ed25519 …`) |
| `DEPLOY_TARGET`      | `user@host`                                              |

On the server the deploy key is limited in `~/.ssh/authorized_keys` to rsync inside the docs folder:

```
command="/usr/bin/rrsync /usr/www/users/<user>/docs.foe-helper.com",restrict ssh-ed25519 AAAA… github-actions foe-helper-docs
```

It cannot open a shell or write outside that folder. To replace the key, generate a new one, swap the line on the server and update `DEPLOY_SSH_KEY`.

## License

[GNU Affero General Public License v3.0](https://github.com/mainIine/foe-helper-docs/tree/master/LICENSE/README.md)
