Scaffold complete repo structure: - 28 static sites extracted from running containers on mlake - 2 dynamic sites (dasbes.de, dumusst.com) marked for separate handling - Template system with 6 templates (person-dark/light, product-dark, editorial, fun, minimal) - Shared CSS (variables, responsive, animations, noise overlay) - nginx config generator with multi-domain alias support - Build script with Docker-based nginx validation - add-site.sh helper for scaffolding new domains - Dockerfile for single nginx:alpine container Sites: clemensplassmann.de, danosi.de, deinesei.de, derkaiseristnackt.de, elefantenhor.de, fragina.de, frenchkis.de, ichbinaufbali.de, ichbinaufbarley.de, insain.de, julietensity.de, kainco.de (+keinco.de), kainstress.de, keinefreun.de, knzlmgmt.de, kopffrai.de, legalais.de, machesdocheinfach.de, mai-otto.de (+otto.flexsiebels.de, ottomatisch.de, ichbinotto.de), martinsiebels.de, matthiasbreier.de, osterai.de, paragraphenraiter.de, schulfrai.de, smartin3.de, sorgenfrai.de, vonschraitter.de, wartebitte.de Refs: otto#341
82 lines
1.8 KiB
Bash
Executable File
82 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# Scaffold a new site folder with default site.yaml
|
|
# Usage: ./add-site.sh example.de [--template person-dark] [--name "John Doe"]
|
|
set -euo pipefail
|
|
|
|
DOMAIN="${1:?Usage: ./add-site.sh <domain> [--template <template>] [--name <name>]}"
|
|
shift
|
|
|
|
TEMPLATE="custom"
|
|
NAME=""
|
|
|
|
while [[ $# -gt 0 ]]; do
|
|
case $1 in
|
|
--template) TEMPLATE="$2"; shift 2 ;;
|
|
--name) NAME="$2"; shift 2 ;;
|
|
*) echo "Unknown option: $1" >&2; exit 1 ;;
|
|
esac
|
|
done
|
|
|
|
SITE_DIR="sites/$DOMAIN"
|
|
|
|
if [ -d "$SITE_DIR" ]; then
|
|
echo "ERROR: $SITE_DIR already exists" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$SITE_DIR"
|
|
|
|
if [ "$TEMPLATE" = "custom" ]; then
|
|
cat > "$SITE_DIR/site.yaml" <<EOF
|
|
domain: $DOMAIN
|
|
template: custom
|
|
title: "$DOMAIN"
|
|
description: ""
|
|
EOF
|
|
|
|
cat > "$SITE_DIR/index.html" <<EOF
|
|
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>$DOMAIN</title>
|
|
<style>
|
|
body { font-family: Inter, sans-serif; background: #0a0a0c; color: #e8e8ed; display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; }
|
|
h1 { font-weight: 600; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>$DOMAIN</h1>
|
|
</body>
|
|
</html>
|
|
EOF
|
|
else
|
|
cat > "$SITE_DIR/site.yaml" <<EOF
|
|
domain: $DOMAIN
|
|
template: $TEMPLATE
|
|
title: "${NAME:-$DOMAIN}"
|
|
description: ""
|
|
lang: de
|
|
|
|
vars:
|
|
name: "${NAME:-$DOMAIN}"
|
|
role: ""
|
|
initials: ""
|
|
tagline: ""
|
|
accent: "#c9a84c"
|
|
accent_light: "rgba(201, 168, 76, 0.1)"
|
|
font_primary: "Inter"
|
|
font_secondary: "Inter"
|
|
tags: []
|
|
sections: []
|
|
cta:
|
|
text: "Kontakt"
|
|
href: "mailto:info@$DOMAIN"
|
|
EOF
|
|
fi
|
|
|
|
echo "Created $SITE_DIR/"
|
|
echo " -> Edit $SITE_DIR/site.yaml to customize"
|
|
[ "$TEMPLATE" = "custom" ] && echo " -> Edit $SITE_DIR/index.html for content"
|