Skip to content

Latest commit

 

History

History
95 lines (75 loc) · 3.08 KB

File metadata and controls

95 lines (75 loc) · 3.08 KB

docker-gitbook-builder

🇨🇳 中文 · 🇬🇧 English · 🇯🇵 日本語 · 🇰🇷 한국어 · 🇪🇸 Español · 🇮🇳 हिन्दी · 🇸🇦 العربية
🇵🇹 Português · 🇧🇩 বাংলা · 🇷🇺 Русский · 🇫🇷 Français · 🇩🇪 Deutsch

Docker-Image zum Erstellen von GitBook-E-Books, mit Honkit (Community-Fork), CJK-Schriftarten und PlantUML-Unterstützung.

Docker Image

Schnellstart

docker pull bloodstar/gitbook-builder

# initialisieren
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 bloodstar/gitbook-builder gitbook init
# Vorschau
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 bloodstar/gitbook-builder gitbook serve
# bauen
docker run --rm -v "$PWD:/gitbook" -p 4000:4000 bloodstar/gitbook-builder gitbook build

Fügen Sie Aliase zu .bashrc oder .zshrc hinzu:

alias gitbook='docker run --rm -v "$PWD":/gitbook -p 4000:4000 bloodstar/gitbook-builder gitbook'
alias honkit='docker run --rm -v "$PWD":/gitbook -p 4000:4000 bloodstar/gitbook-builder honkit'

Funktionen

Funktion Beschreibung
GitBook CLI Klassische Version, für Node.js 20 gepatcht
Honkit Community-Fork, book.json-kompatibel
PlantUML Diagramme via OpenJDK 17 + Graphviz
PDF/EPUB Konvertierung via Calibre
CJK-Schriften Noto Sans CJK enthalten
Multi-Architektur linux/amd64, linux/arm/v7, linux/arm64

Verwendung

# GitBook
gitbook serve    # http://localhost:4000
gitbook build
gitbook pdf .
gitbook epub .

# Honkit (empfohlen)
honkit serve
honkit build
honkit pdf .
honkit epub .

Docker Hub

  • Image: bloodstar/gitbook-builder
  • Tags: latest, gitbook-<version>, honkit-<major>, honkit-<major>.<minor>, honkit-<full>
  • Tags anzeigen

Umgebungsvariablen

Variable Standard Beschreibung
NPM_CONFIG_REGISTRY (npm offiziell) npm-Spiegel. China: https://registry.npmmirror.com
docker run --rm -v "$PWD":/gitbook \
  -e NPM_CONFIG_REGISTRY=https://registry.npmmirror.com \
  bloodstar/gitbook-builder honkit install

Dokumentation

Dokument Inhalt
docs/GUIDE.md Detaillierte Nutzung und Plugins
docs/ARCHITECTURE.md Architektur und Komponenten
docs/TESTING.md Tests und Verifikation
docs/CHANGELOG.md Versionsverlauf