import type { Metadata } from "next" import Image from "next/image" import { ExternalLink } from "lucide-react" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.security.sslLetsencrypt.meta" }) return { title: t("title"), description: t("description"), openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://proxmenux.com/docs/security/ssl-letsencrypt", }, alternates: { canonical: "https://proxmenux.com/docs/security/ssl-letsencrypt" }, } } type StringItem = string type TableRow = { fileRich: string originRich?: string origin?: string when?: string whenRich?: string } export default async function SslLetsEncryptPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.security.sslLetsencrypt" }) const messages = (await getMessages({ locale })) as unknown as { docs: { security: { sslLetsencrypt: { twoways: { proxmox: { items: StringItem[] } custom: { items: StringItem[] } } proxmoxCert: { table: { rows: TableRow[] } } letsencrypt: { prereqs: { items: StringItem[] } } custom: { items: StringItem[] } trustCa: { items: StringItem[] } } } } } const block = messages.docs.security.sslLetsencrypt const proxmoxItems = block.twoways.proxmox.items const customItems = block.twoways.custom.items const tableRows = block.proxmoxCert.table.rows const prereqItems = block.letsencrypt.prereqs.items const customListItems = block.custom.items const trustCaItems = block.trustCa.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const br = () =>
const extlink1 = (chunks: React.ReactNode) => ( {chunks} ) const extlink2 = (chunks: React.ReactNode) => ( {chunks} ) return (
{t("intro.body")}

{t("wheresetting.heading")}

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

{t("wheresetting.imageAlt")}
{t("wheresetting.caption")}

{t("twoways.heading")}

{t("twoways.proxmox.title")}

{t("twoways.proxmox.summary")}

    {proxmoxItems.map((_, idx) => (
  • {t(`twoways.proxmox.items.${idx}`)}
  • ))}

{t("twoways.custom.title")}

{t.rich("twoways.custom.summaryRich", { code })}

    {customItems.map((_, idx) => (
  • {t.rich(`twoways.custom.items.${idx}`, { code })}
  • ))}

{t("proxmoxCert.heading")}

{t.rich("proxmoxCert.intro", { code })}

{tableRows.map((row, idx) => ( ))}
{t("proxmoxCert.table.headers.file")} {t("proxmoxCert.table.headers.origin")} {t("proxmoxCert.table.headers.when")}
{t.rich(`proxmoxCert.table.rows.${idx}.fileRich`, { code, br })} {row.originRich ? t.rich(`proxmoxCert.table.rows.${idx}.originRich`, { code, strong, em }) : t(`proxmoxCert.table.rows.${idx}.origin`)} {row.whenRich ? t.rich(`proxmoxCert.table.rows.${idx}.whenRich`, { code }) : t(`proxmoxCert.table.rows.${idx}.when`)}
{t.rich("proxmoxCert.callout.bodyRich", { code })}

{t("letsencrypt.heading")}

{t.rich("letsencrypt.intro", { code, em, extlink1 })}

    {prereqItems.map((_, idx) => (
  • {t.rich(`letsencrypt.prereqs.items.${idx}`, { strong })}
  • ))}

{t("letsencrypt.step1.heading")}

{t.rich("letsencrypt.step1.introRich", { code })}

        {t("letsencrypt.step1.code")}
      

{t.rich("letsencrypt.step1.afterRich", { code })}

{t("letsencrypt.step2.heading")}

{t.rich("letsencrypt.step2.http01Rich", { code, strong })}

{t.rich("letsencrypt.step2.dns01Rich", { strong })}

        {t("letsencrypt.step2.code")}
      

{t.rich("letsencrypt.step2.outroRich", { code, extlink2 })}

{t("letsencrypt.step3.heading")}

{t.rich("letsencrypt.step3.http01Rich", { code })}

        {t("letsencrypt.step3.code1")}
      

{t("letsencrypt.step3.dns01")}

        {t("letsencrypt.step3.code2")}
      

{t.rich("letsencrypt.step3.wildcardRich", { code })}

{t("letsencrypt.step4.heading")}

        {t("letsencrypt.step4.code")}
      

{t.rich("letsencrypt.step4.afterRich", { code })}

{t("letsencrypt.step5.heading")}

        {t("letsencrypt.step5.code")}
      

{t.rich("letsencrypt.step5.afterRich", { code })}

{t.rich("letsencrypt.gui.bodyRich", { em })}

{t("switchToHttps.heading")}

{t.rich("switchToHttps.bodyRich", { code, strong, em })}

{t("custom.heading")}

{t.rich("custom.intro", { strong })}

    {customListItems.map((_, idx) => (
  • {t.rich(`custom.items.${idx}`, { code, strong })}
  • ))}

{t("custom.outro")}

        {t("custom.code")}
      
{t.rich("custom.symlinkCallout.bodyRich", { code })}

{t("afterHttps.heading")}

{t.rich("afterHttps.bodyRich", { code })}

{t("afterHttps.reverse.heading")}

{t.rich("afterHttps.reverse.bodyRich", { code })}

{t("trustCa.heading")}

{t.rich("trustCa.intro1Rich", { code })}

{t.rich("trustCa.intro2Rich", { code })}

        {t("trustCa.code")}
      

{t("trustCa.thenImport")}

    {trustCaItems.map((_, idx) => (
  • {t.rich(`trustCa.items.${idx}`, { code, strong, em })}
  • ))}
{t.rich("trustCa.standalone.bodyRich", { code })}

{t("disable.heading")}

{t.rich("disable.bodyRich", { strong })}

{t.rich("disable.stateCallout.bodyRich", { code })}
) }