diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed12340 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build/ +nginx/nginx.conf +*.tmp +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fd69f70 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:alpine +COPY build/ /usr/share/nginx/html/ +COPY nginx/nginx.conf /etc/nginx/nginx.conf +RUN nginx -t +EXPOSE 80 diff --git a/README.md b/README.md index 65bccda..21a80a7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,91 @@ # onepager -Mono-repo for 40+ vanity domain onepager sites — single nginx container with template system \ No newline at end of file +Mono-repo for 40+ vanity domain onepager sites. Single nginx container with template system and server_name-based routing. + +## Structure + +``` +sites/ # One folder per domain + example.de/ + site.yaml # Domain config, template choice, variables + index.html # Content (generated or hand-crafted) + assets/ # Optional images, fonts +templates/ # Shared HTML templates +shared/css/ # Shared CSS (variables, responsive, animations) +nginx/ # Generated nginx.conf + generator script +build/ # Generated output (gitignored) +``` + +## Usage + +### Add a new site + +```bash +# Templated site +./add-site.sh example.de --template person-dark --name "Max Mustermann" + +# Custom HTML site +./add-site.sh example.de --template custom +``` + +### Build + +```bash +./build.sh +``` + +Requires `yq` for YAML parsing. Outputs to `build/` directory. + +### Deploy + +Push to main — Dokploy auto-deploys. All domains must be configured in Dokploy. + +## Templates + +| Template | Description | +|----------|-------------| +| `person-dark` | Professional profile, dark theme | +| `person-light` | Professional profile, light/cream theme | +| `product-dark` | Product/service landing page, dark | +| `editorial` | Long-form manifesto/editorial style | +| `fun` | Playful/personal pages | +| `minimal` | Bare-bones single section | +| `custom` | Hand-crafted HTML, no rendering | + +## site.yaml + +```yaml +domain: example.de +aliases: [www.example.de] +template: person-dark +title: "Page Title" +description: "Meta description" +lang: de + +vars: + name: "Name" + role: "Role" + initials: "AB" + tagline: "Tagline here" + accent: "#c9a84c" + accent_light: "rgba(201, 168, 76, 0.1)" + font_primary: "Inter" + font_secondary: "Newsreader" + tags: ["Tag 1", "Tag 2"] + sections: + - type: features + title: "Section Title" + items: + - title: "Item" + desc: "Description" + - type: profile + bio: "Bio text" + cta: + text: "Contact" + href: "mailto:info@example.de" +``` + +## Related + +- Issue #341: Onepager Mono-Repo +- Issue #335: Container consolidation diff --git a/add-site.sh b/add-site.sh new file mode 100755 index 0000000..906476e --- /dev/null +++ b/add-site.sh @@ -0,0 +1,81 @@ +#!/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 [--template