Sitemap gives 1,003 generated reference pages a lastmod of 0001-01-01
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- hugo
調査の方向性
まず layouts/sitemap.xml から始め、次に content/reference/cli/_content.gotmpl によって生成されるページと Hugo の GitInfo の動作を調べます。テンプレートを変更する前に、生成された sitemap.xml を実行するか確認します。完了とは、生成されたリファレンスページが <lastmod> を 0001-01-01 として公開しなくなり、有効な日付はそのまま維持されることです。この課題には以前のクローズされた pull request と代替案が言及されているため、アプローチをメンテナーと確認してください。
索引モデルが issue の本文から書いたものです。
説明
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
There's a problem with the website
Description
The sitemap gives 1,003 of its 2,204 entries a <lastmod> of 0001-01-01. For example, docker container run:
<loc>https://docs.docker.com/reference/cli/docker/container/run/</loc>
<lastmod>0001-01-01</lastmod>
Every affected page is a generated reference page: the docker and sbx CLI references, and the Sandboxes, Hub, DVP, AI Governance and Registry API references. Anything that reads the sitemap takes that date at face value, so these pages look like they never change.
As far as I can tell, the cause is that these pages are built by Hugo content adapters such as content/reference/cli/_content.gotmpl, so they have no file in git. With enableGitInfo: true, Hugo takes Lastmod from git, so for these pages it stays at Go's zero time, and layouts/sitemap.xml prints it as is.
Location
https://docs.docker.com/sitemap.xml
Suggestion
One fix is to leave <lastmod> out when the date is zero, which is what Hugo's embedded sitemap template does. The element is optional in the sitemap protocol.
I opened #26365 with that change before filing an issue, which in hindsight was the wrong order. It's closed, and I'm filing this so the problem is tracked either way. I'm happy to rework it if you'd prefer a different approach, such as having the content adapters set a date, or to leave the fix to you.
- 主要言語
- Markdown
- スター
- 4.7k
- フォーク
- 8.5k
- 平均マージ
- 2日 7時間
- マージ済み PR(30日)
- 133
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/docs のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
status/triage
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 半日 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
status/triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
process
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
pyrite-wiki/pyrite#1036 ·
メンテナーはふだん 1 日以内に返信
-
LIMITATIONS says other-UTM-zone contributions are dropped; the builder reprojects and merges themオープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nikhilsrajan/fsd#197 ·
-
area/cli good first issue size/S type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
lorica-labs/volant#549 ·
メンテナーはふだん 1 日以内に返信
-
Translate the "Start here" block of README.ru.md into Russian対応中かも @slopggobblercobbler81 が今日担当しました。 オープンaccepted documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100