From 5cff62425cf9575eeeea53472a4359125a86fe2d Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Tue, 7 Apr 2026 12:50:17 -0400 Subject: [PATCH] fix(site): fix pricing page json-ld --- apps/site/src/app/pricing/page.tsx | 61 +++------------------------- apps/site/src/lib/structured-data.ts | 56 ------------------------- 2 files changed, 6 insertions(+), 111 deletions(-) diff --git a/apps/site/src/app/pricing/page.tsx b/apps/site/src/app/pricing/page.tsx index 2f0e7f26cd..ef74b73830 100644 --- a/apps/site/src/app/pricing/page.tsx +++ b/apps/site/src/app/pricing/page.tsx @@ -1,68 +1,19 @@ -import { JsonLd } from "@/components/json-ld"; -import { createPricingStructuredData } from "@/lib/structured-data"; -import type { Metadata } from "next"; +import { createPageMetadata } from "@/lib/page-metadata"; import { Accordion, Accordions, Button } from "@prisma/eclipse"; import { faqs } from "./pricing-data"; import { PricingPageContent } from "./pricing-page-content"; -const pricingStructuredData = createPricingStructuredData([ - { - name: "Free", - description: "Perfect for that weekend idea. 100,000 operations and 500 MB storage included.", - price: 0, - billingPeriod: "month", - }, - { - name: "Starter", - description: "The basics you need to launch. 1,000,000 operations and 10 GB storage included.", - price: 10, - billingPeriod: "month", - }, - { - name: "Pro", - description: "Growing for business success. 10,000,000 operations and 50 GB storage included.", - price: 49, - billingPeriod: "month", - }, - { - name: "Business", - description: "For mission-critical apps. 50,000,000 operations and 100 GB storage included.", - price: 129, - billingPeriod: "month", - }, -]); - -export const metadata: Metadata = { +export const metadata = createPageMetadata({ title: "Pricing — Prisma Postgres Plans & Features", description: - "Get started for free with Prisma Postgres. Choose the right plan for your workspace based on your project requirements.", - alternates: { - canonical: "https://www.prisma.io/pricing", - }, - openGraph: { - title: "Pricing — Prisma Postgres Plans & Features", - description: - "Get started for free with Prisma Postgres. Choose the right plan for your workspace based on your project requirements.", - url: "https://www.prisma.io/pricing", - images: [ - { - url: "/og/og-pricing.png", - }, - ], - }, - twitter: { - card: "summary_large_image", - title: "Pricing — Prisma Postgres Plans & Features", - description: - "Get started for free with Prisma Postgres. Choose the right plan for your workspace based on your project requirements.", - images: ["/og/og-pricing.png"], - }, -}; + "Get started for free with Prisma Postgres. Choose the right plan for your workspace based on your project requirements.", + path: "/pricing", + ogImage: "/og/og-pricing.png", +}); export default function PricingPage() { return (
- {/* FAQ */} diff --git a/apps/site/src/lib/structured-data.ts b/apps/site/src/lib/structured-data.ts index 9c1156a55a..53df270a60 100644 --- a/apps/site/src/lib/structured-data.ts +++ b/apps/site/src/lib/structured-data.ts @@ -6,13 +6,6 @@ type FaqEntry = { answer: string; }; -type PricingTier = { - name: string; - description: string; - price: number; - billingPeriod: string; -}; - type ListEntry = { name: string; url: string; @@ -90,55 +83,6 @@ export function createFaqStructuredData(pagePath: string, faqs: FaqEntry[], name }; } -export function createPricingStructuredData(tiers: PricingTier[]) { - const url = absoluteUrl("/pricing"); - const baseUrl = getBaseUrl(); - return { - "@context": "https://schema.org", - "@graph": [ - { - "@type": "WebPage", - "@id": `${url}#webpage`, - name: "Prisma Pricing — Plans & Features", - url, - description: - "Get started for free with Prisma Postgres. Choose the right plan for your workspace based on your project requirements.", - publisher: { - "@id": `${baseUrl}#organization`, - }, - isPartOf: { - "@id": `${baseUrl}#website`, - }, - }, - ...tiers.map((tier) => ({ - "@type": "Product", - name: `Prisma Postgres ${tier.name}`, - description: tier.description, - brand: { - "@id": `${baseUrl}#organization`, - }, - offers: { - "@type": "Offer", - url, - priceCurrency: "USD", - price: tier.price, - priceValidUntil: new Date( - new Date().getFullYear() + 1, - new Date().getMonth(), - new Date().getDate(), - ) - .toISOString() - .split("T")[0], - availability: "https://schema.org/InStock", - ...(tier.price > 0 - ? { priceSpecification: { "@type": "UnitPriceSpecification", billingDuration: "P1M" } } - : {}), - }, - })), - ], - }; -} - export function createSoftwareApplicationStructuredData({ path, name,