Strict site build fails for a new guide until it is committed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown, python, yaml
- Domain
- build-system, documentation
Research direction
The warning comes from the git-revision-date-localized plugin block at mkdocs.yml:48; read those settings first, then reproduce by creating an untracked docs/resources/TEST.md, running python scripts/prepare-mkdocs.py, then mkdocs build --strict. Try enable_creation_date: false there and confirm the same build now passes, then compare a rendered page's dates against the current output to check nothing but "Created" disappears. Done when the untracked page builds strictly and CI is still green.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 2
- Forks
- 5
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TMHSDigital/Awesome-Ads
-
enhancement good first issue severity: low
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TMHSDigital/Awesome-Ads#35 ·
Maintainers usually reply within 1 day
-
documentation help wanted severity: low
Difficulty 2/5 Half a day Newbie friendliness 72/100
TMHSDigital/Awesome-Ads#29 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
TMHSDigital/Awesome-Ads#16 ·
Maintainers usually reply within 1 day
-
dependencies help wanted severity: low
Difficulty 3/5 1-2 days Newbie friendliness 62/100
TMHSDigital/Awesome-Ads#27 · 1 comment ·
Maintainers usually reply within 1 day
All issues in TMHSDigital/Awesome-Ads
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
datamodel-code-generator/datamodel-code-generator#6906 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
UKGovernmentBEIS/optstop#12 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
smokin-salmon/smoked-salmon#1095 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Sienna-Platform/SiennaSchemas#130 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
samuelcolvin/dirty-equals#146 ·