Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
#!/usr/bin/env python3
""" Statischer Site-Generator für sonjasrasselbande.de
Kein npm , keine Abhängigkeiten – nur Python 3 ( stdlib ) .
Layout + Seitenfragmente aus src / werden zu fertigen HTML - Dateien in site /
zusammengesetzt ; Assets werden kopiert , sitemap . xml wird erzeugt .
Aufruf :
python3 scripts / build . py # baut site/
python3 scripts / build . py - - clean # baut site/ komplett neu
"""
from __future__ import annotations
import datetime as dt
import shutil
2026-11-30 09:51:56 +01:00
import subprocess
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
import sys
from pathlib import Path
ROOT = Path ( __file__ ) . resolve ( ) . parent . parent
SRC = ROOT / " src "
OUT = ROOT / " site "
BASE_URL = " https://sonjasrasselbande.de/ "
SITE_NAME = " Sonjas Rasselbande "
2026-11-30 09:51:56 +01:00
HOST = " sonjasrasselbande.de "
# --------------------------------------------------- Verifikation & IndexNow
# Sobald die Domain in der Google Search Console bzw. den Bing Webmaster Tools
# angelegt ist, hier den Verification-Token eintragen (leer = kein Meta-Tag):
# GOOGLE_SITE_VERIFICATION = "abc123..." # Meta-Tag google-site-verification
# BING_SITE_VERIFICATION = "1234ABCD..." # Meta-Tag msvalidate.01
# Für IndexNow (Bing, Yandex, Seznam) einen Key (8– 128 Zeichen, a– z/0– 9)
# eintragen – der Build schreibt daraus <key>.txt ins Web-Root, deploy.sh pingt
# die Sitemap-URLs anschließend an api.indexnow.org. Siehe
# docs/seo-und-reputation.md
GOOGLE_SITE_VERIFICATION = " "
BING_SITE_VERIFICATION = " "
2026-11-30 09:56:02 +01:00
INDEXNOW_KEY = " 8959d1e82e633f3c5270b29855c2c829 "
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
# slug, Navigationslabel (None = nicht in der Navigation), <title>, description,
# robots, indexierbar/in Sitemap
PAGES : list [ dict ] = [
{
" slug " : " index " ,
" nav " : " Start " ,
" title " : " Sonjas Rasselbande – Kindertagespflege & Tagesmutter in Neuss-Rosellen " ,
" description " : " Kindertagespflege in Neuss-Rosellen: Tagesmutter Sonja Schmitz betreut bis zu fünf Kinder von 6 Monaten bis 3 Jahren – kleine Gruppe, frische Mahlzeiten, individuelle Eingewöhnung. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 1.0 " ,
} ,
{
" slug " : " ueber-mich " ,
" nav " : " Das bin ich " ,
" title " : " Das bin ich – Sonja Schmitz, Tagesmutter in Neuss | Sonjas Rasselbande " ,
" description " : " Sonja Schmitz ist seit 2009 qualifizierte Tagesmutter in Neuss-Rosellen: Pflegeerlaubnis seit 2008, regelmäßige Fortbildungen und eine enge Zusammenarbeit mit dem Jugendamt. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.8 " ,
} ,
{
" slug " : " konzept " ,
" nav " : " Konzept " ,
" title " : " Pädagogisches Konzept – Kindertagespflege Neuss | Sonjas Rasselbande " ,
" description " : " Bildungsfelder, Sicherheit, Hygiene, Ernährung, Eingewöhnung und Tagesablauf: das pädagogische Konzept der Kindertagespflege Sonjas Rasselbande in Neuss-Rosellen. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.9 " ,
} ,
{
" slug " : " gruppe " ,
" nav " : " Gruppe " ,
" title " : " Unsere kleine Gruppe & Räume – Kindertagespflege Neuss | Sonjas Rasselbande " ,
" description " : " Fünf Kinder von 6 Monaten bis 3 Jahren, altersgemischte Gruppe und kindgerechte Räume mit Wickelbereich, Schlafbereich und Küche in Neuss-Rosellen. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.8 " ,
} ,
{
" slug " : " kosten " ,
" nav " : " Kosten " ,
" title " : " Kosten & Vertrag – Betreuungskosten über das Jugendamt | Sonjas Rasselbande " ,
" description " : " Wie setzen sich die Betreuungskosten in der Kindertagespflege zusammen? Einkommensabhängige Beiträge, Kostenträger Jugendamt und die nächsten Schritte bis zum Betreuungsplatz. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.8 " ,
} ,
{
" slug " : " kontakt " ,
" nav " : " Kontakt " ,
" title " : " Kontakt & Anfahrt – Neuss-Rosellen | Sonjas Rasselbande " ,
" description " : " Kontakt zur Kindertagespflege Sonjas Rasselbande: Rosellener Schulstraße 2 in 41470 Neuss-Rosellen, Telefon 0173 70 220 20, sonja.schmitz79@gmx.de. Besuch gerne nach Terminabsprache. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.9 " ,
} ,
{
" slug " : " impressum " ,
" nav " : None ,
" title " : " Impressum | Sonjas Rasselbande " ,
" description " : " Impressum der Kindertagespflege Sonjas Rasselbande, Sonja Schmitz, Neuss-Rosellen. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.2 " ,
} ,
{
" slug " : " datenschutz " ,
" nav " : None ,
" title " : " Datenschutzerklärung | Sonjas Rasselbande " ,
" description " : " Datenschutzerklärung der Website sonjasrasselbande.de: datensparsam, ohne Analyse-Cookies und ohne externe Schriftarten. " ,
" robots " : " index,follow " ,
" in_sitemap " : True ,
" priority " : " 0.2 " ,
} ,
{
" slug " : " 404 " ,
" nav " : None ,
" title " : " Seite nicht gefunden | Sonjas Rasselbande " ,
" description " : " Diese Seite existiert nicht. Weiter zur Startseite der Kindertagespflege Sonjas Rasselbande. " ,
" robots " : " noindex,follow " ,
" in_sitemap " : False ,
} ,
{
" slug " : " offline " ,
" nav " : None ,
" title " : " Offline | Sonjas Rasselbande " ,
" description " : " Sie sind offline. Diese Seite ist nicht im Zwischenspeicher vorhanden. " ,
" robots " : " noindex,nofollow " ,
" in_sitemap " : False ,
} ,
]
2026-11-30 09:51:56 +01:00
ORG_ID = f " { BASE_URL } #kindertagespflege "
WEBSITE_ID = f " { BASE_URL } #website "
JSONLD_HOME = f """ <script type= " application/ld+json " >
{ {
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
" @context " : " https://schema.org " ,
2026-11-30 09:51:56 +01:00
" @graph " : [
{ {
" @type " : " ChildCare " ,
" @id " : " {ORG_ID} " ,
" name " : " Sonjas Rasselbande " ,
" alternateName " : " Kindertagespflege Sonja Schmitz " ,
" description " : " Kindertagespflege in Neuss-Rosellen: Betreuung von bis zu fünf Kindern im Alter von 6 Monaten bis 3 Jahren durch eine qualifizierte Tagesmutter. " ,
" url " : " {BASE_URL} " ,
" telephone " : " +49 173 7022020 " ,
" email " : " sonja.schmitz79@gmx.de " ,
" founder " : { { " @type " : " Person " , " name " : " Sonja Schmitz " } } ,
" address " : { {
" @type " : " PostalAddress " ,
" streetAddress " : " Rosellener Schulstraße 2 " ,
" postalCode " : " 41470 " ,
" addressLocality " : " Neuss " ,
" addressRegion " : " Nordrhein-Westfalen " ,
" addressCountry " : " DE "
} } ,
" areaServed " : { { " @type " : " City " , " name " : " Neuss " } } ,
" knowsLanguage " : " de " ,
" maximumAttendeeCapacity " : 5 ,
" keywords " : " Tagesmutter Neuss, Kindertagespflege Rosellen, Kinderbetreuung unter 3 Jahren, Betreuungsplatz Neuss " ,
" image " : " {BASE_URL} assets/img/og-image.png " ,
" logo " : " {BASE_URL} assets/img/logo.svg "
} } ,
{ {
" @type " : " WebSite " ,
" @id " : " {WEBSITE_ID} " ,
" url " : " {BASE_URL} " ,
" name " : " {SITE_NAME} " ,
" inLanguage " : " de-DE " ,
" publisher " : { { " @id " : " {ORG_ID} " } }
} }
]
} }
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
< / script > """
2026-11-30 09:51:56 +01:00
# Breadcrumb-Label für Seiten, die nicht in der Hauptnavigation stehen
CRUMB_LABELS = {
" impressum " : " Impressum " ,
" datenschutz " : " Datenschutzerklärung " ,
}
def verification_meta ( ) - > str :
""" Meta-Tags für die Inhaberschafts-Verifikation (Search Console, Bing). """
tags = [ ]
if GOOGLE_SITE_VERIFICATION :
tags . append (
f ' <meta name= " google-site-verification " content= " { GOOGLE_SITE_VERIFICATION } " > '
)
if BING_SITE_VERIFICATION :
tags . append ( f ' <meta name= " msvalidate.01 " content= " { BING_SITE_VERIFICATION } " > ' )
return " \n " . join ( tags )
def jsonld_for ( page : dict ) - > str :
""" Startseite: ChildCare + WebSite; Unterseiten: BreadcrumbList. """
slug = page [ " slug " ]
if slug == " index " :
return JSONLD_HOME
if not page [ " in_sitemap " ] :
return " "
label = page [ " nav " ] or CRUMB_LABELS . get ( slug , SITE_NAME )
url = f " { BASE_URL } { slug } .html "
return (
' <script type= " application/ld+json " > \n '
" { \n "
' " @context " : " https://schema.org " , \n '
' " @type " : " BreadcrumbList " , \n '
' " itemListElement " : [ \n '
f ' {{ " @type " : " ListItem " , " position " : 1, " name " : " Startseite " , " item " : " { BASE_URL } " }} , \n '
f ' {{ " @type " : " ListItem " , " position " : 2, " name " : " { label } " , " item " : " { url } " }} \n '
" ] \n "
" } \n "
" </script> "
)
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
def nav_html ( active_slug : str ) - > str :
out = [ ]
for page in PAGES :
if not page [ " nav " ] :
continue
current = ' aria-current= " page " ' if page [ " slug " ] == active_slug else " "
href = " index.html " if page [ " slug " ] == " index " else f " { page [ ' slug ' ] } .html "
out . append ( f ' <li><a class= " nav__link " href= " { href } " { current } > { page [ " nav " ] } </a></li> ' )
return " \n " . join ( out )
def render ( page : dict , layout : str ) - > str :
slug = page [ " slug " ]
html_file = " index.html " if slug == " index " else f " { slug } .html "
fragment = ( SRC / " pages " / f " { slug } .html " ) . read_text ( encoding = " utf-8 " ) . rstrip ( ) + " \n "
preload_hero = " "
if slug == " index " :
preload_hero = (
' <link rel= " preload " href= " assets/img/portrait-sonja-308.avif " '
' as= " image " type= " image/avif " fetchpriority= " high " > '
)
html = layout
replacements = {
" {{ title}} " : page [ " title " ] ,
" {{ description}} " : page [ " description " ] ,
" {{ robots}} " : page [ " robots " ] ,
" {{ canonical}} " : f " { BASE_URL } { ' ' if slug == ' index ' else html_file } " ,
" {{ base_url}} " : BASE_URL ,
" {{ prefix}} " : " " ,
" {{ nav}} " : nav_html ( slug ) ,
" {{ content}} " : fragment ,
" {{ preload_hero}} " : preload_hero ,
2026-11-30 09:51:56 +01:00
" {{ verification}} " : verification_meta ( ) ,
" {{ jsonld}} " : jsonld_for ( page ) ,
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
}
for key , value in replacements . items ( ) :
html = html . replace ( key , value )
leftovers = [ k for k in ( " {{ " , ) if k in html ]
if leftovers :
raise SystemExit ( f " Platzhalter nicht ersetzt in { html_file } : { html [ - 400 : ] } " )
return html
2026-11-30 09:51:56 +01:00
def last_modified ( slug : str ) - > str :
""" Letzte inhaltliche Änderung einer Seite: Git-Commit-Datum der Quelle.
Wichtig für die Sitemap : ein pauschal auf " heute " gesetztes < lastmod >
ignorieren Crawler als unzuverlässig .
"""
src = SRC / " pages " / f " { slug } .html "
try :
result = subprocess . run (
[ " git " , " log " , " -1 " , " --format= %c s " , " -- " , str ( src . relative_to ( ROOT ) ) ] ,
cwd = ROOT ,
capture_output = True ,
text = True ,
check = False ,
)
stamp = result . stdout . strip ( )
except OSError :
stamp = " "
if stamp :
return stamp
if src . exists ( ) :
return dt . date . fromtimestamp ( src . stat ( ) . st_mtime ) . isoformat ( )
return dt . date . today ( ) . isoformat ( )
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
def build_sitemap ( pages : list [ dict ] ) - > str :
urls = [ ]
for page in pages :
if not page [ " in_sitemap " ] :
continue
loc = BASE_URL if page [ " slug " ] == " index " else f " { BASE_URL } { page [ ' slug ' ] } .html "
urls . append (
" <url> \n "
f " <loc> { loc } </loc> \n "
2026-11-30 09:51:56 +01:00
f " <lastmod> { last_modified ( page [ ' slug ' ] ) } </lastmod> \n "
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
" <changefreq>monthly</changefreq> \n "
f " <priority> { page [ ' priority ' ] } </priority> \n "
" </url> "
)
return (
' <?xml version= " 1.0 " encoding= " UTF-8 " ?> \n '
' <urlset xmlns= " http://www.sitemaps.org/schemas/sitemap/0.9 " > \n '
+ " \n " . join ( urls )
+ " \n </urlset> \n "
)
def main ( ) - > None :
layout = ( SRC / " layout.html " ) . read_text ( encoding = " utf-8 " )
if " --clean " in sys . argv and OUT . exists ( ) :
shutil . rmtree ( OUT )
OUT . mkdir ( parents = True , exist_ok = True )
for page in PAGES :
html = render ( page , layout )
name = " index.html " if page [ " slug " ] == " index " else f " { page [ ' slug ' ] } .html "
( OUT / name ) . write_text ( html , encoding = " utf-8 " )
print ( f " ✓ { name } " )
# Assets & statische Dateien
for item in ( " assets " , " manifest.webmanifest " , " sw.js " , " robots.txt " , " .htaccess " ) :
src = SRC / item
dst = OUT / item
if not src . exists ( ) :
print ( f " ! fehlt: src/ { item } " )
continue
if src . is_dir ( ) :
if dst . exists ( ) :
shutil . rmtree ( dst )
shutil . copytree ( src , dst )
# Original-Fotos nicht mit ausliefern (nur die generierten Varianten)
originals = dst / " img " / " originals "
if originals . exists ( ) :
shutil . rmtree ( originals )
else :
shutil . copy2 ( src , dst )
print ( " ✓ assets/, manifest.webmanifest, sw.js, robots.txt, .htaccess " )
( OUT / " sitemap.xml " ) . write_text ( build_sitemap ( PAGES ) , encoding = " utf-8 " )
print ( " ✓ sitemap.xml " )
2026-11-30 09:51:56 +01:00
# IndexNow: Key-Datei im Web-Root bestätigt die Inhaberschaft der Domain
if INDEXNOW_KEY :
( OUT / f " { INDEXNOW_KEY } .txt " ) . write_text ( INDEXNOW_KEY , encoding = " utf-8 " )
print ( f " ✓ { INDEXNOW_KEY } .txt (IndexNow) " )
Add static website for Sonjas Rasselbande
- src/: layout, page fragments, CSS design system, vanilla JS, .htaccess,
service worker, manifest, SVG artwork
- scripts/: python build (no npm), HTML/link checks, image + photo pipeline,
FTP deploy with size verification
- docs/: analysis of the old Wix site, architecture notes, deployment
learnings (FollowSymLinks 500, FTPS data channel, Let's Encrypt),
open items, source material
- site/ is generated (make build) and gitignored
2026-11-29 19:26:25 +01:00
# favicon.ico zusätzlich ins Root (Alt-Browser und Crawler fragen /favicon.ico an)
ico = SRC / " assets " / " img " / " favicon.ico "
if ico . exists ( ) :
shutil . copy2 ( ico , OUT / " favicon.ico " )
print ( " ✓ favicon.ico (Root) " )
total = sum ( 1 for _ in OUT . rglob ( " * " ) if _ . is_file ( ) )
print ( f " \n Fertig: { total } Dateien in { OUT . relative_to ( ROOT ) } / " )
if __name__ == " __main__ " :
main ( )