Strict site build fails for a new guide until it is committed
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 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時間
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
datamodel-code-generator/datamodel-code-generator#6906 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
UKGovernmentBEIS/optstop#12 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
smokin-salmon/smoked-salmon#1095 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Sienna-Platform/SiennaSchemas#130 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
samuelcolvin/dirty-equals#146 ·