import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import { ExternalLink } from "lucide-react" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import CopyableCode from "@/components/CopyableCode" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.postInstall.performance.meta" }) return { title: t("title"), description: t("description") } } type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string } export default async function PostInstallPerformancePage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.postInstall.performance" }) const messages = (await getMessages({ locale })) as unknown as { docs: { postInstall: { performance: { pigz: { doesItems: string[] } related: { items: RelatedItem[] } } } } } const doesItems = messages.docs.postInstall.performance.pigz.doesItems const relatedItems = messages.docs.postInstall.performance.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const pigzAnchor = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.body", { em })}

{t("pigz.heading")}

{t.rich("pigz.intro", { code, strong, a: pigzAnchor })}

{t("pigz.doesTitle")}

{t("pigz.doesIntro")}

    {doesItems.map((_, idx) => (
  1. {t.rich(`pigz.doesItems.${idx}`, { code, em })}
  2. ))}
/bin/pigzwrapper <<'EOF' #!/bin/sh PATH=/bin:$PATH GZIP="-1" exec /usr/bin/pigz "$@" EOF chmod +x /bin/pigzwrapper # Only replaces gzip if not already replaced (idempotent) [ ! -f /bin/gzip.original ] && mv /bin/gzip /bin/gzip.original \\ && cp /bin/pigzwrapper /bin/gzip && chmod +x /bin/gzip`} className="my-4" /> {t.rich("pigz.replacesBody", { code })} {t.rich("pigz.revertBody", { strong })}

{t("pigz.verifyTitle")}

{t.rich("pigz.verifyBody", { code })}

{t.rich("pigz.whenBody", { strong })}

{t("related.heading")}

    {relatedItems.map((item, idx) => (
  • {item.label} {item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
  • ))}
) }