Preview checker: a long `og:title` or `og:description` gets no warning when the page also has a normal title and description
メンテナーはふだん 2 日以内に返信
@Imhamza86 がすでに取り組んでいます。
2026年12月4日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- backend
調査の方向性
src/lib/meta-analyzer.tsから始めて、既存のタイトルと説明文の長さチェックを読み、その後、関連するケースをtests/lib/meta-analyzer.test.tsで確認してください。通常の値と併せて長いOpen Graph値を扱うケースと、テキストが一致する場合と異なる場合のケースを追加してください。指定された警告とスコアの減点が網羅され、既存のフォールバック動作が維持され、記載されたチェックが通れば完了です。
索引モデルが issue の本文から書いたものです。
説明
analyzeMeta only checks the length of one title and one description: tags.title || tags.ogTitle and tags.description || tags.ogDescription (src/lib/meta-analyzer.ts lines 21 and 35). So when a page has a <title> and a meta description, the og:title and og:description never get measured, and those are the ones the social previews show.
I ran parseMetaTags and analyzeMeta on the current dev with a page where everything else is set:
everything normal → score 100 (A), no issues
og:title is 116 chars → score 100 (A), no issues
og:description is 418 chars → score 100 (A), no issues
<title> is 116 chars → score 95 (A), "Title is 116 chars (recommended: under 70)"
#333 made the title check fall back to og:title when there's no <title>. This is the other half: a page that has both.
What to do
- After the current title check, also check
og:titlewhen it's set and isn't the same text as the title that was just checked. Over 70 characters gives a warning on theog:titletag, likeog:title is 116 chars (recommended: under 70), and takes 5 points like the title does. - Do the same for
og:descriptionover 160 characters, as a warning on theog:descriptiontag that takes 3 points like the description does. - When there's no
<title>or no meta description, keep what happens now: the Open Graph value is the one that gets checked, once. - The "too short" description warning stays as it is, this one is only about values that are too long.
- The test
prefers the HTML title when both title sources are presentintests/lib/meta-analyzer.test.tsexpects no warning for exactly this case, so it has to change.
Acceptance criteria
- A 116 character
og:titlenext to a normal<title>gets theog:titlewarning and scores 95 - A 418 character
og:descriptionnext to a normal description gets theog:descriptionwarning and scores 97 - A long
<title>and a longog:titlewith different text get one warning each - The same long text in
<title>andog:titlegets one warning, not two - Pages without a
<title>or meta description come out exactly as before - A test that fails on the current code
-
npm run check,npm run testandnpm run buildpass
How to test
Run the new tests, then npm run dev, open /preview and check a page with a short <title> and a long og:title. The report should list the og:title warning.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off dev, and open your PR against dev with Closes #458 in the description.
- 主要言語
- TypeScript
- スター
- 8
- フォーク
- 4
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 34
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codercops/ogcops のほかの issue
-
Preview checker: a page that only has `og:image:url` is reported as having no image対応中かも @MugdhoAI が今日担当しました。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
codercops/ogcops#455 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug] “Copy Recommended Meta Tags” generates an unusable placeholder image URL再び着手できるかも @CreatorguyS が 34 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
codercops/ogcops#378 · コメント 4 件 ·
メンテナーはふだん 2 日以内に返信
-
good first issue templates
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
メンテナーはふだん 2 日以内に返信
-
good first issue templates
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
codercops/ogcops#341 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
codercops/ogcops の issue をすべて見る
似ている issue
-
clawsweeper:intake:bug clawsweeper:intake:needs-environment
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#212827 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
KT-2245 e2e specs that call the backend directly fall back to the developer's own Kronn on :3140オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Use one constant for the 10,000-character input limit対応中かも @NginxL が今日担当しました。 オープンgood first issue refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aniru-dh21/snap-validate#51 ·
メンテナーはふだん 1 日以内に返信
-
dependencies effort: small good first issue priority: low
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
TMHSDigital/screencast-mcp#509 ·
メンテナーはふだん 1 日以内に返信
-
from-review tech-debt testing
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
blamechris/chroxy#9520 ·
メンテナーはふだん 1 日以内に返信