Conversation
- Configurar use_directory_urls: true en mkdocs.yml - Permite que URLs como /meetups/ funcionen correctamente - Mantiene compatibilidad con estructura de directorios de MkDocs
- Agregar CloudFront Function url_rewrite para manejar URLs sin .html - Función redirige /meetups/ a /meetups/index.html automáticamente - Asociar función con todos los cache behaviors para consistencia - Soluciona problema de enlaces que no funcionan en producción
- Documentar problema de URLs que no funcionan en producción - Explicar solución implementada con CloudFront Function - Incluir pasos de despliegue y verificación - Agregar notas técnicas sobre funcionamiento de la solución
- Agregar función url_rewrite a todos los cache behaviors de staging - Reutilizar la misma CloudFront Function global para consistencia - Soluciona problema de URLs sin extensión en staging.pythoncdmx.org - Mantiene configuración de cache más agresiva para staging
- Agregar información sobre configuración de staging - Incluir URLs de verificación para ambos ambientes - Documentar que la misma CloudFront Function se reutiliza
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Descripción
Soluciona el problema #41 donde URLs como
https://pythoncdmx.org/meetups/no funcionan en producción ni staging, perohttps://pythoncdmx.org/meetups/index.htmlsí funciona. El problema afecta tanto al ambiente de producción como al de staging.🏷️ Tipo de Cambio
🔧 Cambios Realizados
use_directory_urls: truepara configuración correcta de URLsurl_rewritepara manejar URLs sin extensión✅ Checklist de Verificación
mkdocs serve)🔧 Cómo Funciona la Solución
CloudFront Function
La función intercepta las requests y:
/, agregaindex.html(ej:/meetups/→/meetups/index.html).html(ej:/about→/about.html)Ambientes Afectados
https://pythoncdmx.org/meetups/https://staging.pythoncdmx.org/meetups/📸 Capturas de Pantalla (si aplica)
Antes
https://pythoncdmx.org/meetups/→ Error 404https://staging.pythoncdmx.org/meetups/→ Error 404Después
https://pythoncdmx.org/meetups/→ Funciona correctamentehttps://staging.pythoncdmx.org/meetups/→ Funciona correctamente🔗 Issues Relacionados
Fixes el problema reportado de URLs sin extensión en producción y staging
📋 Notas Adicionales
Despliegue Requerido
IMPORTANTE: Este fix requiere aplicar cambios de Terraform antes del despliegue:
cd terraform terraform plan terraform applyCommits Incluidos
fix(config): agregar use_directory_urls para manejar URLs sin extensiónfeat(infra): implementar CloudFront Function para URLs sin extensióndocs: agregar documentación para fix de URLs sin extensiónfeat(infra): aplicar CloudFront Function a staging environmentdocs: actualizar documentación con soporte para stagingVerificación Post-Despliegue
Después del despliegue, verificar que funcionen:
https://pythoncdmx.org/meetups/https://staging.pythoncdmx.org/meetups/https://pythoncdmx.org/about/https://staging.pythoncdmx.org/about/Notas Técnicas