Strict site build fails for a new guide until it is committed
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 1/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 85/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- markdown, python, yaml
研究方向
此警告來自 git-revision-date-localized 外掛區塊(位於 mkdocs.yml:48);先讀取那些設定,然後透過建立一個未追蹤的 docs/resources/TEST.md、執行 python scripts/prepare-mkdocs.py,再執行 mkdocs build --strict 來重現。在那裡嘗試 enable_creation_date: false,確認同一個建置現在可以通過,然後將轉譯頁面的日期與目前輸出比較,以檢查除了 "Created" 之外沒有其他東西消失。當未追蹤的頁面能在 strict 模式下建置且 CI 仍為綠色時即完成。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Python
- 星號
- 2
- 分支
- 5
- 平均合併
- 2 天 17 小時
- 30 天內合併 PR
- 6
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/Awesome-Ads 的其他 Issue
-
enhancement good first issue severity: low
難度 2/5 1-3 小時 新手友好度 75/100
TMHSDigital/Awesome-Ads#35 ·
維護者通常 1 天內回覆
-
documentation help wanted severity: low
難度 2/5 半天 新手友好度 72/100
TMHSDigital/Awesome-Ads#29 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 62/100
TMHSDigital/Awesome-Ads#16 ·
維護者通常 1 天內回覆
-
dependencies help wanted severity: low
難度 3/5 1-2 天 新手友好度 62/100
TMHSDigital/Awesome-Ads#27 · 1 則留言 ·
維護者通常 1 天內回覆
查看 TMHSDigital/Awesome-Ads 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
alltheplaces/alltheplaces#20570 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
area:ci bug
難度 2/5 1-3 小時 新手友好度 85/100
catincloud-labs/dagster-dex#206 · 1 則留言 ·
維護者通常 1 天內回覆
-
number_to_words raises ValueError with threshold= for ordinals ("12th") and comma-grouped strings ("1,000")可能已有人在做 @hemtilva 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
providers security
難度 2/5 1-3 小時 新手友好度 72/100
agentbreeder/agentbreeder#1031 ·
維護者通常 1 天內回覆