import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import Image from "next/image" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import { Zap, SlidersHorizontal, Undo2, ExternalLink, RefreshCw } from "lucide-react" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.postInstall.meta" }) return { title: t("title"), description: t("description"), keywords: [ "proxmox post install", "proxmox post-install script", "proxmox optimizations", "proxmox tweaks", "proxmox automated setup", "proxmox customization", "proxmox no subscription repository", "proxmox tuning", "proxmenux post install", ], alternates: { canonical: "https://proxmenux.com/docs/post-install" }, openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://proxmenux.com/docs/post-install", }, twitter: { card: "summary_large_image", title: t("twitterTitle"), description: t("twitterDescription"), }, } } type Route = { title: string; description: string; bullets: string[] } type RelatedItem = { label: string; href: string; tail: string } const ROUTE_CONFIG = [ { key: "automated", href: "/docs/post-install/automated", Icon: Zap, accent: "border-emerald-300 bg-emerald-50", iconBg: "bg-emerald-100 text-emerald-700", }, { key: "customizable", href: "/docs/post-install/customizable", Icon: SlidersHorizontal, accent: "border-amber-300 bg-amber-50", iconBg: "bg-amber-100 text-amber-700", }, { key: "updates", href: "/docs/post-install/updates", Icon: RefreshCw, accent: "border-violet-300 bg-violet-50", iconBg: "bg-violet-100 text-violet-700", }, { key: "uninstall", href: "/docs/post-install/uninstall", Icon: Undo2, accent: "border-blue-300 bg-blue-50", iconBg: "bg-blue-100 text-blue-700", }, ] export default async function PostInstallPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.postInstall" }) const messages = (await getMessages({ locale })) as unknown as { docs: { postInstall: { routes: Route[] related: { items: RelatedItem[] } } } } const routes = messages.docs.postInstall.routes const relatedItems = messages.docs.postInstall.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const autoLink = (chunks: React.ReactNode) => ( {chunks} ) const customLink = (chunks: React.ReactNode) => ( {chunks} ) const updatesLink = (chunks: React.ReactNode) => ( {chunks} ) const uninstallLink = (chunks: React.ReactNode) => ( {chunks} ) const xshokAnchor = (chunks: React.ReactNode) => ( {chunks} ) const communityAnchor = (chunks: React.ReactNode) => ( {chunks} ) const externalRepoLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t("intro.body")}

{t("openingMenu.heading")}

{t.rich("openingMenu.body", { strong })}

{t("openingMenu.imageAlt")}

{t("threeWays.heading")}

{t("threeWays.body")}

{ROUTE_CONFIG.map(({ key, href, Icon, accent, iconBg }, idx) => { const route = routes[idx] return (

{route.title}

{route.description}

    {route.bullets.map((b, i) => (
  • {b}
  • ))}
) })}
{t.rich("whichBody", { strong, autoLink, customLink, updatesLink, uninstallLink })}

{t("mixing.heading")}

{t.rich("mixing.stackBody", { strong })} {t.rich("mixing.xshokBody", { a: xshokAnchor })}

{t("community.heading")}

{t.rich("community.body", { em, code, a: communityAnchor, link: externalRepoLink })}

{t("related.heading")}

    {relatedItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) }