Skip to content

Commit a7041ef

Browse files
[NextJS] Make noindex tag opt-out (like main) rather than opt-in (#1592)
* align default robots tag w main * Apply robots meta to all pages --------- Co-authored-by: Jon Kafton <939376+jonkafton@users.noreply.github.com>
1 parent fc4caf8 commit a7041ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontends/main/src/app/page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export async function generateMetadata({
1616
return await getMetadataAsync({
1717
title: "Learn with MIT",
1818
searchParams,
19-
robots:
20-
process.env.MITOL_NOINDEX === "true" ? "noindex, nofollow" : undefined,
2119
})
2220
}
2321

frontends/main/src/common/metadata.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ export const standardizeMetadata = ({
102102
title,
103103
description,
104104
...socialMetadata,
105+
robots:
106+
process.env.MITOL_NOINDEX === "false" ? undefined : "noindex, nofollow",
105107
...otherMeta,
106108
}
107109
}

0 commit comments

Comments
 (0)