Strict site build fails for a new guide until it is committed

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

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
1/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
85/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
markdown, python, yaml

Línea de trabajo

La advertencia proviene del bloque del plugin git-revision-date-localized en mkdocs.yml:48; lee primero esos ajustes, luego reproduce creando un docs/resources/TEST.md no rastreado, ejecutando python scripts/prepare-mkdocs.py y después mkdocs build --strict. Prueba enable_creation_date: false allí y confirma que la misma compilación ahora pasa, luego compara las fechas de una página renderizada con la salida actual para comprobar que nada excepto "Created" desaparece. Terminado cuando la página no rastreada compile en modo estricto y CI siga en verde.

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

Descripción

bug good first issue severity: low

Summary

mkdocs build --strict fails for a new page that has not been committed yet. CONTRIBUTING step 5 tells contributors to run this check before they commit (step 6), so anyone adding a guide hits a failure that has nothing to do with their content.

Where

  • mkdocs.yml:48 (git-revision-date-localized plugin settings)
  • CONTRIBUTING.md (step 5, "Verify locally", runs before step 6, "Commit and push")

Details

With a new, untracked docs/resources/<NEW>.md, the revision-date plugin logs:

WARNING - mkdocs_git_revision_date_localized_plugin: First revision timestamp is older than last revision timestamp for page resources/<NEW>.md. This can be due to a quirk in `git` follow behaviour.

--strict turns that warning into a failed build. Once the file is committed, the same build passes. The plugin is already set to strict: false and fallback_to_build_date: true, but this warning is still emitted.

Steps to reproduce

  1. Create docs/resources/TEST.md containing # Test and a line of text. Do not commit it.
  2. Run python scripts/prepare-mkdocs.py and then mkdocs build --strict.
  3. The build aborts on the warning above. Commit the file and run it again: it passes.

Suggested fix

Pick one:

  • Turn off creation dates (enable_creation_date: false). The warning comes from comparing the first and last revision timestamps, which only exist once a file has history.
  • Or add a note to CONTRIBUTING step 5: commit the new page locally before running mkdocs build --strict.

The first is a one-line change. Check that it does not change the dates shown on existing pages beyond removing "Created".

Acceptance criteria

  • A new, uncommitted guide builds with mkdocs build --strict, or CONTRIBUTING says to commit first.
  • CI still passes.

Getting started

  • Relevant files: mkdocs.yml, CONTRIBUTING.md
  • How to check: the steps to reproduce above.

Filed by repo-audit/fix-issues at 3d5ded3. Severity: low. Effort: S. audit-key: bug|mkdocs.yml|git-revision-date-localized

Lenguaje dominante
Python
Estrellas
2
Forks
5
Merge medio
2 d 17 h
PR fusionados (30 d)
6

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 TMHSDigital/Awesome-Ads

Todos los issues de TMHSDigital/Awesome-Ads

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.