diff --git a/README.md b/README.md index 2a5fecf..189b85a 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,10 @@ components/ error-page.tsx # Gemeinsames Layout der Fehlerseiten theme-toggle.tsx ui/ # shadcn/ui-Basiskomponenten + assets/ + Programmierer.png # Foto (statischer Import in programmer-graphic.tsx) public/ - Programmierer.png # Foto (statischer Import in programmer-graphic.tsx) + favicon.ico # wird 1:1 nach landingpage/ exportiert ``` --- @@ -103,6 +105,7 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben: - rsync nach `jamulix.de:/var/www/jamulix.de/html/landingpage/` - Setzt Symlink: `/var/www/jamulix.de/html/index.html` → `landingpage/index.html` (nginx folgt dem Link und liefert die Landingpage direkt unter `https://jamulix.de/` aus) +- Setzt Symlink `favicon.ico` → `landingpage/favicon.ico` (Browser fragen `/favicon.ico` ab) - Setzt Symlinks `__next.*.txt` → `landingpage/__next.*.txt` (Next.js lädt unter `/` die RSC-Segmente ohne basePath; ohne die Links gibt es 404 im Netzwerk-Tab) - Kopiert die Fehlerseiten `landingpage/.html` in den Webroot @@ -115,6 +118,7 @@ Die E-Mail im Footer (`footer.tsx`) wird als Prop von `app/page.tsx` übergeben: - rsync nach `/var/www/html/landingpage/` - Symlink: `/var/www/html/index.html` → `landingpage/index.html` +- Symlink: `/var/www/html/favicon.ico` → `landingpage/favicon.ico` - Symlinks: `/var/www/html/__next.*.txt` → `landingpage/__next.*.txt` - Kopiert die Fehlerseiten in den Webroot - `sudo chown -R www-data:www-data` @@ -193,13 +197,14 @@ Hologramm-Projektor mit Lichtkegel, schwebende Glas-Panels. ## Bilder -`public/Programmierer.png` muss als **statischer Import** eingebunden werden: +`components/assets/Programmierer.png` wird als **statischer Import** eingebunden: ```tsx -import programmiererImg from '../public/Programmierer.png' +import programmiererImg from './assets/Programmierer.png' // ... ``` Grund: `next/image` mit `src="/Programmierer.png"` (String) berücksichtigt -`basePath` nicht korrekt bei statischem Export. +`basePath` nicht korrekt bei statischem Export. Das Bild liegt bewusst nicht in +`public/`, sonst würde es zusätzlich (1,6 MB, ungenutzt) nach `landingpage/` kopiert. diff --git a/public/Programmierer.png b/components/assets/Programmierer.png similarity index 100% rename from public/Programmierer.png rename to components/assets/Programmierer.png diff --git a/components/programmer-graphic.tsx b/components/programmer-graphic.tsx index 7b72b01..f848a83 100644 --- a/components/programmer-graphic.tsx +++ b/components/programmer-graphic.tsx @@ -2,7 +2,7 @@ import { motion } from 'framer-motion' import Image from 'next/image' -import programmiererImg from '../public/Programmierer.png' +import programmiererImg from './assets/Programmierer.png' export function ProgrammerGraphic() { return ( diff --git a/deploy_to_localhost.sh b/deploy_to_localhost.sh index 3e5b755..224aa7a 100755 --- a/deploy_to_localhost.sh +++ b/deploy_to_localhost.sh @@ -18,6 +18,10 @@ echo "Setze symbolischen Link: index.html → landingpage/index.html" sudo rm -f /var/www/html/index.html sudo ln -s landingpage/index.html /var/www/html/index.html +echo "Setze symbolischen Link: favicon.ico → landingpage/favicon.ico" +sudo rm -f /var/www/html/favicon.ico +sudo ln -s landingpage/favicon.ico /var/www/html/favicon.ico + # Next.js lädt unter / die RSC-Segmente ohne basePath (/__next.*.txt) — ebenfalls verlinken echo "Setze symbolische Links: __next.*.txt → landingpage/__next.*.txt" sudo rm -f /var/www/html/__next.*.txt diff --git a/deploy_to_production.sh b/deploy_to_production.sh index a7038b1..aa6fc8e 100755 --- a/deploy_to_production.sh +++ b/deploy_to_production.sh @@ -31,6 +31,9 @@ rsync -av --delete -e "ssh -S $SSH_SOCKET" landingpage/ "$REMOTE_USER@$REMOTE_HO echo "Setze symbolischen Link: index.html → landingpage/index.html" ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "rm -f '$REMOTE_DIR/index.html' && ln -s landingpage/index.html '$REMOTE_DIR/index.html'" +echo "Setze symbolischen Link: favicon.ico → landingpage/favicon.ico" +ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "rm -f '$REMOTE_DIR/favicon.ico' && ln -s landingpage/favicon.ico '$REMOTE_DIR/favicon.ico'" + # Next.js lädt unter / die RSC-Segmente ohne basePath (/__next.*.txt) — ebenfalls verlinken echo "Setze symbolische Links: __next.*.txt → landingpage/__next.*.txt" ssh -S "$SSH_SOCKET" "$REMOTE_USER@$REMOTE_HOST" "cd '$REMOTE_DIR' && rm -f __next.*.txt && for f in landingpage/__next.*.txt; do ln -s \$f \$(basename \$f); done"