From febdda27b0a223253fb7456681ecf25164ab851c Mon Sep 17 00:00:00 2001 From: Hydra Date: Mon, 16 Nov 2026 02:50:00 +0200 Subject: [PATCH] Add localized platform comparisons and Cloud SLA pages --- .../compare/[slug]/opengraph-image.tsx | 16 + .../(marketing)/compare/[slug]/page.tsx | 277 +++++++++++++ .../compare/[slug]/twitter-image.tsx | 1 + .../[locale]/(marketing)/compare/compare.css | 258 ++++++++++++ .../[locale]/(marketing)/compare/layout.tsx | 6 + .../[locale]/(marketing)/compare/page.tsx | 103 +++++ .../[locale]/(marketing)/migrate/_data.ts | 2 +- .../migrate/from-git/opengraph-image.tsx | 9 + .../(marketing)/migrate/from-git/page.tsx | 115 ++++++ .../migrate/from-git/twitter-image.tsx | 1 + .../(site)/[locale]/(marketing)/sla/page.tsx | 129 ++++++ .../[locale]/(marketing)/terms/page.tsx | 97 +---- apps/web/src/app/globals.css | 6 - apps/web/src/app/llms.txt/route.ts | 5 + apps/web/src/app/sitemaps/pages.xml/route.ts | 15 + .../web/src/components/landing/comparison.tsx | 376 +----------------- apps/web/src/components/landing/footer.tsx | 3 + apps/web/src/components/landing/navbar.tsx | 1 + .../components/marketing/comparison-cards.css | 72 ++++ .../components/marketing/comparison-cards.tsx | 49 +++ .../src/components/marketing/sla-terms.tsx | 101 +++++ .../components/marketing/structured-data.tsx | 9 + apps/web/src/i18n/messages/ar.json | 217 +++++++--- apps/web/src/i18n/messages/de.json | 217 +++++++--- apps/web/src/i18n/messages/en.json | 217 +++++++--- apps/web/src/i18n/messages/es.json | 217 +++++++--- apps/web/src/i18n/messages/fr.json | 217 +++++++--- apps/web/src/i18n/messages/ja.json | 217 +++++++--- apps/web/src/i18n/messages/pt.json | 217 +++++++--- apps/web/src/i18n/messages/ru.json | 217 +++++++--- apps/web/src/i18n/messages/tr.json | 217 +++++++--- apps/web/src/i18n/messages/zh.json | 217 +++++++--- apps/web/src/i18n/paths.json | 2 + apps/web/src/lib/cloud-service.ts | 2 +- apps/web/src/lib/comparisons.ts | 286 +++++++++++++ apps/web/src/styles/landing.css | 73 +--- apps/web/test/comparisons.test.ts | 111 ++++++ scripts/check-web-social-metadata.mjs | 8 +- 38 files changed, 3181 insertions(+), 1122 deletions(-) create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/opengraph-image.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/page.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/[slug]/twitter-image.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/compare.css create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/layout.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/compare/page.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/migrate/from-git/opengraph-image.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/migrate/from-git/page.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/migrate/from-git/twitter-image.tsx create mode 100644 apps/web/src/app/(site)/[locale]/(marketing)/sla/page.tsx create mode 100644 apps/web/src/components/marketing/comparison-cards.css create mode 100644 apps/web/src/components/marketing/comparison-cards.tsx create mode 100644 apps/web/src/components/marketing/sla-terms.tsx create mode 100644 apps/web/src/components/marketing/structured-data.tsx create mode 100644 apps/web/src/lib/comparisons.ts create mode 100644 apps/web/test/comparisons.test.ts 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 && ( + +
+ +
+
+ )} +
+ +
+