Move the use-case index onto Learn so the pilot stories stay reachable, and make share images resolve on the host that serves the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
18abeb56dd
commit
9ea3f9fd0a
27 files changed
+656
-419
No files matched your search
+20
-7
@@ -153,9 +153,7 @@ export function articleShareImages(
|
||||
slug: string,
|
||||
alt: string,
|
||||
): ShareImage[] | undefined {
|
||||
if (
|
||||
!(CONTENT_CATALOG_SLUG_ORDER as readonly string[]).includes(slug)
|
||||
) {
|
||||
if (!(CONTENT_CATALOG_SLUG_ORDER as readonly string[]).includes(slug)) {
|
||||
return undefined;
|
||||
}
|
||||
return [shareImage(contentBlogOgPath(slug), alt)];
|
||||
@@ -241,15 +239,30 @@ export function routeMetadata(
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Link unfurlers. Staging stays out of search indexes, and these agents can
|
||||
* still fetch the page so a shared link can show its image.
|
||||
*/
|
||||
const UNFURL_USER_AGENTS = [
|
||||
"Twitterbot",
|
||||
"facebookexternalhit",
|
||||
"Slackbot",
|
||||
"Discordbot",
|
||||
"LinkedInBot",
|
||||
"TelegramBot",
|
||||
"WhatsApp",
|
||||
"Bluesky",
|
||||
] as const;
|
||||
|
||||
export function buildRobots(
|
||||
host: string | null | undefined,
|
||||
): MetadataRoute.Robots {
|
||||
if (!isIndexableHost(host)) {
|
||||
return {
|
||||
rules: {
|
||||
userAgent: "*",
|
||||
disallow: "/",
|
||||
},
|
||||
rules: [
|
||||
{ userAgent: "*", disallow: "/" },
|
||||
{ userAgent: [...UNFURL_USER_AGENTS], allow: "/" },
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user