SHA256
- MarkdownConsoleRenderer.cs: eigener Markdig-AST→ANSI-Renderer (keine neue NuGet-Dependency). Unterstützt Headings, Paragraphs, Listen, Code-Blöcke, Blockquotes, Tabellen, Thematic Breaks, Inline-Formatierung (bold/italic/code/links). ANSI-Styling mit Farben. - Program.cs: 'webstatic status' / 'webstatic --status' Subcommand — rendert README.md der Site im Terminal (Default: cwd, --root überschreibt). Graceful error wenn README.md fehlt. Help-Eintrag ergänzt. - LICENSE: Third-Party-Dependency-Lizenzen ergänzt (Markdig BSD-2-Clause, YamlDotNet MIT) mit vollständigen Lizenztexten, Links und Kompatibilitäts-Tabelle. - README.md: aktualisiert als Status-Dokument (neuer status-Befehl, CLI-Befehle-Tabelle, bereinigte Environments, LICENSE-Verweis).
104 lines
3.8 KiB
Markdown
104 lines
3.8 KiB
Markdown
# GCBoK.WebStaticBuilder
|
|
|
|
Eigenständiger, quelloffener **Static-Site-Generator** der GitCover Commons für
|
|
mehrsprachige, SEO-optimierte, compliance-freundliche Websites. Ersetzt den
|
|
früheren C#-Builderskript der GCBoK-Website durch ein generisches, für KMU
|
|
einsetzbares Werkzeug.
|
|
|
|
- **Sprache:** C# / .NET 10 (kompilierte Konsole)
|
|
- **Lizenz:** MIT (siehe `LICENSE` für Third-Party-Dependency-Lizenzen)
|
|
- **Kein Python:** einzige externe Abhängigkeit ist `npx pagefind` (Suchindex, optional)
|
|
- **Funktionen:** Markdown + YAML-Frontmatter → statisches HTML pro Sprache,
|
|
Navigation, SEO-Kopf (OpenGraph/JSON-LD), `sitemap.xml`, `robots.txt`,
|
|
Mermaid-Diagramme, client-seitige Volltextsuche (Pagefind), UI-Lokalisierung
|
|
über `{{ i18n.* }}`, optionaler Machine-Translation-Helfer (Entwürfe),
|
|
Markdown-Rendering im Terminal via `webstatic status`.
|
|
|
|
## Schnellstart
|
|
|
|
```bash
|
|
# Tool bauen
|
|
dotnet build -c Release
|
|
|
|
# Beispiel-Seite erzeugen und bauen
|
|
dotnet bin/Release/net10.0/webstatic.dll init mysite
|
|
cd mysite
|
|
dotnet ../../bin/Release/net10.0/webstatic.dll build --env development
|
|
|
|
# Lokal ansehen
|
|
dotnet ../../bin/Release/net10.0/webstatic.dll serve --port 8000
|
|
|
|
# Site-Status (README.md im Terminal rendern)
|
|
dotnet ../../bin/Release/net10.0/webstatic.dll status
|
|
```
|
|
|
|
## CLI-Befehle
|
|
|
|
| Befehl | Bedeutung |
|
|
|--------|-----------|
|
|
| `webstatic build [Optionen]` | Website bauen |
|
|
| `webstatic serve [--port N]` | Lokalen Server starten (Vorschau) |
|
|
| `webstatic init <name>` | Beispiel-Site anlegen |
|
|
| `webstatic status [--root DIR]` | README.md der Site im Terminal anzeigen |
|
|
| `webstatic translate --check` | Fehlende Übersetzungen melden |
|
|
| `webstatic translate --draft` | Übersetzungs-Entwürfe erzeugen |
|
|
| `webstatic --version` | Version (Assembly + Git-Commit) anzeigen |
|
|
| `webstatic --help \| -h` | Hilfe anzeigen |
|
|
| `webstatic update` | Selbstaktualisierung (Clone-Installation) |
|
|
|
|
## Umgebungen
|
|
|
|
| `--env` | baseUrl (Beispiel) | Zweck |
|
|
|--------------|------------------------------|------------------------|
|
|
| `development`| `http://localhost:8000` | Lokale Entwicklung (work/preview/review) |
|
|
| `staging` | `https://gcbok.gitcover.org` | Abnahme (brx5) |
|
|
| `deploy` | `https://gcbok.org` | Production |
|
|
|
|
Aliase: `--preview` / `--work` / `--review` = `development`, `--staging` = `staging`, `--deploy` = `deploy`.
|
|
|
|
## Konfiguration (`webstatic.json`)
|
|
|
|
CLI-Flags haben Vorrang vor `webstatic.json`, dieses vor eingebauten Defaults.
|
|
Siehe `webstatic.example/webstatic.json` und `docs/getting-started.md`.
|
|
|
|
## Installation für KMU
|
|
|
|
```bash
|
|
./install.sh # -> /opt/GitCover/webstatic, Symlink /usr/local/bin/webstatic
|
|
```
|
|
|
|
## Version & Update
|
|
|
|
```bash
|
|
webstatic --version # Assembly-Version + Git-Commit des Installations-Repos
|
|
webstatic update # Selbstaktualisierung (Clone-Installation): lokale
|
|
# Änderungen werden gestasht, git pull, gemerged, neu gebaut
|
|
```
|
|
|
|
`webstatic update` setzt eine Clone-Installation voraus (siehe `install.sh`,
|
|
Default `WEBSTATIC_INSTALL_MODE=clone`). Bei einer Copy-Installation erfolgt das
|
|
Update via erneutem `./install.sh`.
|
|
|
|
## Machine Translation (optional)
|
|
|
|
```bash
|
|
webstatic translate --check # fehlende Übersetzungen melden
|
|
export WEBSTATIC_TRANSLATOR_KEY=... # API-Key (Azure/DeepL)
|
|
webstatic translate --draft # Entwürfe nach .translation-drafts/
|
|
```
|
|
|
|
Entwürfe überschreiben niemals Quelldateien.
|
|
|
|
## Verzeichnisstruktur
|
|
|
|
```
|
|
plans/ Produktplan & Folgepläne
|
|
docs/ Anleitungen (KMU, Admin)
|
|
diary/ Entwicklungs-Tagebuch
|
|
src/ C#-Quellcode (GCBoK.WebStaticBuilder)
|
|
tests/ (künftig) Unit/Integrationstests
|
|
webstatic.example/ Vorlage-Site für KMU
|
|
install.sh KMU-Installation
|
|
LICENSE MIT + Third-Party-Dependency-Lizenzen
|
|
```
|