fix(content): remove pt-only posts from en blog collection #159

Merged
ellamizuki merged 1 commit from fix/remove-pt-posts-from-en-collection into main 2026-09-09 02:58:35 +00:00
ellamizuki commented 2026-09-09 02:54:22 +00:00 (Migrated from github.com)

Summary

Fixes the locale bug in the EN blog collection that leaked into the EN RSS feed and sitemap.

Evidence / Reproduction

https://yuricunha.com/rss.xml (the EN feed) listed posts with Portuguese titles and bodies:

  • Coisas que eu gostaria que tivessem me dito quando entrei na faculdade de TI.
  • Conselhos que eu gostaria de ter ouvido quando comecei na tecnologia.

Both files existed identically in content/blog/en/ and content/blog/pt/ (verified with diff: identical bodies, PT titles in the EN copies). The EN feed served 38 items including these two PT posts, and the sitemap advertised the /blog/<slug> EN URLs with hreflang="en" for content that is entirely pt-BR.

Root cause

The two posts are pt-BR originals but were also committed into the en/ content collection, duplicating their pt/ copies byte-for-byte. Every locale feed and page generator trusts the collection per-directory, so the EN surface (feed + sitemap + blog index) inherited the PT content.

Fix

Remove the two duplicated files from content/blog/en/. The correct pt-BR originals remain in content/blog/pt/.

Tests / Validation

pnpm test:unit  # 66 files, 283 tests passed (sitemap, seo and RSS suites included)
pnpm build      # 8 tasks successful

Live-verified against a local next start of this branch:

  • /rss.xml now serves 36 items with zero Portuguese titles (was 38 with 2 PT posts)
  • /blog/conselhos-que-eu-gostaria-de-ter-ouvido-quando-comecei-na-tecnologia now correctly 404s (the content was never English)
  • /pt/blog/conselhos-que-eu-gostaria-de-ter-ouvido-quando-comecei-na-tecnologia still serves 200 with the pt-BR content

Residual risks

  • Any external link pointing to the removed EN URLs (/blog/coisas-que-eu-gostaria..., /blog/conselhos-que-eu-gostaria...) will now 404. Both slugs remain reachable under /pt/blog/.... The content was never available in English, so no reader loses a legitimate EN article.
## Summary Fixes the locale bug in the EN blog collection that leaked into the EN RSS feed and sitemap. ## Evidence / Reproduction `https://yuricunha.com/rss.xml` (the EN feed) listed posts with Portuguese titles and bodies: - `Coisas que eu gostaria que tivessem me dito quando entrei na faculdade de TI.` - `Conselhos que eu gostaria de ter ouvido quando comecei na tecnologia.` Both files existed **identically** in `content/blog/en/` and `content/blog/pt/` (verified with `diff`: identical bodies, PT titles in the EN copies). The EN feed served 38 items including these two PT posts, and the sitemap advertised the `/blog/<slug>` EN URLs with `hreflang="en"` for content that is entirely pt-BR. ## Root cause The two posts are pt-BR originals but were also committed into the `en/` content collection, duplicating their `pt/` copies byte-for-byte. Every locale feed and page generator trusts the collection per-directory, so the EN surface (feed + sitemap + blog index) inherited the PT content. ## Fix Remove the two duplicated files from `content/blog/en/`. The correct pt-BR originals remain in `content/blog/pt/`. ## Tests / Validation ``` pnpm test:unit # 66 files, 283 tests passed (sitemap, seo and RSS suites included) pnpm build # 8 tasks successful ``` Live-verified against a local `next start` of this branch: - `/rss.xml` now serves 36 items with zero Portuguese titles (was 38 with 2 PT posts) - `/blog/conselhos-que-eu-gostaria-de-ter-ouvido-quando-comecei-na-tecnologia` now correctly 404s (the content was never English) - `/pt/blog/conselhos-que-eu-gostaria-de-ter-ouvido-quando-comecei-na-tecnologia` still serves 200 with the pt-BR content ## Residual risks - Any external link pointing to the removed EN URLs (`/blog/coisas-que-eu-gostaria...`, `/blog/conselhos-que-eu-gostaria...`) will now 404. Both slugs remain reachable under `/pt/blog/...`. The content was never available in English, so no reader loses a legitimate EN article.
isyuricunha (Migrated from github.com) reviewed 2026-09-09 02:54:22 +00:00
vercel[bot] commented 2026-09-09 02:54:25 +00:00 (Migrated from github.com)

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
website-web Ready Ready Preview Sep 9, 2026 2:57am UTC
1 Skipped Deployment
Project Deployment Actions Updated
website-docs Ignored Ignored Preview Sep 9, 2026 2:57am UTC
[vc]: #Aita7ViBn971sqJzkoVjZeroFWSFRKfbBCuNZWyz9a4=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJ3ZWJzaXRlLWRvY3MiLCJwcm9qZWN0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YXBwIn19XX0= The latest updates on your projects. Learn more about [Vercel for GitHub](https://vercel.link/github-learn-more). | Project | Deployment | Actions | Updated | | :--- | :----- | :------ | :------ | | <a href="https://vercel.com/yuri-cunhas-projects/website-web"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_b6rFhAAPHIXR73ceodE0yvlBw382&teamId=team_g087rqPZJa9s4DWPeZtQhxa9&s=32" width="16" height="16" align="middle" alt="" /></sup></a> [website-web](https://vercel.com/yuri-cunhas-projects/website-web) | ![Ready](https://vercel.com/static/status/ready.svg) [Ready](https://vercel.com/yuri-cunhas-projects/website-web/B1iExP56VxhQSbKShMkcYAiUXkzo) | [Preview](https://website-web-git-fix-remove-pt-posts-c9157b-yuri-cunhas-projects.vercel.app) | <relative-time datetime="2026-09-09T02:57:48.004Z">Sep 9, 2026 2:57am UTC</relative-time> | <details><summary>1 Skipped Deployment</summary> | Project | Deployment | Actions | Updated | | :--- | :----- | :------ | :------ | | <a href="https://vercel.com/yuri-cunhas-projects/website-docs"><sup><img src="https://vercel.com/api/www/avatar?projectId=prj_2eU2sTM0idY70rTbscCCtEt6MFOw&teamId=team_g087rqPZJa9s4DWPeZtQhxa9&s=32" width="16" height="16" align="middle" alt="" /></sup></a> [website-docs](https://vercel.com/yuri-cunhas-projects/website-docs) | ![Ignored](https://vercel.com/static/status/canceled.svg) [Ignored](https://vercel.com/yuri-cunhas-projects/website-docs/5cVASKwXYYhDMC6seYDDTHdPgMoY) | [Preview](https://website-docs-git-fix-remove-pt-post-27896e-yuri-cunhas-projects.vercel.app) | <relative-time datetime="2026-09-09T02:57:48.004Z">Sep 9, 2026 2:57am UTC</relative-time> | </details>
Sign in to join this conversation.
No description provided.