From 84760fdae44121f48bb8162a9fb08acb75ae796c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 16:38:43 +0000 Subject: [PATCH] feat: noindex questions whose default project matches bot-only keywords Add a noindex/nofollow robots meta directive to the question page when the default project's name (case-insensitively) contains any of "futureeval", "AI Forecasting Benchmark Tournament", or "minibench". Refs #4423 Co-authored-by: Sylvain <74110469+SylvainChevalier@users.noreply.github.com> --- .../app/(main)/questions/[id]/[[...slug]]/page.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/front_end/src/app/(main)/questions/[id]/[[...slug]]/page.tsx b/front_end/src/app/(main)/questions/[id]/[[...slug]]/page.tsx index c95e3517e9..00fc3c548e 100644 --- a/front_end/src/app/(main)/questions/[id]/[[...slug]]/page.tsx +++ b/front_end/src/app/(main)/questions/[id]/[[...slug]]/page.tsx @@ -13,6 +13,12 @@ type Props = { searchParams: Promise; }; +const NOINDEX_DEFAULT_PROJECT_KEYWORDS = [ + "futureeval", + "AI Forecasting Benchmark Tournament", + "minibench", +]; + export async function generateMetadata(props: Props): Promise { const params = await props.params; const postData = await cachedGetPostForMetadata(params.id); @@ -21,6 +27,10 @@ export async function generateMetadata(props: Props): Promise { return {}; } const questionTitle = getPostTitle(postData); + const defaultProjectName = postData.projects?.default_project?.name ?? ""; + const shouldNoindex = NOINDEX_DEFAULT_PROJECT_KEYWORDS.some((keyword) => + defaultProjectName.toLowerCase().includes(keyword.toLowerCase()) + ); return { title: getValidString(postData.html_metadata_json?.title) ?? @@ -52,6 +62,7 @@ export async function generateMetadata(props: Props): Promise { alt: "community predictions", }, }, + ...(shouldNoindex ? { robots: { index: false, follow: false } } : {}), }; }