Skip to content

Commit

Permalink
Exclude thank-you page from indexing (#4587)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakyi authored Feb 23, 2025
1 parent 698d603 commit 326a3e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/model/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const getPostsFromSnapshots = async (
.map((snapshot) => parsePostWpApiSnapshot(snapshot!))

// Published pages excluded from public views
const excludedSlugs = [BLOG_SLUG]
const excludedSlugs = [BLOG_SLUG, "thank-you"]

const filterConditions: Array<FilterFnPostRestApi> = [
(post): boolean => !excludedSlugs.includes(post.slug),
Expand Down
4 changes: 3 additions & 1 deletion site/ThankYouPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export const ThankYouPage = (props: { baseUrl: string }) => (
baseUrl={props.baseUrl}
pageDesc="Thank you for supporting Our World in Data"
imageUrl={`${props.baseUrl}/thank-you-thumbnail.png`}
></Head>
>
<meta name="robots" content="noindex" />
</Head>
<body>
<SiteHeader baseUrl={props.baseUrl} />
<main className="thank-you-page">
Expand Down

0 comments on commit 326a3e2

Please sign in to comment.