Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude thank-you page from indexing #4587

Merged
merged 1 commit into from
Feb 23, 2025
Merged

Conversation

rakyi
Copy link
Contributor

@rakyi rakyi commented Feb 21, 2025

Fixes #4543

I didn't find additional pages that should be excluded.

@rakyi rakyi requested a review from mlbrgl February 21, 2025 14:42
@@ -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"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine to hard-code it here, we don't need it to be configurable. We use this function both for sitemap and for indexing posts in Algolia.

@owidbot
Copy link
Contributor

owidbot commented Feb 21, 2025

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-exclude-thank-you-from-index

SVG tester:

Number of differences (default views): 0 ✅
Number of differences (all views): 0 ✅

Edited: 2025-02-21 14:58:23 UTC
Execution time: 1.22 seconds

@rakyi rakyi merged commit 326a3e2 into master Feb 23, 2025
36 checks passed
@rakyi rakyi deleted the exclude-thank-you-from-indexing branch February 23, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "Thank you" page is indexed in search
3 participants