ZeroOne 繁體中文技術部落格

Astro Content Loader 怎麼用:用 glob() 建立可驗證的本機內容集合
Astro Content Loader 的 glob() 可從指定資料夾建立可驗證內容集合。本文說明 base、pattern、schema、ID 與 retainBody 的設定邊界,讓 Markdown 與資料檔在建置時被正確收錄。
613 字
|
3 分鐘
Cover Image of the Post
Cloudflare Workers 本機秘密怎麼放:.dev.vars、.env 與 secrets.required 的選擇
Cloudflare Workers 本機開發的秘密值該放在哪裡?本文整理 .dev.vars、.env 與 secrets.required 的載入邊界,說明環境檔優先順序與部署 secret 分工,避免 API 金鑰進入 Wrangler 設定檔。
642 字
|
3 分鐘
Cover Image of the Post
CSS Anchor Positioning 實作 tooltip:定位、fallback 與舊瀏覽器邊界
CSS Anchor Positioning 可讓 tooltip 相對按鈕定位,並在接近視窗邊緣時切換替代位置。本文示範 anchor-name、position-anchor 與 position-try,並保留舊瀏覽器的降級策略。
560 字
|
3 分鐘
Cover Image of the Post
Docker Compose 啟動順序怎麼等服務就緒:healthcheck 與 service_healthy
Docker Compose 的 depends_on 不代表資料庫已可連線。本文示範以 healthcheck 與 service_healthy 等待服務就緒,消除啟動競態並說明重啟與應用程式重試的分工。
492 字
|
2 分鐘
Cover Image of the Post
GitHub Actions concurrency 怎麼設:部署工作流避免互相取消的 queue 選擇
GitHub Actions concurrency 怎麼設定才不會取消重要部署?本文說明 group、cancel-in-progress 與 queue 的差異,協助你依 preview 或 production 的發布需求管理同組 workflow。
640 字
|
3 分鐘
Cover Image of the Post
Cloudflare Agents 的 McpAgent 要怎麼遷移?先分出 stateless 與 legacy 路徑
Cloudflare Agents SDK 0.20 將 McpAgent 標為 deprecated。遷移到 MCP SDK v2 前,先盤點 session、RPC 與 stream 依賴,再以 stateless handler 或雙路徑逐步切換。
1146 字
|
6 分鐘
Cover Image of the Post
content-visibility: auto 怎麼用:加上 contain-intrinsic-size 避免版面跳動
content-visibility: auto 可略過離開視窗內容的渲染工作,但沒設定預估尺寸會造成版面變動。本文說明何時適用、contain-intrinsic-size 寫法與可存取性檢查。
676 字
|
3 分鐘
Cover Image of the Post
CSS Scroll Snap 怎麼避開固定導覽列:scroll-padding 與 scroll-margin
CSS Scroll Snap 可讓輪播與章節捲動對齊,但固定 header 常遮住標題。本文用 scroll-snap-type、scroll-padding、scroll-margin 說明容器與目標元素各自要放什麼設定。
531 字
|
3 分鐘
Cover Image of the Post