CardURL CardURL
Login

Install examples

Replace YOUR_SITE_KEY with the key from Checkout. Templates: blog, launch, changelog, docs.

HTML

One page, one og:image URL. Repeat the pattern on every page you care about.

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8"/>
  <title>Ship it</title>
  <meta property="og:title" content="Ship it"/>
  <meta property="og:description" content="A post on your site."/>
  <meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it"/>
  <meta property="og:image:width" content="1200"/>
  <meta property="og:image:height" content="630"/>
</head>
<body>
  <h1>Ship it</h1>
</body>
</html>

Next.js

App Router: return the CardURL URL from generateMetadata in each route that should get a card. One URL per page, built from that page's own title. This is not a set-once site setting.

1. A small helper

// app/cardurl.ts
const SITE_KEY = "YOUR_SITE_KEY";

export function cardUrl(
  template: "blog" | "launch" | "changelog" | "docs",
  params: Record<string, string>,
) {
  const query = new URLSearchParams(params).toString();
  return `https://cardurl.dev/og/${SITE_KEY}/${template}?${query}`;
}

URLSearchParams encodes each value, so titles with &, : or ? stay intact. If you build the string by hand, wrap each value in encodeURIComponent. Params per template: templates.

2. A dynamic route

// app/blog/[slug]/page.tsx
import type { Metadata } from "next";
import { notFound } from "next/navigation";
import { cardUrl } from "../../cardurl";
import { getPost } from "../../posts"; // your data

type Props = { params: Promise<{ slug: string }> };

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const { slug } = await params;
  const post = await getPost(slug);
  if (!post) notFound();

  const image = cardUrl("blog", {
    title: post.title,
    date: post.date,
    site: "yoursite.com",
  });

  return {
    title: post.title,
    description: post.description,
    openGraph: {
      title: post.title,
      description: post.description,
      type: "article",
      images: [{ url: image, width: 1200, height: 630, alt: post.title }],
    },
    twitter: {
      card: "summary_large_image",
      images: [image],
    },
  };
}

3. What the page should render

For a post titled "Ship it: notes & lessons", next build then next start gave:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+21%2C+2026&amp;site=yoursite.com"/>
<meta property="og:image:width" content="1200"/>
<meta property="og:image:height" content="630"/>
<meta name="twitter:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+21%2C+2026&amp;site=yoursite.com"/>

The &amp; is normal HTML escaping. Crawlers read it as &.

Things that trip people up

Check it

Open view-source on the deployed page and search for og:image. Paste the image URL in a new tab: it should load a 1200×630 card. Or paste the page URL in the Social preview generator. Try your title in the preview first; it is free and stamped PREVIEW. The hosted /og/ URL needs your site key: 7-day trial, then $39/mo.

Astro

Build the CardURL URL in the layout that writes your <head>, from the title each page passes in. One URL per page.

// src/cardurl.ts
const SITE_KEY = "YOUR_SITE_KEY";

export function cardUrl(
  template: "blog" | "launch" | "changelog" | "docs",
  params: Record<string, string>,
) {
  const query = new URLSearchParams(params).toString();
  return `https://cardurl.dev/og/${SITE_KEY}/${template}?${query}`;
}
---
// src/layouts/BaseLayout.astro
import { cardUrl } from "../cardurl";

interface Props {
  title: string;
  description: string;
  date?: string;
}

const { title, description, date } = Astro.props;
const image = cardUrl("blog", {
  title,
  ...(date ? { date } : {}),
  site: "yoursite.com",
});
---
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>{title}</title>
    <meta name="description" content={description} />
    <meta property="og:title" content={title} />
    <meta property="og:description" content={description} />
    <meta property="og:image" content={image} />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:image" content={image} />
  </head>
  <body>
    <slot />
  </body>
</html>

From an .astro page: <BaseLayout title="Ship it: notes & lessons" description="A post on your site." date="Oct 24, 2026">.

Markdown pages in src/pages/ pick a layout with layout: in frontmatter, and that layout gets the frontmatter as a frontmatter prop, not as title. A small wrapper passes it on (Astro docs: Layouts, read 2026-10-24):

---
// src/layouts/PostLayout.astro
import BaseLayout from "./BaseLayout.astro";

const { frontmatter } = Astro.props;
---
<BaseLayout
  title={frontmatter.title}
  description={frontmatter.description}
  date={frontmatter.date}
>
  <article>
    <h1>{frontmatter.title}</h1>
    <slot />
  </article>
</BaseLayout>
---
# src/pages/blog/ship-it.md
layout: ../../layouts/PostLayout.astro
title: "Ship it: notes & lessons"
description: "A post on your site."
date: "Oct 24, 2026"
---

With Astro 7.4.2, astro build wrote this to both pages:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+24%2C+2026&amp;site=yoursite.com">

The URL is already absolute, so you don't need Astro's site setting for it.

Eleventy

Add a filter that turns a title into the CardURL URL, then call it in the layout your posts use. Each post's front matter title becomes its own card.

// eleventy.config.js
const SITE_KEY = "YOUR_SITE_KEY";

export default function (eleventyConfig) {
  eleventyConfig.addFilter("cardUrl", function (title, template = "blog") {
    const params = { title, site: "yoursite.com" };
    if (this.page.date) {
      params.date = this.page.date.toLocaleDateString("en-US", {
        month: "short", day: "numeric", year: "numeric", timeZone: "UTC",
      });
    }
    const query = new URLSearchParams(params).toString();
    return `https://cardurl.dev/og/${SITE_KEY}/${template}?${query}`;
  });
}
{# _includes/base.njk #}
{% set image = title | cardUrl("blog") %}
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>{{ title }}</title>
    <meta name="description" content="{{ description }}">
    <meta property="og:title" content="{{ title }}">
    <meta property="og:description" content="{{ description }}">
    <meta property="og:image" content="{{ image }}">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="630">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:image" content="{{ image }}">
  </head>
  <body>
    {{ content | safe }}
  </body>
</html>
---
# blog/ship-it.md
layout: base.njk
title: "Ship it: notes & lessons"
description: "A post on your site."
date: 2026-10-24
---

With Eleventy 3.1.7 that built:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;site=yoursite.com&amp;date=Oct+24%2C+2026">

Hugo

Put the tags in a partial and call it from the <head> of your base template. Hugo's querify builds the query string from a map, so each page's title is encoded for you (Hugo docs: querify, read 2026-10-25).

# hugo.toml
baseURL = 'https://yoursite.com/'
[params]
  cardurlSiteKey = 'YOUR_SITE_KEY'
{{/* layouts/_partials/cardurl.html */}}
{{- $params := dict "title" .Title "site" "yoursite.com" -}}
{{- if and .IsPage (not .Date.IsZero) -}}
  {{- $params = merge $params (dict "date" (.Date.Format "Jan 2, 2006")) -}}
{{- end -}}
{{- $image := printf "https://cardurl.dev/og/%s/blog?%s" site.Params.cardurlSiteKey (querify $params) -}}
<meta property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Description }}">
<meta property="og:image" content="{{ $image }}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ $image }}">
{{/* layouts/baseof.html, inside <head> */}}
{{ partial "cardurl.html" . }}
---
# content/blog/ship-it.md
title: "Ship it: notes & lessons"
description: "A post on your site."
date: 2026-10-24
---

With Hugo v0.168.0 that built:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?date=Oct&#43;24%2C&#43;2026&amp;site=yoursite.com&amp;title=Ship&#43;it%3A&#43;notes&#43;%26&#43;lessons">

Jekyll

Put the tags in an include and call it from the <head> of your default layout. Build the URL with cgi_escape, which turns spaces into + and encodes &, so a title can't break the query string (Jekyll docs: Liquid filters, read 2026-10-25).

# _config.yml
url: "https://yoursite.com"
cardurl_site_key: "YOUR_SITE_KEY"
{% comment %} _includes/cardurl.html {% endcomment %}
{%- capture image -%}
https://cardurl.dev/og/{{ site.cardurl_site_key }}/blog?title={{ page.title | cgi_escape }}&site=yoursite.com
{%- if page.date -%}&date={{ page.date | date: "%b %-d, %Y" | cgi_escape }}{%- endif -%}
{%- endcapture -%}
<meta property="og:title" content="{{ page.title | escape }}">
<meta property="og:description" content="{{ page.description | escape }}">
<meta property="og:image" content="{{ image | escape }}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ image | escape }}">
{% comment %} _layouts/default.html, inside <head> {% endcomment %}
{% include cardurl.html %}
---
# _posts/2026-10-24-ship-it.md
layout: default
title: "Ship it: notes & lessons"
description: "A post on your site."
---

With Jekyll 4.4.1 that built:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;site=yoursite.com&amp;date=Oct+24%2C+2026">

SvelteKit

Return each page's title from its load function, then write the tags once, in the root layout's <svelte:head>, from page.data. That's the pattern the SvelteKit docs suggest, and with SSR on (the default) the tags are in the HTML the server sends (SvelteKit docs: SEO, read 2026-10-28).

<script lang="ts">
  // src/routes/+layout.svelte
  import { page } from "$app/state";

  let { children } = $props();

  const SITE_KEY = "YOUR_SITE_KEY";

  const image = $derived.by(() => {
    if (!page.data.title) return null;
    const query = new URLSearchParams({
      title: page.data.title,
      ...(page.data.date ? { date: page.data.date } : {}),
      site: "yoursite.com",
    }).toString();
    return `https://cardurl.dev/og/${SITE_KEY}/blog?${query}`;
  });
</script>

<svelte:head>
  {#if image}
    <title>{page.data.title}</title>
    <meta name="description" content={page.data.description} />
    <meta property="og:title" content={page.data.title} />
    <meta property="og:description" content={page.data.description} />
    <meta property="og:image" content={image} />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:image" content={image} />
  {/if}
</svelte:head>

{@render children()}
// src/routes/blog/[slug]/+page.ts
import { error } from "@sveltejs/kit";
import type { PageLoad } from "./$types";

const posts: Record<string, { title: string; description: string; date: string }> = {
  "ship-it": {
    title: "Ship it: notes & lessons",
    description: "A post on your site.",
    date: "Oct 24, 2026",
  },
};

export const load: PageLoad = ({ params }) => {
  const post = posts[params.slug];
  if (!post) error(404, "Not found");
  return post;
};

With SvelteKit 3.1.0 and Svelte 5.57.3, the server-rendered HTML for /blog/ship-it had:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+24%2C+2026&amp;site=yoursite.com"/>

Nuxt

Call useSeoMeta in the page with the per-page CardURL URL. Pass getters (() => value) for values that come from the route or fetched data, so the tags follow the page (Nuxt docs: useSeoMeta, read 2026-10-28).

// app/utils/cardurl.ts
const SITE_KEY = "YOUR_SITE_KEY";

export function cardUrl(
  template: "blog" | "launch" | "changelog" | "docs",
  params: Record<string, string>,
) {
  const query = new URLSearchParams(params).toString();
  return `https://cardurl.dev/og/${SITE_KEY}/${template}?${query}`;
}
<script setup lang="ts">
// app/pages/blog/[slug].vue
import { cardUrl } from "~/utils/cardurl";

const posts: Record<string, { title: string; description: string; date: string }> = {
  "ship-it": {
    title: "Ship it: notes & lessons",
    description: "A post on your site.",
    date: "Oct 24, 2026",
  },
};

const route = useRoute();
const post = computed(() => posts[route.params.slug as string]);
if (!post.value) {
  throw createError({ statusCode: 404, statusMessage: "Not found" });
}

const image = () =>
  cardUrl("blog", {
    title: post.value!.title,
    date: post.value!.date,
    site: "yoursite.com",
  });

useSeoMeta({
  title: () => post.value!.title,
  description: () => post.value!.description,
  ogTitle: () => post.value!.title,
  ogDescription: () => post.value!.description,
  ogImage: image,
  ogImageWidth: 1200,
  ogImageHeight: 630,
  twitterCard: "summary_large_image",
  twitterImage: image,
});
</script>

<template>
  <article>
    <h1>{{ post!.title }}</h1>
  </article>
</template>

With Nuxt 4.6.3, the server-rendered HTML for /blog/ship-it had:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&date=Oct+24%2C+2026&site=yoursite.com">

React Router

Framework mode: return the post from the route's loader, then build the tags in the route's meta export from loaderData. Open Graph tags take property, not name. <Meta /> in the root <head> renders them, so with SSR on (the default) they're in the HTML the server sends (React Router docs: Meta, route module meta, <Meta />, read 2026-10-29). The helper is the same cardUrl as in the Next.js section, saved as app/cardurl.ts.

// app/routes.ts
import { type RouteConfig, route } from "@react-router/dev/routes";

export default [route("blog/:slug", "routes/post.tsx")] satisfies RouteConfig;
// app/routes/post.tsx
import { data } from "react-router";
import type { Route } from "./+types/post";
import { cardUrl } from "../cardurl";

const posts: Record<string, { title: string; description: string; date: string }> = {
  "ship-it": {
    title: "Ship it: notes & lessons",
    description: "A post on your site.",
    date: "Oct 24, 2026",
  },
};

export function loader({ params }: Route.LoaderArgs) {
  const post = posts[params.slug];
  if (!post) throw data("Not found", { status: 404 });
  return post;
}

export function meta({ loaderData }: Route.MetaArgs) {
  if (!loaderData) return [{ title: "Not found" }];
  const image = cardUrl("blog", {
    title: loaderData.title,
    date: loaderData.date,
    site: "yoursite.com",
  });
  return [
    { title: loaderData.title },
    { name: "description", content: loaderData.description },
    { property: "og:title", content: loaderData.title },
    { property: "og:description", content: loaderData.description },
    { property: "og:image", content: image },
    { property: "og:image:width", content: "1200" },
    { property: "og:image:height", content: "630" },
    { name: "twitter:card", content: "summary_large_image" },
    { name: "twitter:image", content: image },
  ];
}

export default function Post({ loaderData }: Route.ComponentProps) {
  return (
    <article>
      <h1>{loaderData.title}</h1>
    </article>
  );
}
// app/root.tsx
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";

export function Layout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <head>
        <meta charSet="utf-8" />
        <Meta />
        <Links />
      </head>
      <body>
        {children}
        <ScrollRestoration />
        <Scripts />
      </body>
    </html>
  );
}

export default function App() {
  return <Outlet />;
}

With React Router 7.18.5, and again with 8.5.1, the server-rendered HTML for /blog/ship-it had:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+24%2C+2026&amp;site=yoursite.com"/>

Gatsby

Export a Head function from each page or createPage template and build the CardURL URL there from the page's data. gatsby build writes the tags into each page's static HTML. Head needs Gatsby 4.19.0 or later (Gatsby docs: Gatsby Head API, read 2026-10-29). The helper is the same cardUrl as in the Astro section, saved as src/cardurl.ts.

// gatsby-node.ts
import path from "path";
import type { GatsbyNode } from "gatsby";

const posts = [
  {
    slug: "ship-it",
    title: "Ship it: notes & lessons",
    description: "A post on your site.",
    date: "Oct 24, 2026",
  },
];

export const createPages: GatsbyNode["createPages"] = async ({ actions }) => {
  for (const post of posts) {
    actions.createPage({
      path: `/blog/${post.slug}/`,
      component: path.resolve("./src/templates/post.tsx"),
      context: post,
    });
  }
};
// src/templates/post.tsx
import * as React from "react";
import type { HeadProps, PageProps } from "gatsby";
import { cardUrl } from "../cardurl";

type Post = { title: string; description: string; date: string };

export default function PostPage({ pageContext }: PageProps<object, Post>) {
  return (
    <article>
      <h1>{pageContext.title}</h1>
    </article>
  );
}

export function Head({ pageContext }: HeadProps<object, Post>) {
  const image = cardUrl("blog", {
    title: pageContext.title,
    date: pageContext.date,
    site: "yoursite.com",
  });
  return (
    <>
      <title>{pageContext.title}</title>
      <meta name="description" content={pageContext.description} />
      <meta property="og:title" content={pageContext.title} />
      <meta property="og:description" content={pageContext.description} />
      <meta property="og:image" content={image} />
      <meta property="og:image:width" content="1200" />
      <meta property="og:image:height" content="630" />
      <meta name="twitter:card" content="summary_large_image" />
      <meta name="twitter:image" content={image} />
    </>
  );
}

With Gatsby 5.16.1, gatsby build wrote this to public/blog/ship-it/index.html:

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&amp;date=Oct+24%2C+2026&amp;site=yoursite.com" data-gatsby-head="true"/>

Check it

Build, open the page's HTML and find og:image. The &amp; is normal HTML escaping; crawlers read &. Try your title in the preview first; it's free and stamped PREVIEW. The hosted /og/ URL needs your site key: 7-day trial, then $39/mo. Params per template: templates.

WordPress

There is no CardURL WordPress plugin. You can paste each post's CardURL URL into your SEO plugin by hand, or add a small filter so Yoast SEO or Rank Math prints it for every post.

By hand

In Yoast or Rank Math, open the post → Social → Image URL, and paste that post's CardURL URL. Repeat per post or page.

Yoast / Rank Math → Social → Image URL
https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it

With a filter

Both plugins document a filter for the image URL they print. Yoast: wpseo_opengraph_image and wpseo_twitter_image (Yoast Metadata API). Rank Math: rank_math/opengraph/{$network}/image, where the network is facebook or twitter (Rank Math OpenGraph filters). Both read 2026-10-26. Save this as wp-content/mu-plugins/cardurl.php (a must-use plugin). It changes single posts only; pages and archives keep the image the plugin already picks.

<?php
/**
 * Plugin Name: CardURL og:image
 * Description: Point the SEO plugin's og:image at a per-post CardURL URL.
 */

const CARDURL_SITE_KEY = 'YOUR_SITE_KEY';

function cardurl_image_url( $post_id ) {
	$params = array(
		'title' => html_entity_decode( get_post_field( 'post_title', $post_id, 'raw' ), ENT_QUOTES, 'UTF-8' ),
		'date'  => get_the_date( 'M j, Y', $post_id ),
		'site'  => 'yoursite.com',
	);
	return 'https://cardurl.dev/og/' . CARDURL_SITE_KEY . '/blog?' . http_build_query( $params );
}

function cardurl_filter_image( $url ) {
	return is_singular( 'post' ) ? cardurl_image_url( get_queried_object_id() ) : $url;
}

// Yoast SEO
add_filter( 'wpseo_opengraph_image', 'cardurl_filter_image' );
add_filter( 'wpseo_twitter_image', 'cardurl_filter_image' );

// Rank Math
add_filter( 'rank_math/opengraph/facebook/image', 'cardurl_filter_image' );
add_filter( 'rank_math/opengraph/twitter/image', 'cardurl_filter_image' );

What a post titled "Ship it: notes & lessons" printed with Yoast SEO 28.7 and with Rank Math 1.0.280 (same two lines from both):

<meta property="og:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&date=Oct+24%2C+2026&site=yoursite.com" />
<meta name="twitter:image" content="https://cardurl.dev/og/YOUR_SITE_KEY/blog?title=Ship+it%3A+notes+%26+lessons&date=Oct+24%2C+2026&site=yoursite.com" />

More: Getting started.

Demonstration cards

Sample titles for the four templates. Not customer work.

Demonstration blog card: Why we shipped the notes archive
Demonstration — blog
Demonstration launch card: Atlas Checklist
Demonstration — launch
Demonstration changelog card: Search notes is live
Demonstration — changelog
Demonstration docs card: Connect your domain
Demonstration — docs