Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Docs version switcher links resolve incorrectly on GitHub Pages

Abierto Apto para principiantes
#73 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Comienza en scripts/generate_switcher.py, en las líneas 278 y 290, y revisa después docs/source/conf.py:70 y el switcher.json publicado. Reproduce la navegación del version-switcher en GitHub Pages y verifica que las entradas generadas y json_url usen URLs estables relativas a la raíz del sitio. Se considera terminado cuando seleccionar una versión lleva a la página correspondiente o a la página de inicio de esa versión.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Summary

The docs version switcher on GitHub Pages is generating/using the wrong links.

Direct version URLs work, for example:

  • https://autodesk.github.io/moldflow-api/v26.0.5/
  • https://autodesk.github.io/moldflow-api/latest/

But using the version switcher UI takes you to the wrong location instead of the corresponding page in the selected version.

Current behavior

The published switcher data at:

  • https://autodesk.github.io/moldflow-api/latest/_static/switcher.json

currently contains entries like:

{
  "version": "v26.0.5",
  "url": "../v26.0.5/"
}

Those relative URLs appear to be the root cause of the bad navigation in the switcher UI on GitHub Pages.

Expected behavior

Selecting a version from the switcher should take the user to the same doc page in the selected version when it exists, or fall back to that version's homepage.

For GitHub Pages, the switcher entries should point at the correct version root for the site, e.g.:

  • https://autodesk.github.io/moldflow-api/v26.0.5/
  • https://autodesk.github.io/moldflow-api/v27.0.0/

rather than relative paths like ../v26.0.5/.

Local code context

The current local checkout shows the switcher URLs are generated here:

  • scripts/generate_switcher.py

Specifically:

  • scripts/generate_switcher.py:278 -> "url": f"../{json_version}/"
  • scripts/generate_switcher.py:290 -> "url": f"../{tag}/"

There is also related switcher config here:

  • docs/source/conf.py:70 -> "json_url": "_static/switcher.json"

PyData Sphinx Theme's docs say switcher['json_url'] should be a stable, fully resolved URL, so that may also be worth reviewing as part of the fix.

Repro

  1. Open the published docs on GitHub Pages.
  2. Use the version switcher from the UI.
  3. Notice the selected version link does not resolve to the correct docs location.
  4. Compare that with opening the direct version URL manually, which works.

Likely fix

Generate version switcher entries using the GitHub Pages site root (or another stable absolute docs base URL) instead of relative ../<version>/ paths, and verify json_url is also configured as a stable absolute URL.

Lenguaje dominante
Python
Estrellas
13
Forks
2
Merge medio
49 min
PR fusionados (30 d)
2

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Autodesk/moldflow-api

Todos los issues de Autodesk/moldflow-api

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.