Deploy: favicon.ico im Webroot, Programmierer.png aus public/ entfernt

Browser fragen /favicon.ico ab — die Deploy-Skripte setzen jetzt einen
Symlink auf landingpage/favicon.ico. Programmierer.png liegt jetzt in
components/assets/ (statischer Import), damit der Export keine
ungenutzte 1,6-MB-Kopie mehr nach landingpage/ legt. README angepasst.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-08 14:46:29 +02:00
commit f01ce510f6
5 changed files with 17 additions and 5 deletions

View file

@ -38,8 +38,10 @@ components/
error-page.tsx # Gemeinsames Layout der Fehlerseiten
theme-toggle.tsx
ui/ # shadcn/ui-Basiskomponenten
public/
assets/
Programmierer.png # Foto (statischer Import in programmer-graphic.tsx)
public/
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/<code>.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'
// ...
<Image src={programmiererImg} ... />
```
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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -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 (

View file

@ -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

View file

@ -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"