Skip to content

Fix duplicate category labels serving the wrong description - #71

Merged
noel merged 1 commit into
mainfrom
fix/snowflake-category-slugs
Nov 9, 2026
Merged

noel merged 1 commit into
mainfrom
fix/snowflake-category-slugs

Conversation

@ssassi

@ssassi ssassi commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Google Search Console reports "Duplicate, Google chose different canonical than user" for docs/category/snowflake-1, and the live site shows why:

Docusaurus looks up a generated-index category page's title and description by the category label (plugin-content-docs/lib/translations.js). Three pairs of categories share a label, so both pages in each pair render the same blurb, and the second one gets a -1 slug:

Label Pages Description both pages showed
Airflow how-tos /category/airflow + reference /category/airflow-1 reference text
Datacoves how-tos /category/datacoves + reference /category/datacoves-1 reference text
Snowflake best-practices /category/snowflake + how-tos /category/snowflake-1 best-practices text

The Snowflake navbar links were also crossed as a result: How-tos → Snowflake opened the best-practices page.

Fix

  • The reference and best-practices categories get distinct sidebar labels: Airflow reference, Datacoves reference, Snowflake best practices. Navbar labels are unchanged.
  • All six categories get an explicit link.slug. How-tos keep the plain slugs (/category/airflow, /category/datacoves, /category/snowflake). The others become -reference and -best-practices.
  • The navbar points at the new slugs.
  • The how-tos Snowflake title is capitalised (snowflake → Snowflake).

Docusaurus 3.8.1 rejects a key field in _category_.yaml, so distinct labels are the only fix that doesn't need a framework upgrade.

URL changes

/category/airflow-1, /category/datacoves-1 and /category/snowflake-1 now 404. Google will drop them, and they were flagged as duplicates anyway. /category/snowflake now serves the how-tos page instead of best practices. No redirects were added, because @docusaurus/plugin-client-redirects isn't installed.

Verification

npm run build passes. Each of the six built pages renders its own description and links only to its own section's docs (35/27/32/15/12/16 links).

🤖 Generated with Claude Code

Docusaurus keys a generated-index page's title/description by category
label, so the how-tos Airflow, Datacoves and Snowflake pages rendered the
reference / best-practices blurb, and the second of each pair got a "-1"
slug (airflow-1, datacoves-1, snowflake-1). Google flagged the pairs as
duplicate pages.

Give the reference and best-practices categories distinct labels, pin
explicit slugs on all six, and point the navbar at the new slugs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ssassi ssassi self-assigned this Nov 9, 2026
@noel
noel merged commit 0517ef5 into main Nov 9, 2026
2 checks passed
@noel
noel deleted the fix/snowflake-category-slugs branch November 9, 2026 18:41
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.

2 participants