fix(seo): define a bounded canonical URL strategy for NPM Stats
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- typescript
Línea de trabajo
Comienza con src/routes/stats/npm/index.tsx, especialmente con la validación de rutas y staticData.includeSearchInCanonical, y después sigue el comportamiento de las URL canónicas, los datos estructurados, los enlaces internos y el sitemap. Define el modelo acotado de URL semántica frente a presentación antes de implementarlo, y añade pruebas para las combinaciones predeterminadas, de paquete, de paquete con ámbito, de comparación, solo de UI y no válidas. Se considera terminado cuando solo se puedan indexar URL estables y significativas, y sus metadatos coincidan.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The clean /stats/npm URL currently redirects to a URL that serializes the complete default chart state. In a live audit, the resulting canonical URL was 2,355 characters long.
The route validates defaults for packageGroups, range, chart type, transforms, playback controls, legend state, dimensions, and other UI settings, then staticData.includeSearchInCanonical causes all of those values to become canonical. Each user interaction can therefore create another indexable URL.
Relevant route: src/routes/stats/npm/index.tsx
Google warns that parameter-driven faceted navigation can generate effectively infinite crawl spaces and slow discovery of useful pages: https://developers.google.com/crawling/docs/faceted-navigation
Goals
- Keep NPM Stats URLs shareable.
- Index only clean, stable pages with meaningful search intent.
- Prevent display and playback controls from creating indexable canonical variants.
Proposed direction
- Make /stats/npm a stable 200 URL with a clean self-canonical, or normalize to another intentionally short canonical URL.
- Omit default values from serialized search parameters.
- Separate semantic state from presentation state.
- Treat parameters such as range, transform, bin type, view mode, chart type, sorting, dimensions, playback, legend visibility, and similar controls as non-indexable UI state.
- Define a bounded format for package or package-comparison pages that should be indexable, potentially using stable path-based package identifiers rather than encoded JSON.
- Canonicalize or noindex non-semantic variants according to the chosen model.
- Ensure scoped package paths resolve correctly and have one canonical encoding.
- Make WebApplication JSON-LD url and any BreadcrumbList URLs match the selected canonical.
- Review FAQPage JSON-LD. Google does not normally show FAQ rich results for non-government and non-health sites, so retain it only if another consumer justifies the maintenance.
Acceptance criteria
- Loading /stats/npm does not redirect to a URL containing the full default chart configuration.
- The default canonical is short, stable, and self-referencing.
- Default values are omitted from generated links.
- Presentation-only variants do not self-canonicalize as independently indexable pages.
- Any intentionally indexable comparison page has unique SSR title, description, H1, canonical, and structured data based on the compared packages.
- Nonsensical or empty package combinations return an appropriate 404 or noindex response rather than another indexable state.
- Tests cover default state, one package, scoped packages, multi-package comparison, UI-only controls, and invalid combinations.
- Internal links and sitemap entries expose only the bounded set of indexable URLs.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.1k
- Forks
- 401
- Merge medio
- 18 h 44 min
- PR fusionados (30 d)
- 55
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/tanstack.com
-
source-audit
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
TanStack/tanstack.com#1195 ·
-
source-audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
TanStack/tanstack.com#1194 · 2 comentarios ·
-
source-audit
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TanStack/tanstack.com#1177 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
TanStack/tanstack.com#1059 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
TanStack/tanstack.com#1047 ·
Todos los issues de TanStack/tanstack.com
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
0xMiden/bridge-portal#132 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
area:tools bug good first issue help wanted priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
newrelic-experimental/preflight#793 · 1 comentario ·