feat: integrate user manual into help section

This commit is contained in:
2026-07-28 12:15:38 +02:00
parent 41dbb6297c
commit 8903452e96
8 changed files with 409 additions and 4 deletions
+27
View File
@@ -16,6 +16,9 @@ Backend:
- HTTP Basic Auth is implemented with `Flask-HTTPAuth`.
- Users are currently configured in `BETA_USERS` with Werkzeug password hashes.
- `/` renders the active calculator template.
- `/help` renders the authenticated Help landing page.
- `/help/user-manual` renders `docs/de/user_manual.md` server-side inside the RollCalc Help layout.
- `/help/user-manual/screenshots/<path:filename>` serves German manual screenshots from `docs/de/screenshots/`.
- `/static/<path:filename>` is intended to serve static files behind Basic Auth.
- `/api/health` returns health/version information.
- `/api/user` returns the authenticated user.
@@ -50,6 +53,30 @@ If `build_info.json` is missing, malformed, or does not contain a usable value,
The data is loaded centrally in `app.py` and made available to every template as `build_info`.
## Help and User Manual
The in-app Help area keeps `docs/de/user_manual.md` as the leading German documentation source. RollCalc reads the Markdown file on each `/help/user-manual` request and renders it server-side with `markdown-it-py`.
The documentation structure is prepared for language-specific manuals:
```text
docs/
de/
user_manual.md
screenshots/
```
Additional languages can follow the same structure later. The current public route still opens the German manual and no language switcher is implemented.
Rendering rules:
- Raw HTML from the Markdown source is disabled.
- Heading ids and the table of contents are generated from the Markdown content.
- Relative image references such as `screenshots/disclaimer.png` are rewritten to the authenticated manual screenshot route.
- Screenshots belong in the active language's `screenshots/` directory, currently `docs/de/screenshots/`; the screenshot route must remain limited to that directory.
The Help pages use the same HTTP Basic Auth protection as the calculator.
## Authentication
RollCalc uses HTTP Basic Auth. User entries in `BETA_USERS` have this shape: