diff --git a/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/opengraph-image.tsx b/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/opengraph-image.tsx new file mode 100644 index 000000000..fa1d3dd8b --- /dev/null +++ b/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/opengraph-image.tsx @@ -0,0 +1,16 @@ +import { notFound } from "next/navigation"; +import { getComparison } from "@/lib/comparisons"; +import { renderOgImage, OG_SIZE } from "@/lib/og-image"; + +export const alt = "OpenShip platform comparison"; +export const size = OG_SIZE; +export const contentType = "image/png"; + +export default async function OgImage({ params }: { params: Promise<{ slug: string }> }) { + const item = getComparison((await params).slug); + if (!item) notFound(); + return renderOgImage({ + title: `OpenShip × ${item.group === "vps" ? "VPS" : item.name}`, + subtitle: `openship.io/compare/${item.slug}`, + }); +} diff --git a/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/page.tsx b/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/page.tsx new file mode 100644 index 000000000..7945ca2ea --- /dev/null +++ b/apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/page.tsx @@ -0,0 +1,277 @@ +import type { Metadata } from "next"; +import { notFound } from "next/navigation"; +import { getLocale } from "next-intl/server"; +import type { AppLocale } from "@repo/core/locale"; +import { ArrowRight, ArrowUpRight } from "lucide-react"; +import { Navbar, Footer } from "@/components/landing"; +import { MarketingIntro } from "@/components/marketing/marketing-intro"; +import { MarketingSection } from "@/components/marketing/marketing-section"; +import { MarketingCta } from "@/components/marketing/marketing-cta"; +import { ComparisonCards, ComparisonMark } from "@/components/marketing/comparison-cards"; +import { StructuredData } from "@/components/marketing/structured-data"; +import { getCopy } from "@/i18n/copy-server"; +import { Link } from "@/i18n/Link"; +import { localizedMetadata } from "@/i18n/metadata"; +import { localizedHref } from "@/i18n/routing"; +import { + COMPARISONS, + COMPARISONS_REVIEWED_AT, + getComparison, + comparisonName, +} from "@/lib/comparisons"; +import { SITE_URL } from "@/lib/sitemap-builder"; + +type Props = { params: Promise<{ slug: string }> }; +export const dynamicParams = false; +export function generateStaticParams() { + return COMPARISONS.map(({ slug }) => ({ slug })); +} + +export async function generateMetadata({ params }: Props): Promise { + const item = getComparison((await params).slug); + if (!item) notFound(); + const copy = await getCopy(); + const title = copy("OpenShip vs {name}: comparison and migration", { + name: comparisonName(item, copy), + }); + const description = copy( + "Compare OpenShip and {name}. {summary} Explore the tradeoffs and a practical migration path.", + { name: comparisonName(item, copy), summary: copy(item.summary) }, + ); + const url = `/compare/${item.slug}`; + return localizedMetadata({ + title: { absolute: title }, + description, + alternates: { canonical: url }, + openGraph: { title, description, url, type: "article" }, + twitter: { card: "summary_large_image", title, description }, + }); +} + +export default async function ComparisonPage({ params }: Props) { + const item = getComparison((await params).slug); + if (!item) notFound(); + const copy = await getCopy(); + const locale = (await getLocale()) as AppLocale; + const name = comparisonName(item, copy); + const heading = copy("OpenShip vs {name}", { name }); + const related = COMPARISONS.filter( + (other) => other.slug !== item.slug && other.group === item.group, + ).slice(0, 3); + const rows = [ + { + label: "Where your apps run", + ours: "Managed OpenShip Cloud, or your own servers.", + theirs: + item.group === "cloud" + ? "Provider-managed infrastructure." + : "Servers you provide and control.", + }, + { + label: "Deployment model", + ours: "Git repositories, Dockerfiles, images and Compose services.", + theirs: item.runtime, + }, + { + label: "Operating responsibility", + ours: "Cloud infrastructure is managed. On your servers, you retain server responsibility.", + theirs: + item.group === "cloud" + ? "The provider operates the platform; you configure your applications." + : item.group === "vps" + ? "You assemble deployments, TLS, monitoring and backups." + : "You maintain the servers and the installed platform.", + }, + ]; + return ( + <> + +
+ + + {copy("All comparisons")} + + } + title={copy.rich("OpenShip vs {name}", { + name, + provider: (chunks) => {chunks}, + })} + description={copy(item.summary)} + > +
+ + {copy("Migrate to OpenShip")} +
+
+
+
+
+ +

{copy("Where {name} fits", { name })}

+

{copy(item.strength)}

+
+
+
+
+
+
+ +
+ + + + + + + + + + + {rows.map((row) => ( + + + + + + ))} + +
{heading}
{copy("What matters")} + OpenShip + + {name} +
{copy(row.label)} + + {copy(row.ours)} + + + {copy(row.theirs)} +
+
+

+ {copy( + "Compare total cost using your actual workload, including compute, storage, transfer and operations. Plan limits and provider pricing can change.", + )}{" "} + {copy("OpenShip pricing")} +

+
+ +
+

{copy("Before you switch")}

+

{copy(item.migration.preparation)}

+
    +
  1. {copy("Inventory services, secrets and persistent data.")}
  2. +
  3. + {copy("Deploy and test on a temporary domain. Verify a backup and restore.")} +
  4. +
  5. {copy("Schedule the data cutover, switch DNS and keep a rollback plan.")}
  6. +
+ + {copy("Open migration guide")} +
+
+ +
+

+ {copy( + "Published by OpenShip. Provider capabilities are based on the official documentation linked below; recommendations reflect the workflows described here.", + )} +

+

+ {copy("Reviewed on {date}", { + date: new Intl.DateTimeFormat(locale, { + dateStyle: "long", + timeZone: "UTC", + }).format(new Date(COMPARISONS_REVIEWED_AT)), + })} +

+
    + {item.sources.map((source) => ( +
  • + + {copy(source.title)} + +
  • + ))} +
  • + + {copy("OpenShip documentation")} +
  • +
  • + + {copy("Cloud SLA")} +
  • +
+
+
+ {related.length > 0 && ( + +
+ +
+
+ )} +
+ +
+