tools/anti-ai-lint.py: Python-Linter (stdlib + yq) prueft jede build/<domain>/index.html gegen die Blacklist in tools/anti-ai-blacklist.yaml. HTML wird via html.parser auf sichtbaren Text reduziert (Skripte/Styles werden ignoriert), dann werden Vokabel- Substrings (DE+EN, case-insensitive) und Regex-Patterns gematcht. Severity warn = Build geht durch, fail = Build bricht ab. Whitelist-Mechanismen: - HTML-Kommentar im Markup: <!-- anti-ai-allow: term1, term2 --> - Per-Site in site.yaml: anti_ai_allow: [term1, term2] Integration in build.sh als Schritt 4/4, mit --skip-lint fuer Notfaelle. Dockerfile installiert python3 zusaetzlich; nur im Builder-Stage, kein Effekt aufs Caddy-Image. Tests via tools/test-anti-ai-lint.sh: synthetische AI-Fixture wird korrekt geflagged, Whitelists unterdruecken Hits, fail-Severity triggert exit 1, neutraler Text exit 0. Initial-Lauf auf 59 bestehenden Sites: 2 warn (killusion.de "revolutionaer" in ironischem Kontext, kilofant.de "robust"), 0 fail. Cleanup ist Folge-Issue. README + docs/geo-seo-guideline.md aktualisiert mit der konkreten Tool-Position.
18 lines
360 B
Docker
18 lines
360 B
Docker
FROM alpine:3.21 AS builder
|
|
|
|
RUN apk add --no-cache bash yq coreutils findutils python3
|
|
|
|
WORKDIR /src
|
|
COPY . .
|
|
|
|
RUN chmod +x build.sh render.sh generate-caddyfile.sh && \
|
|
./build.sh
|
|
|
|
FROM caddy:alpine
|
|
|
|
COPY --from=builder /src/build/ /srv/
|
|
COPY --from=builder /src/Caddyfile /etc/caddy/Caddyfile
|
|
|
|
RUN caddy validate --config /etc/caddy/Caddyfile
|
|
EXPOSE 80
|