adaptif.de – Produkt-Landingpage (Hugo SSG)
Find a file
2026-07-13 14:26:23 +02:00
.forgejo/workflows ci: hugo mod vendor via nix-shell in Pipeline 2026-07-13 13:16:30 +02:00
config/_default fix: alle Hugo-Deprecation-Warnings beseitigt 2026-07-13 13:35:26 +02:00
content/english fix: FAQ als Leaf Bundle (index.md) 2026-07-13 13:33:59 +02:00
data/en content: Banner-Titel geschärft 2026-07-13 13:50:51 +02:00
docs/adr feat: Platzhalter-Grafiken für Banner + Features + ADR 002 2026-07-13 13:55:37 +02:00
layouts fix: alle Hugo-Deprecation-Warnings beseitigt 2026-07-13 13:35:26 +02:00
static/images fix: phone-mockup Chart an hero-app angeglichen (Trend grün, Punkte teal, Plateau) 2026-07-13 14:26:23 +02:00
.gitignore refactor: submodule → runtime git clone + deploy.yml 2026-07-13 13:10:05 +02:00
go.mod theme: Wechsel zu Vex Hugo (Produkt-Landingpage), Struktur an Vex angepasst 2026-07-13 12:26:14 +02:00
go.sum refactor: submodule → runtime git clone + deploy.yml 2026-07-13 13:10:05 +02:00
logo.png design: transparentes Logo + Header-Hintergrund #d5e1e1 2026-07-13 13:28:45 +02:00
README.md docs: Theme-Testing per Matrix-Build dokumentiert 2026-07-13 13:37:13 +02:00

adaptif.de

Produkt-Landingpage, gebaut mit Hugo + Theme Vex Hugo.

Entwicklung

git clone https://github.com/themefisher/vex-hugo.git themes/vex-hugo
hugo server -D

Vor dem ersten Start müssen Hugo Modules geladen werden:

nix-shell -p hugo go --run "hugo mod tidy"

Build

git clone https://github.com/themefisher/vex-hugo.git themes/vex-hugo
nix-shell -p hugo go --run "hugo mod vendor && hugo"
# Output in public/

Deployment

Push auf main → Forgejo Actions baut und deployed automatisch.

Der CI-Workflow:

  1. Klont das Vex-Hugo-Theme in themes/
  2. Vendored Hugo Modules via hugo mod vendor
  3. Baut mit hugo
  4. Kopiert public/ nach /var/www/adaptif.de/

Theme-Testing (Matrix-Build)

Für den Vergleich verschiedener Hugo-Themes gibt es ein Matrix-Build-Konzept.

Prinzip

  • Jedes Theme bekommt einen eigenen Branch (theme/<name>)
  • Der Branch enthält nur config/_default/hugo.toml (mit theme = "...") kein content/
  • Ein Matrix-Workflow checkt main aus, überlagert config/ aus dem Theme-Branch, klont das Theme und baut
  • Content kommt immer frisch aus main nur das Theme und die Config variieren

Neues Theme testen

# Branch vom aktuellen main erstellen
git checkout main
git checkout -b theme/<name>

# content entfernen (wird aus main geholt)
git rm -r content/

# Theme setzen
cat > config/_default/hugo.toml << 'EOF'
baseURL = "https://adaptif.de/"
title = "adaptIF"
theme = "<theme-name>"

[markup.goldmark.renderer]
  unsafe = true
EOF

# Kein module.toml nötig (wird in der Pipeline aus main übernommen und gelöscht)
git rm -f config/_default/module.toml 2>/dev/null; git rm -f go.mod go.sum 2>/dev/null; rm -rf _vendor

git add -A && git commit -m "theme: <name>"
git push origin theme/<name>

Workflow

Der Matrix-Workflow liegt in .forgejo/workflows/theme-matrix.yml (muss bei Bedarf aus dem Git-Verlauf oder aus dieser Doku wiederhergestellt werden):

name: Theme Build Matrix
on:
  push:
    branches: [theme/*]
  workflow_dispatch:

jobs:
  build:
    strategy:
      matrix:
        include:
          - branch: theme/blowfish
            theme: blowfish
            repo: https://github.com/nunocoracao/blowfish.git
          - branch: theme/congo
            theme: congo
            repo: https://github.com/jpanther/congo.git
          # … weitere Themes ergänzen
    runs-on: nixos
    steps:
      - uses: actions/checkout@v4
        with:
          ref: main
      - name: Overlay theme config
        run: |
          git checkout ${{ matrix.branch }} -- config/
          rm -f config/_default/module.toml go.mod go.sum
          rm -rf _vendor
      - name: Clone theme
        run: git clone --depth 1 ${{ matrix.repo }} themes/${{ matrix.theme }}
      - run: hugo --minify

Wichtig: Bei Hugo Themes mit go.mod (Hugo Module-basiert) muss module.toml + go.mod/go.sum + _vendor/ nach dem Overlay gelöscht werden, damit Hugo im klassischen Theme-Modus läuft.

Geeignete Themes

Theme Repo Typ
Blowfish github.com/nunocoracao/blowfish Hugo Module + Classic
Congo github.com/jpanther/congo Hugo Module + Classic
Hugo Profile github.com/gurusabarish/hugo-profile Classic
Stack github.com/CaiJimmy/hugo-theme-stack Hugo Module + Classic
PaperMod github.com/adityatelange/hugo-PaperMod Hugo Module + Classic
DoIt github.com/HEIGE-PCloud/DoIt Hugo Module + Classic
Lotus Docs github.com/colinwilson/lotusdocs Hugo Module + Classic

Theme-Überlagen

Theme-Templates werden in layouts/ überlagert (Hugo's Override-Mechanismus):

  • layouts/_default/baseof.html .Site.LanguageCode.Site.Language.Locale
  • layouts/partials/header.html Logo + "adaptIF" Text, Header-Hintergrund
  • layouts/partials/banner.html, features.html, … .Site.Datahugo.Data

Struktur

config/_default/
├── hugo.toml          # Theme-Konfiguration, Plugins, Parameter
├── languages.toml     # Sprachkonfiguration (DE, content/english/)
├── menus.en.toml      # Navigation (Start, FAQ, Impressum, Datenschutz)
└── module.toml        # Hugo Modules (images)
content/english/
├── _index.md          # Startseite
├── faq/index.md       # FAQ-Seite
├── impressum/index.md # Impressum
└── datenschutz/index.md # Datenschutz
static/images/
└── logo.png           # Logo (100px hoch, transparent)
themes/vex-hugo/       # (gitignored, wird im CI geklont)