social 卡圖只在 CI 產生(修正本機 Cairo 警告噪音)#45
Merged
Merged
Conversation
本機(多為 mac,缺 libcairo)build 時 social 外掛會噴上百個 cairosvg 警告,對志工的本機開發體驗很差。改用 Material 官方建議的 `enabled: !ENV [CI, false]`:GitHub Actions 會設 CI=true → 部署與 PR 建置照常產生卡圖;本機無 CI → 跳過,build 乾淨且更快。正式站行為不變。 驗證:本機 build 0 cairo 警告、卡圖跳過;CI=true 時卡圖重新啟用。 Signed-off-by: Toomore Chiang <toomore0929@gmail.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
先前標記的兩個「問題」,經查證正式環境其實都正常:
og:image為 200、部署 log 0 次 cairo 失敗(ubuntu runner 有 libcairo)唯一真實(較小)的問題是本機 build 體驗:在缺 Cairo 的環境(多為 mac)跑
mkdocs build/serve會噴 ~200 個 cairosvg 警告,對日後志工很不友善。修正
mkdocs.yml的 social 外掛改用 Material 官方建議:CI=true→ 部署與 PR 建置照常產生卡圖(行為不變)CI→ social 跳過 → build 乾淨、更快、不需安裝 Cairo驗證(本機)
mkdocs build(無 CI):exit 0、0 cairo 警告、卡圖跳過、license 圖正常、0 斷連結CI=true mkdocs build:cairo 警告重新出現 → 證明 CI 模式下卡圖仍會產生未改動
enable_git_follow: false會犧牲「檔案改名後仍保留原始建立日期」的準確性,為了一個本機 cosmetic 警告不值得,故保留現狀。🤖 Generated with Claude Code