Strict site build fails for a new guide until it is committed
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 85/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- markdown, python, yaml
- Bereich
- build-system, documentation
Rechercherichtung
Die Warnung kommt vom git-revision-date-localized-Plugin-Block bei mkdocs.yml:48; lies zuerst diese Einstellungen, reproduziere dann, indem du eine nicht verfolgte docs/resources/TEST.md erstellst, python scripts/prepare-mkdocs.py ausführst und dann mkdocs build --strict ausführst. Probiere dort enable_creation_date: false aus und bestätige, dass derselbe Build jetzt durchläuft, vergleiche dann die Daten einer gerenderten Seite mit der aktuellen Ausgabe, um zu prüfen, dass nichts außer "Created" verschwindet. Fertig, wenn die nicht verfolgte Seite strikt baut und CI weiterhin grün ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Python
- Sterne
- 2
- Forks
- 5
- Ø Merge
- 2 T. 17 Std.
- Gemergte PRs (30 T.)
- 6
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus TMHSDigital/Awesome-Ads
-
enhancement good first issue severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
TMHSDigital/Awesome-Ads#35 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation help wanted severity: low
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 72/100
TMHSDigital/Awesome-Ads#29 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
TMHSDigital/Awesome-Ads#16 ·
Maintainer antworten meist innerhalb von 1 Tag
-
dependencies help wanted severity: low
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 62/100
TMHSDigital/Awesome-Ads#27 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in TMHSDigital/Awesome-Ads
Ähnliche Issues
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
datamodel-code-generator/datamodel-code-generator#6906 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
UKGovernmentBEIS/optstop#12 ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
smokin-salmon/smoked-salmon#1095 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Sienna-Platform/SiennaSchemas#130 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
samuelcolvin/dirty-equals#146 ·