Fix: deploy target + Traefik-Labels + Next rewrites
- deploy-vps.sh: free-warez.top → free-warez.win (eldov.win liegt auf .win, nicht .top). Vorheriger Deploy lief auf .top ohne Traefik-Routing. - docker-compose.yml: Traefik-Labels analog w-make-com (Router für eldov.win + www.eldov.win, websecure entrypoint, HTTP→HTTPS-Redirect). Service hängt am 'proxy'-Netzwerk. - next.config.ts: Rewrites als Backup zum proxy.ts (/ → /de, /projekte/[slug] → /de/projects/[slug]). In manchen Setups greift der proxy.ts nicht zuverlässig für statische Routen — doppelt hält besser. - src/app/page.tsx: Root-Route serviert DE-Inhalt direkt, damit Healthchecks und Bots eine echte Antwort bekommen (kein endloser Redirect).
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
// Root-`page.tsx` — fängt `/` ab und serviert den DE-Home-Inhalt direkt.
|
||||
// Wir duplizieren hier die Logik aus [lang]/page.tsx, weil Next.js 16 ohne
|
||||
// explizite Root-Route 404 für `/` zurückgibt (der [lang]-Proxy-Rewrite greift
|
||||
// bei Direktzugriffen ohne Hostname-Rewrite wie z.B. Healthchecks nicht).
|
||||
import { headers } from "next/headers";
|
||||
import { getDb } from "@/lib/db";
|
||||
import { seedIfEmpty } from "@/lib/seed";
|
||||
import { getProfile, listFeaturedProjects, listProjects } from "@/lib/models";
|
||||
import { BioSection } from "@/components/bio-section";
|
||||
import { LinksSection } from "@/components/links-section";
|
||||
import { ProjectGrid } from "@/components/project-grid";
|
||||
import { JsonLd } from "@/components/json-ld";
|
||||
import { getDict } from "@/i18n/dictionaries";
|
||||
import Link from "next/link";
|
||||
import { publicPath } from "@/i18n/routes";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default async function RootIndex() {
|
||||
const db = getDb();
|
||||
seedIfEmpty(db);
|
||||
const profile = getProfile(db, "de");
|
||||
const featured = listFeaturedProjects(db, "de");
|
||||
const all = listProjects(db, "de");
|
||||
const dict = getDict("de");
|
||||
|
||||
return (
|
||||
<>
|
||||
<JsonLd profile={profile} featured={featured} />
|
||||
|
||||
<section className="ascii-box mb-8">
|
||||
<p className="font-mono text-xs uppercase tracking-wider text-muted">{dict.home.kicker}</p>
|
||||
<h1
|
||||
className="headline-glitch mt-2 text-4xl font-semibold leading-tight md:text-5xl"
|
||||
data-text={dict.home.title}
|
||||
>
|
||||
{dict.home.title}
|
||||
</h1>
|
||||
<p className="mt-4 max-w-2xl text-[var(--fg)]">{dict.home.lede}</p>
|
||||
</section>
|
||||
|
||||
<div className="grid gap-6 lg:grid-cols-3">
|
||||
<div className="lg:col-span-2">
|
||||
{featured.length > 0 ? (
|
||||
<>
|
||||
<div className="section-heading">
|
||||
<span className="section-heading__label">~/featured</span>
|
||||
<h2 className="section-heading__title">{dict.home.featuredLabel}</h2>
|
||||
</div>
|
||||
<ProjectGrid projects={featured} locale="de" showStance />
|
||||
</>
|
||||
) : null}
|
||||
<div className="section-heading mt-12">
|
||||
<span className="section-heading__label">~/all</span>
|
||||
<h2 className="section-heading__title">{dict.home.allProjectsLabel}</h2>
|
||||
<Link
|
||||
href={publicPath("de", "projects")}
|
||||
className="ml-auto font-mono text-xs uppercase text-accent hover:underline"
|
||||
>
|
||||
{dict.actions.viewProjects} →
|
||||
</Link>
|
||||
</div>
|
||||
<ProjectGrid projects={all.slice(0, 6)} locale="de" />
|
||||
</div>
|
||||
<aside className="space-y-6">
|
||||
<BioSection profile={profile} locale="de" />
|
||||
<LinksSection profile={profile} locale="de" />
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<section className="ascii-box mt-12">
|
||||
<p className="font-mono text-xs uppercase tracking-wider text-accent">{dict.home.cta.title}</p>
|
||||
<p className="mt-2 text-[var(--fg)]">{dict.home.cta.body}</p>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user