Strict site build fails for a new guide until it is committed
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
- Área
- build-system, documentation
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
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-localizedplugin 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
- Create
docs/resources/TEST.mdcontaining# Testand a line of text. Do not commit it. - Run
python scripts/prepare-mkdocs.pyand thenmkdocs build --strict. - 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
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 TMHSDigital/Awesome-Ads
-
enhancement good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
TMHSDigital/Awesome-Ads#35 ·
Los mantenedores suelen responder en 1 día
-
documentation help wanted severity: low
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
TMHSDigital/Awesome-Ads#29 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
TMHSDigital/Awesome-Ads#16 ·
Los mantenedores suelen responder en 1 día
-
dependencies help wanted severity: low
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
TMHSDigital/Awesome-Ads#27 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de TMHSDigital/Awesome-Ads
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
datamodel-code-generator/datamodel-code-generator#6906 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
UKGovernmentBEIS/optstop#12 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
smokin-salmon/smoked-salmon#1095 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Sienna-Platform/SiennaSchemas#130 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
samuelcolvin/dirty-equals#146 ·