Resolve share URLs from the instance host and ship 1200×630 Open Graph images.
Staging no longer advertises production canonicals, and Slack/social previews get a default hero card with template and article overrides. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
47625b1c82
commit
751f2e9343
22 files changed
+340
-16
No files matched your search
@@ -8,7 +8,10 @@ import {
|
||||
getRelatedBlogPosts,
|
||||
} from "../../../../lib/content";
|
||||
import { logger } from "../../../../lib/logger";
|
||||
import { routeMetadata } from "../../../../lib/siteMetadata";
|
||||
import {
|
||||
articleShareImages,
|
||||
routeMetadata,
|
||||
} from "../../../../lib/siteMetadata";
|
||||
import messages from "../../../../messages/en/index";
|
||||
import ContentBanner from "../../../components/sections/ContentBanner";
|
||||
import AskOrganizer from "../../../components/sections/AskOrganizer";
|
||||
@@ -70,6 +73,11 @@ export async function generateMetadata({
|
||||
});
|
||||
}
|
||||
|
||||
const articleImages = articleShareImages(
|
||||
slug,
|
||||
post.frontmatter.title,
|
||||
);
|
||||
|
||||
return routeMetadata(`/blog/${slug}`, {
|
||||
title: post.frontmatter.title,
|
||||
description: post.frontmatter.description,
|
||||
@@ -82,6 +90,7 @@ export async function generateMetadata({
|
||||
authors: [post.frontmatter.author],
|
||||
url: `/blog/${slug}`,
|
||||
siteName: messages.metadata.siteName,
|
||||
...(articleImages ? { images: articleImages } : {}),
|
||||
},
|
||||
twitter: {
|
||||
card: "summary_large_image",
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
import type { Metadata } from "next";
|
||||
import messages from "../../../messages/en/index";
|
||||
import { listRuleTemplatesFromDb } from "../../../lib/server/ruleTemplates";
|
||||
import { routeMetadata } from "../../../lib/siteMetadata";
|
||||
import {
|
||||
routeMetadata,
|
||||
templatesShareImages,
|
||||
} from "../../../lib/siteMetadata";
|
||||
import { gridEntriesForFullCatalogWithFallback } from "../../../lib/templates/templateGridPresentation";
|
||||
import TemplatesPageClient from "./TemplatesPageClient";
|
||||
|
||||
export const metadata: Metadata = routeMetadata("/templates", {
|
||||
title: messages.metadata.templates.title,
|
||||
openGraph: {
|
||||
images: templatesShareImages(),
|
||||
},
|
||||
});
|
||||
|
||||
export default async function TemplatesPage() {
|
||||
|
||||
Reference in new issue
Block a user