[錯誤 Bug] travel-ai-briefing 三語輸出兩組 og/twitter 標籤,分享圖片不一致
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- markdown, python, yaml
- Domain
- build-system, documentation
Research direction
Start with the front matter of the three travel-ai-briefing.md files and the og/social settings in docs/layouts/anoni.yml, comparing them with a games/ page that has social: cards: false. Confirm that the duplicate og:image and twitter:image tags come from overrides/main.html plus the social plugin. The maintainer has not yet chosen between option A (add social.cards: false, fix the docs, optionally add a lint rule in docs_style_lint.py) and option B (have the plugin skip empty tags), so ask before editing. Done means a SOCIAL_CARDS=true build shows one set of og/twitter tags on those pages.
Written by the indexing model from the issue text.
Description
哪一頁 / Where
三語的 blog/posts/travel-ai-briefing.md:
- https://anoni.net/docs/blog/2026/06/travel-ai-briefing/
- https://anoni.net/docs/zh-cn/blog/2026/06/travel-ai-briefing/
- https://anoni.net/docs/en/blog/2026/06/travel-ai-briefing/
問題描述 / What's wrong
#660 比對時發現、review 時確認可重現。這三頁輸出了兩組 og/twitter 標籤:overrides/main.html 依 og.enabled 輸出一組,social 外掛依 layouts/anoni.yml 的 tags 又插一組。標題、描述重複之外,兩組的圖片不一樣,正式站 en 版:
<!-- 第 18–21 行,main.html(og.enabled 指定的封面) -->
<meta property="og:image" content="https://assets.anoni.net/blog/travel-ai-briefing.png" />
<meta property="og:image:width" content="1536" />
<meta property="og:image:height" content="1024" />
<!-- 第 282–285 行,social 外掛自動產生的卡片 -->
<meta property="og:image" content="https://anoni.net/docs/en/assets/images/social/blog/2026/06/travel-ai-briefing.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
twitter:image 也是兩張。各平台遇到重複標籤怎麼選不一定,指定的封面不保證會被採用,外掛也多產了一張用不到的卡片。
同樣設了 og.enabled 的 games/ 4 頁只有一組,差別在它們的 front matter 多了:
social:
cards: false
三語 15 個設了 og.enabled 的頁面裡,12 個 games/ 頁都有這兩行,3 個 travel-ai-briefing 都沒有。
但兩處說明都寫成只要設 og.enabled 就會自動跳過:
docs/layouts/anoni.yml第 201–202 行:「front matter 寫了 og.enabled 的頁面由 overrides/main.html 自己出標籤,那些頁面會跳過這一段。」- 三語
community/visual-guide.md第 134 行:「front matter 填og.enabled: true與og.image,文件站的模板會改用指定的圖片,並跳過自動產生的那一張。」
實際上跳過靠的是 social.cards: false,照說明只寫 og.enabled 就會重複。
建議修正 / Suggested fix
兩個方向,想請維護者決定:
A. 補設定、改說明(改動小)
- 三語
travel-ai-briefing.md的 front matter 補social: cards: false。 layouts/anoni.yml的註解與三語visual-guide.md改成「要同時寫og.enabled與social.cards: false」。- 選擇性:
docs_style_lint.py加一條,og.enabled: true卻沒有social.cards: false時報錯,之後的新頁面不會再漏。
B. 讓說明變成真的(自動跳過)
- social 外掛只輸出值不是空字串的標籤(
plugin.py的if content)。layouts/anoni.yml的tags每一項在page.meta.og.enabled時回傳空字串,這些頁面就不會有第二組。 - 不用動文章,說明也不必改。代價是
tags的每一項都要包一層判斷,外掛仍會產卡片圖(用不到但無害)。
我傾向 A 加 lint 規則:跟 games/ 現有的寫法一致,規則也看得見。改的時候會用 SOCIAL_CARDS=true 三語建置,確認這三頁只剩一組標籤,其他頁的 og/twitter 標籤不變。
- Dominant language
- JavaScript
- Stars
- 52
- Forks
- 7
- Avg merge
- 1h 35m
- Merged PRs (30d)
- 63
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 anoni-net/docs
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
新讀者走讀回報,照著一篇文章實際操作Opendocumentation good first issue help wanted
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
文件站補示意圖:優先頁面清單Opendocumentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anoni-net/docs#83 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/cozy-client#1777 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
[guide] AGENTS.md claims the coverage gate, e2e and full lint run on every PR after ADR 0011 focused validationPossibly taken @hivecommons-hive claimed this today. Openagent/guide documentation hive/claimed-by-guide stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
cncf/endusers#2006 · 1 comment ·
Maintainers usually reply within 1 day
-
check:passed feeds:add
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 4 days
-
CMS video element: "CmsVideoPlugin" sets `volume = 0`, so videos cannot be unmuted on Android ChromeOpenneeds-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
all-contributors/cli#587 ·
Maintainers usually reply within 1 day