<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Commentary of Takao</title><link>https://takao.blog/zh/</link><description>Recent content on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>zh</language><copyright>Commentary of Takao</copyright><lastBuildDate>Thu, 16 Jul 2026 11:16:06 +0900</lastBuildDate><atom:link href="https://takao.blog/zh/index.xml" rel="self" type="application/rss+xml"/><item><title>2026 年 Web 性能监控工具比较</title><link>https://takao.blog/zh/web/web-performance-monitoring-tools-2026/</link><pubDate>Wed, 08 Jul 2026 10:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-performance-monitoring-tools-2026/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-performance-monitoring-tools-2026-zh.png" alt="Featured image of post 2026 年 Web 性能监控工具比较" /&gt;&lt;h2 id="为什么灯塔还不够"&gt;为什么灯塔还不够
&lt;/h2&gt;&lt;p&gt;Lighthouse 是一个优秀的诊断工具，但它只测量实验室数据，而不是真实的用户体验。 2026 年的标准实践将实验室测量与真实用户监控 (RUM) 相结合。&lt;/p&gt;
&lt;h2 id="1-web-vitals--chrome-ux-报告和-crux-api"&gt;1. Web Vitals — Chrome UX 报告和 CrUX API
&lt;/h2&gt;&lt;p&gt;Google 的 Chrome 用户体验报告汇总了来自真实 Chrome 用户的现场数据。您可以通过 API 查询它来分析您自己和竞争对手的网站。&lt;/p&gt;</description></item><item><title>React 19 新功能：开发人员需要了解的内容</title><link>https://takao.blog/zh/web/react-19-new-features/</link><pubDate>Wed, 08 Jul 2026 10:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-19-new-features/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-19-new-features-zh.png" alt="Featured image of post React 19 新功能：开发人员需要了解的内容" /&gt;&lt;h2 id="react-19-发生了什么变化"&gt;React 19 发生了什么变化
&lt;/h2&gt;&lt;p&gt;React 19 不是一个小更新，而是一个范式转变。稳定的服务器组件、新的钩子和 React 编译器从根本上改变了开发人员编写应用程序的方式。&lt;/p&gt;
&lt;h2 id="稳定的服务器组件"&gt;稳定的服务器组件
&lt;/h2&gt;&lt;p&gt;React 服务器组件 (RSC) 现已投入生产。通过在服务器上渲染并将 HTML 发送到客户端，它们可以显着减小包的大小。&lt;/p&gt;</description></item><item><title>AI智能体代码库重构的未来</title><link>https://takao.blog/zh/web/ai-agents-codebase-refactoring-future/</link><pubDate>Sun, 05 Jul 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/ai-agents-codebase-refactoring-future/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/ai-agents-codebase-refactoring-future-zh.png" alt="Featured image of post AI智能体代码库重构的未来" /&gt;&lt;h2 id="the-rise-of-ai-assisted-refactoring"&gt;The Rise of AI-Assisted Refactoring
&lt;/h2&gt;&lt;p&gt;Refactoring large codebases has traditionally been one of the most expensive and risk-prone activities in software engineering. Autonomous AI agents are now changing this landscape, offering the ability to reason about code structure, generate transformations, and validate correctness at a scale previously impossible.&lt;/p&gt;
&lt;h2 id="automated-code-cleanup"&gt;Automated Code Cleanup
&lt;/h2&gt;&lt;p&gt;AI agents excel at mechanical refactoring tasks. Dead code elimination, unused import removal, and consistent formatting can be handled by agents that parse the entire AST of a project. Tools like &lt;strong&gt;Codema&lt;/strong&gt; and &lt;strong&gt;OpenAI Codex CLI&lt;/strong&gt; already demonstrate how agents can identify deprecated patterns and suggest modern equivalents.&lt;/p&gt;</description></item><item><title>通过自定义 Git 配置别名使开发速度加倍</title><link>https://takao.blog/zh/web/git-alias-setup-productivity/</link><pubDate>Sat, 20 Jun 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-alias-setup-productivity/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-alias-setup-productivity-zh.png" alt="Featured image of post 通过自定义 Git 配置别名使开发速度加倍" /&gt;&lt;p&gt;您每天在终端中输入多少次诸如 &lt;code&gt;git status&lt;/code&gt;、&lt;code&gt;git checkout&lt;/code&gt; 或 &lt;code&gt;git commit&lt;/code&gt; 之类的命令？对于活跃的开发人员来说，答案很容易是数十或数百。重复输入这些完整命令会浪费击键次数、增加打字错误并减慢您的开发动力。&lt;/p&gt;</description></item><item><title>通过 CSS 包含属性隔离布局计算</title><link>https://takao.blog/zh/web/performance-css-contain-property/</link><pubDate>Mon, 15 Jun 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/performance-css-contain-property/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/performance-css-contain-property-zh.png" alt="Featured image of post 通过 CSS 包含属性隔离布局计算" /&gt;&lt;h2 id="动态内容的渲染成本"&gt;动态内容的渲染成本
&lt;/h2&gt;&lt;p&gt;每次 DOM 更改时，浏览器都必须重新计算样式、布局和绘制。对于具有许多交互式小部件（聊天提要、股票行情、无限滚动列表）的页面，这些重新计算可能会波及整个文档，导致卡顿和丢帧。&lt;/p&gt;</description></item><item><title>使用 TypeScript 的 NoInfer 实用程序进行严格类型保护</title><link>https://takao.blog/zh/web/typescript-unmapped-types-utility/</link><pubDate>Wed, 10 Jun 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-unmapped-types-utility/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-unmapped-types-utility-zh.png" alt="Featured image of post 使用 TypeScript 的 NoInfer 实用程序进行严格类型保护" /&gt;&lt;h2 id="日益扩大的问题"&gt;日益扩大的问题
&lt;/h2&gt;&lt;p&gt;当 TypeScript 从多个调用点参数推断类型时，它通常会&lt;strong&gt;加宽&lt;/strong&gt;推断的类型以适应所有候选类型。这通常很有用，但在某些通用场景中，它会生成过于松散的类型，从而让无效状态溜走。&lt;/p&gt;</description></item><item><title>2026 年 OWASP ZAP：高级扫描和 CI/CD 集成</title><link>https://takao.blog/zh/web/owasp-zap-advanced-2026/</link><pubDate>Tue, 09 Jun 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/owasp-zap-advanced-2026/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/owasp-zap-advanced-2026-zh.png" alt="Featured image of post 2026 年 OWASP ZAP：高级扫描和 CI/CD 集成" /&gt;&lt;h2 id="超越基本扫描"&gt;超越基本扫描
&lt;/h2&gt;&lt;p&gt;OWASP ZAP 自早期以来已经发生了显着的发展。到 2026 年，它不再只是一个点击式代理扫描器，而是一个功能齐全的安全自动化平台，具有强大的 API、可编写脚本的自动化框架和深度 CI/CD 集成。如果您首先需要基础知识，请阅读我们的 &lt;a class="link" href="https://takao.blog/web/how-to-owasp-zap/" &gt;OWASP ZAP 安装和设置指南&lt;/a&gt;。本文介绍了大规模运行安全测试的团队的高级工作流程。&lt;/p&gt;</description></item><item><title>为 Hugo 博客设计现代内容安全策略</title><link>https://takao.blog/zh/web/hugo-latest-csp-best-practices-2026/</link><pubDate>Fri, 05 Jun 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/hugo-latest-csp-best-practices-2026/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/hugo-latest-csp-best-practices-2026-zh.png" alt="Featured image of post 为 Hugo 博客设计现代内容安全策略" /&gt;&lt;h2 id="为什么-csp-对于静态站点很重要"&gt;为什么 CSP 对于静态站点很重要
&lt;/h2&gt;&lt;p&gt;使用 Hugo 构建的静态站点本质上比动态应用程序更安全，但它们仍然执行用于分析、广告和嵌入的第三方脚本。 &lt;strong&gt;内容安全策略 (CSP)&lt;/strong&gt; 通过控制可以加载的资源来保护您的访问者免受 XSS、数据注入和恶意脚本执行的侵害。&lt;/p&gt;</description></item><item><title>星露谷物语作物收益</title><link>https://takao.blog/zh/game/stardew-valley-crop-profit/</link><pubDate>Mon, 01 Jun 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/stardew-valley-crop-profit/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/stardew-valley-crop-profit-zh.png" alt="Featured image of post 星露谷物语作物收益" /&gt;&lt;h1 id="stardew-valleyの収益効率を上げる作物選び"&gt;Stardew Valleyの収益効率を上げる作物選び
&lt;/h1&gt;&lt;p&gt;Farming is the backbone of your income in Stardew Valley. But not all crops are created equal. Choosing the right crops for each season and applying smart strategies can multiply your earnings significantly. This guide covers the most profitable crops and how to maximize your farm&amp;rsquo;s output.&lt;/p&gt;
&lt;h2 id="understanding-profit-per-day"&gt;Understanding Profit Per Day
&lt;/h2&gt;&lt;p&gt;The key metric is gold per day, calculated by subtracting the seed cost from the sell price and dividing by the growing time. A cheap crop like parsnip grows in four days and can be planted multiple times per season, often beating high-value single-harvest crops in total profit. Multi-harvest crops, which regrow after each harvest, are especially valuable because you only buy seeds once.&lt;/p&gt;</description></item><item><title>Apex基础站位技巧</title><link>https://takao.blog/zh/game/apex-basic-positioning/</link><pubDate>Thu, 28 May 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/apex-basic-positioning/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/apex-basic-positioning-zh.png" alt="Featured image of post Apex基础站位技巧" /&gt;&lt;h1 id="apex-legendsで上達するための立ち回り基礎"&gt;Apex Legendsで上達するための立ち回り基礎
&lt;/h1&gt;&lt;p&gt;Apex Legends is a third-person battle royale where positioning matters just as much as aim. Learning how to use cover, maintain distance from teammates, and control high ground will dramatically improve your survival rate and kill-death ratio. This article covers the fundamentals of smart positioning.&lt;/p&gt;
&lt;h2 id="always-play-around-cover"&gt;Always Play Around Cover
&lt;/h2&gt;&lt;p&gt;The moment you take fire, you need to know where to run. Before engaging, check that there is a wall, rock, or building nearby that you can use to break line of sight. When rotating across open areas, use smoke grenades or character abilities to reduce exposure. A good habit is to plan your next piece of cover before leaving your current one.&lt;/p&gt;</description></item><item><title>使用 SSH 密钥代替 GPG 密钥进行 Git 提交签名</title><link>https://takao.blog/zh/web/git-signing-commits-ssh-keys/</link><pubDate>Mon, 25 May 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-signing-commits-ssh-keys/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-signing-commits-ssh-keys-zh.png" alt="Featured image of post 使用 SSH 密钥代替 GPG 密钥进行 Git 提交签名" /&gt;&lt;p&gt;长期以来，GPG（GNU Privacy Guard）密钥是签署 Git 提交以证明身份并防止篡改的行业标准。然而，设置 GPG 涉及生成密钥环、管理过期日期和调试后台代理，这给开发人员带来了很大的麻烦。&lt;/p&gt;</description></item><item><title>使用仅内容安全策略报告安全地测试 CSP 规则</title><link>https://takao.blog/zh/web/security-content-security-policy-csp-report-only/</link><pubDate>Fri, 15 May 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-content-security-policy-csp-report-only/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-content-security-policy-csp-report-only-zh.png" alt="Featured image of post 使用仅内容安全策略报告安全地测试 CSP 规则" /&gt;&lt;h2 id="损坏的小部件问题"&gt;损坏的小部件问题
&lt;/h2&gt;&lt;p&gt;部署内容安全策略是抵御 XSS 攻击的最强有力的防御措施之一。但是，一个错误配置的指令可能会默默地破坏内联脚本、阻止 CDN 资源或禁用分析。如果您直接通过 &lt;code&gt;Content-Security-Policy&lt;/code&gt; 标头应用 CSP，并且关键脚本被阻止，您的生产站点就会中断 - 通常没有明显的错误控制台通知。&lt;/p&gt;</description></item><item><title>Valorant地图意识</title><link>https://takao.blog/zh/game/valorant-map-awareness/</link><pubDate>Tue, 12 May 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/valorant-map-awareness/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/valorant-map-awareness-zh.png" alt="Featured image of post Valorant地图意识" /&gt;&lt;h1 id="valorantで勝率を上げるためのマップ理解入門"&gt;Valorantで勝率を上げるためのマップ理解入門
&lt;/h1&gt;&lt;p&gt;Map awareness in Valorant is just as important as aim. Understanding the layout, controlling key zones, and reading enemy movements can win rounds before a single bullet is fired. This guide explains the fundamentals of map awareness and how to apply them in your matches.&lt;/p&gt;
&lt;h2 id="learn-the-control-zones"&gt;Learn the Control Zones
&lt;/h2&gt;&lt;p&gt;Every map has critical areas that give your team a strategic advantage. On Ascent it is mid, on Bind it is short, and on Haven it is garage. Controlling these areas limits the enemy&amp;rsquo;s options and gives your team more information. If you lose control of a key zone, the enemy can attack from multiple directions, making defense much harder. Prioritize these zones in your team&amp;rsquo;s strategy.&lt;/p&gt;</description></item><item><title>为 NPM 导出正确的 TypeScript 声明文件 (.d.ts)</title><link>https://takao.blog/zh/web/typescript-declaration-files-dts/</link><pubDate>Sun, 10 May 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-declaration-files-dts/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-declaration-files-dts-zh.png" alt="Featured image of post 为 NPM 导出正确的 TypeScript 声明文件 (.d.ts)" /&gt;&lt;h2 id="为什么声明文件很重要"&gt;为什么声明文件很重要
&lt;/h2&gt;&lt;p&gt;当您发布用 TypeScript 编写的 npm 包时，使用者需要类型信息来获取 IntelliSense 和编译时检查。如果没有 &lt;code&gt;.d.ts&lt;/code&gt; 文件，您的库实际上会被键入为 &lt;code&gt;any&lt;/code&gt;，这从一开始就违背了使用 TypeScript 的目的。&lt;/p&gt;</description></item><item><title>幻兽帕鲁基地管理</title><link>https://takao.blog/zh/game/palworld-base-management/</link><pubDate>Thu, 07 May 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/palworld-base-management/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/palworld-base-management-zh.png" alt="Featured image of post 幻兽帕鲁基地管理" /&gt;&lt;h1 id="palworldで拠点運営を安定させる基本方針"&gt;Palworldで拠点運営を安定させる基本方針
&lt;/h1&gt;&lt;p&gt;Base management is the core of your progression in Palworld. A well-planned base keeps your Pals working efficiently, resources flowing, and production running smoothly. This guide covers the essential strategies for building and managing a stable base.&lt;/p&gt;
&lt;h2 id="choosing-the-right-location"&gt;Choosing the Right Location
&lt;/h2&gt;&lt;p&gt;The first base location matters a great deal. The starting plateau near the beginner area is a solid choice: plenty of resources, mild temperature, and easy terrain. As you progress, you can build multiple bases. Consider dedicating each base to a specific role, such as mining, farming, or manufacturing. Always build near a fast travel point to minimize travel time between bases.&lt;/p&gt;</description></item><item><title>2026 静态站点生成器：Astro、Hugo 和 11ty</title><link>https://takao.blog/zh/web/static-site-generators-2026-comparison/</link><pubDate>Tue, 05 May 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/static-site-generators-2026-comparison/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/static-site-generators-2026-comparison-zh.png" alt="Featured image of post 2026 静态站点生成器：Astro、Hugo 和 11ty" /&gt;&lt;h2 id="2026-静态站点生成器astrohugo-和-11ty"&gt;2026 静态站点生成器：Astro、Hugo 和 11ty
&lt;/h2&gt;&lt;p&gt;2026 年的静态站点生成器格局比以往任何时候都更加多样化。开发人员可以在基于 Go 的速度极快的 &lt;strong&gt;Hugo&lt;/strong&gt;、岛屿架构先驱 &lt;strong&gt;Astro&lt;/strong&gt; 和极简、灵活的 &lt;strong&gt;11ty&lt;/strong&gt; (Eleventy) 之间进行选择。每个工具都在不同的场景中表现出色——了解它们的权衡对于为您的项目选择正确的工具至关重要。&lt;/p&gt;</description></item><item><title>星露谷物语前期技巧</title><link>https://takao.blog/zh/game/stardew-valley-early-game-tips/</link><pubDate>Mon, 04 May 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/stardew-valley-early-game-tips/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/stardew-valley-early-game-tips-zh.png" alt="Featured image of post 星露谷物语前期技巧" /&gt;&lt;h1 id="stardew-valleyで序盤を快適に進めるコツ"&gt;Stardew Valleyで序盤を快適に進めるコツ
&lt;/h1&gt;&lt;p&gt;Starting Stardew Valley can feel overwhelming. There is so much to do and so little energy to do it. This guide will help you prioritize your time and resources during the crucial first spring, so that you set yourself up for a comfortable and profitable year ahead.&lt;/p&gt;
&lt;h2 id="your-first-day"&gt;Your First Day
&lt;/h2&gt;&lt;p&gt;On day one, explore the town and learn where everything is. Note the locations of shops, fishing spots, and forageable items. Clear a small patch of your farm and plant the parsnip seeds you start with. Use the rest of your energy to chop wood or clear stones, but do not exhaust yourself. Talk to a few villagers to start building relationships early.&lt;/p&gt;</description></item><item><title>Minecraft新手设置</title><link>https://takao.blog/zh/game/minecraft-beginner-settings/</link><pubDate>Wed, 29 Apr 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/minecraft-beginner-settings/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/minecraft-beginner-settings-zh.png" alt="Featured image of post Minecraft新手设置" /&gt;&lt;h1 id="minecraft初心者が最初に覚えたい便利設定まとめ"&gt;Minecraft初心者が最初に覚えたい便利設定まとめ
&lt;/h1&gt;&lt;p&gt;When you first start Minecraft, the settings menu can be overwhelming. But a few small adjustments can make the game much more comfortable and enjoyable. This guide covers the key settings every beginner should know, applicable to both Java Edition and Bedrock Edition.&lt;/p&gt;
&lt;h2 id="controls-and-key-bindings"&gt;Controls and Key Bindings
&lt;/h2&gt;&lt;p&gt;The default key bindings work fine, but customizing them to your preference can improve your gameplay. Consider moving the inventory key from E to Q if that is more convenient, or enabling scroll wheel tool switching. One of the most useful changes is to toggle sprint instead of double-tapping the movement key, which can prevent accidental sprints in dangerous situations. If you play on a laptop, adjusting the mouse sensitivity is also a good idea.&lt;/p&gt;</description></item><item><title>使用 git reflog 恢复已删除的分支和提交</title><link>https://takao.blog/zh/web/git-recovery-deleted-branch-reflog/</link><pubDate>Sat, 25 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-recovery-deleted-branch-reflog/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-recovery-deleted-branch-reflog-zh.png" alt="Featured image of post 使用 git reflog 恢复已删除的分支和提交" /&gt;&lt;p&gt;“我不小心使用 &lt;code&gt;git branch -D&lt;/code&gt; 删除了本地分支”，或者“我运行了 &lt;code&gt;git reset --hard HEAD~1&lt;/code&gt; 并丢失了我未推送的提交！”如果您使用 Git 工作过一段时间，您可能经历过这些令人胃口大开的时刻之一。&lt;/p&gt;</description></item><item><title>为开发和生产设计可重用的 Docker Compose 配置</title><link>https://takao.blog/zh/web/docker-compose-production-best-practice/</link><pubDate>Mon, 20 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-compose-production-best-practice/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-compose-production-best-practice-zh.png" alt="Featured image of post 为开发和生产设计可重用的 Docker Compose 配置" /&gt;&lt;h2 id="为开发和生产设计可重用的-docker-compose-配置"&gt;为开发和生产设计可重用的 Docker Compose 配置
&lt;/h2&gt;&lt;p&gt;Docker Compose 是用于定义和运行多容器应用程序的标准工具。但许多团队陷入了为开发、登台和生产维护单独的 &lt;code&gt;docker-compose.yml&lt;/code&gt; 文件的陷阱 - 导致重复、漂移和配置错误。&lt;/p&gt;
&lt;p&gt;更好的方法使用&lt;strong&gt;组合文件覆盖&lt;/strong&gt;、&lt;strong&gt;配置文件&lt;/strong&gt;和&lt;strong&gt;环境变量&lt;/strong&gt;来保持适应每个环境的单一事实来源。&lt;/p&gt;</description></item><item><title>怪物猎人：荒野武器选择</title><link>https://takao.blog/zh/game/monster-hunter-wilds-weapon-choice/</link><pubDate>Wed, 15 Apr 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/monster-hunter-wilds-weapon-choice/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/monster-hunter-wilds-weapon-choice-zh.png" alt="Featured image of post 怪物猎人：荒野武器选择" /&gt;&lt;h1 id="monster-hunter-wildsで覚えたい武器選びの考え方"&gt;Monster Hunter Wildsで覚えたい武器選びの考え方
&lt;/h1&gt;&lt;p&gt;Monster Hunter Wilds offers 14 weapon types, each with its own unique playstyle. Choosing the right weapon can make the difference between a frustrating hunt and an exhilarating one. This guide breaks down the weapon categories and helps you find the one that suits you best.&lt;/p&gt;
&lt;h2 id="weapon-categories-at-a-glance"&gt;Weapon Categories at a Glance
&lt;/h2&gt;&lt;p&gt;The 14 weapons can be grouped into four broad categories: heavy hitters, agile attackers, balanced fighters, and support-oriented tools. Great Sword and Hammer deliver massive single hits but leave you vulnerable after each swing. Dual Blades and Insect Glaive focus on speed and mobility, letting you land multiple quick hits. Sword and Shield and Lance offer a balanced mix of offense and defense, making them great choices for newcomers.&lt;/p&gt;</description></item><item><title>使用 DNS 预取和预连接加速资产加载</title><link>https://takao.blog/zh/web/performance-dns-prefetch-preconnect/</link><pubDate>Wed, 15 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/performance-dns-prefetch-preconnect/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/performance-dns-prefetch-preconnect-zh.png" alt="Featured image of post 使用 DNS 预取和预连接加速资产加载" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;每个外部资源（字体、脚本、图像、API 端点）都需要网络连接。 &lt;strong&gt;DNS 解析&lt;/strong&gt;、&lt;strong&gt;TCP 握手&lt;/strong&gt;和 &lt;strong&gt;TLS 协商&lt;/strong&gt;的开销可能会导致页面加载时间增加数百毫秒。 &lt;strong&gt;资源提示&lt;/strong&gt;如 &lt;code&gt;dns-prefetch&lt;/code&gt; 和 &lt;code&gt;preconnect&lt;/code&gt; 让您告诉浏览器在实际需要资源之前&lt;strong&gt;提前&lt;/strong&gt;执行这些步骤。&lt;/p&gt;</description></item><item><title>Minecraft建筑技巧</title><link>https://takao.blog/zh/game/minecraft-building-tips/</link><pubDate>Sun, 12 Apr 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/minecraft-building-tips/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/minecraft-building-tips-zh.png" alt="Featured image of post Minecraft建筑技巧" /&gt;&lt;h1 id="minecraftの建築をもっと楽しむための基本テクニック"&gt;Minecraftの建築をもっと楽しむための基本テクニック
&lt;/h1&gt;&lt;p&gt;Minecraft building is about more than stacking blocks. With a few techniques, you can turn a basic box into an impressive structure. This guide covers the fundamental principles that will improve the quality of your builds, whether you are making a simple cottage or a large fortress.&lt;/p&gt;
&lt;h2 id="start-with-a-framework"&gt;Start with a Framework
&lt;/h2&gt;&lt;p&gt;The most common mistake is jumping straight into decoration. Begin by laying out a skeleton: place pillars to mark the height and corners, and outline the floor. Ignore details at this stage. Focus on proportions and silhouette. A well-proportioned frame will look good even before you add walls. Once the structure feels right, fill in the walls and add windows, doors, and trim.&lt;/p&gt;</description></item><item><title>在 TypeScript 类型系统中构建复杂的字符串解析器</title><link>https://takao.blog/zh/web/typescript-template-literal-type-level-parsers/</link><pubDate>Fri, 10 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-template-literal-type-level-parsers/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-template-literal-type-level-parsers-zh.png" alt="Featured image of post 在 TypeScript 类型系统中构建复杂的字符串解析器" /&gt;&lt;h2 id="在类型级别进行解析"&gt;在类型级别进行解析
&lt;/h2&gt;&lt;p&gt;TypeScript 的模板文字类型与递归条件类型和 &lt;code&gt;infer&lt;/code&gt; 相结合，允许您完全在类型系统内解析和转换字符串文字。这不是一个运行时解析器，它是一个编译时解析器，可以从字符串常量中提取结构，从而为 URL 路由、SQL 查询、命令行参数等启用强类型 API。&lt;/p&gt;</description></item><item><title>从 WebGL 过渡到 WebGPU 以获得更快的图形速度</title><link>https://takao.blog/zh/web/webgpu-native-browser-graphics-generation/</link><pubDate>Sun, 05 Apr 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/webgpu-native-browser-graphics-generation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/webgpu-native-browser-graphics-generation-zh.png" alt="Featured image of post 从 WebGL 过渡到 WebGPU 以获得更快的图形速度" /&gt;&lt;h2 id="从-webgl-过渡到-webgpu-以获得更快的图形速度"&gt;从 WebGL 过渡到 WebGPU 以获得更快的图形速度
&lt;/h2&gt;&lt;p&gt;十多年来，&lt;strong&gt;WebGL&lt;/strong&gt; 一直是浏览器中硬件加速 3D 图形的唯一标准。它基于 OpenGL ES 构建，公开了一个在其时代运行良好的状态机 API，但会带来大量 CPU 开销，并且缺乏对现代 GPU 功能的直接访问。输入 &lt;strong&gt;WebGPU&lt;/strong&gt; — 专为现代 GPU 架构全新设计的下一代图形和计算 API。&lt;/p&gt;</description></item><item><title>从 git checkout 迁移到 git switch 和恢复</title><link>https://takao.blog/zh/web/git-checkout-restore-switch-commands/</link><pubDate>Wed, 25 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-checkout-restore-switch-commands/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-checkout-restore-switch-commands-zh.png" alt="Featured image of post 从 git checkout 迁移到 git switch 和恢复" /&gt;&lt;p&gt;开发人员在开始使用 Git 时首先学习的命令之一是 &lt;code&gt;git checkout&lt;/code&gt;。然而，&lt;code&gt;git checkout&lt;/code&gt; 是一个众所周知的重载命令。它处理太多的责任，这使得它成为初学者和经验丰富的开发人员造成混乱和意外文件丢失的常见原因。&lt;/p&gt;</description></item><item><title>网络安全中 JWT 令牌与有状态会话的比较</title><link>https://takao.blog/zh/web/security-jwt-vs-session-auth/</link><pubDate>Fri, 20 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-jwt-vs-session-auth/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-jwt-vs-session-auth-zh.png" alt="Featured image of post 网络安全中 JWT 令牌与有状态会话的比较" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;身份验证是每个 Web 应用程序的支柱。出现了两种主要模式：&lt;strong&gt;无状态 JWT（JSON Web 令牌）&lt;/strong&gt; 身份验证和 &lt;strong&gt;基于状态会话&lt;/strong&gt; 身份验证。两者都解决相同的问题——在后续请求中验证用户是谁——但它们在存储、撤销和安全属性方面有根本的不同。本文提供了详细的比较，以帮助您选择适合您的应用程序的方法。&lt;/p&gt;</description></item><item><title>优化网页字体加载：防止 FOUT 和 FOIT</title><link>https://takao.blog/zh/web/performance-fonts-loading-optimization/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/performance-fonts-loading-optimization/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/performance-fonts-loading-optimization-zh.png" alt="Featured image of post 优化网页字体加载：防止 FOUT 和 FOIT" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;网络字体增强了设计，但需要付出代价。加载自定义字体时，浏览器必须决定：显示不可见文本（&lt;strong&gt;FOIT&lt;/strong&gt; - 不可见文本的 Flash）或显示后备字体（&lt;strong&gt;FOUT&lt;/strong&gt; - 无样式文本的 Flash）。任一选择都会影响 &lt;strong&gt;CLS（累积布局偏移）&lt;/strong&gt; 和用户体验。本文介绍了可靠加载字体同时最小化布局变化的策略。&lt;/p&gt;</description></item><item><title>带有父选择器的创意 CSS 食谱：has()</title><link>https://takao.blog/zh/web/css-has-pseudo-selector-recipes/</link><pubDate>Tue, 10 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-has-pseudo-selector-recipes/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-has-pseudo-selector-recipes-zh.png" alt="Featured image of post 带有父选择器的创意 CSS 食谱：has()" /&gt;&lt;h2 id="带有父选择器的创意-css-食谱-has"&gt;带有父选择器的创意 CSS 食谱 &lt;code&gt;:has()&lt;/code&gt;
&lt;/h2&gt;&lt;p&gt;多年来，CSS 开发人员梦想着一个 &lt;strong&gt;父选择器&lt;/strong&gt; — 一种根据子元素设置元素样式的方法。 JavaScript 和额外的类名是唯一的解决方法。然后是 &lt;code&gt;:has()&lt;/code&gt;，这个 CSS 伪类最终使“如果这个元素包含 X，则相应地设计它的样式”成为本机现实。&lt;/p&gt;</description></item><item><title>使用 Gemini 1.5 Pro 的海量上下文长度构建应用程序</title><link>https://takao.blog/zh/web/gemini-api-pro-latest-utilization/</link><pubDate>Thu, 05 Mar 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/gemini-api-pro-latest-utilization/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/gemini-api-pro-latest-utilization-zh.png" alt="Featured image of post 使用 Gemini 1.5 Pro 的海量上下文长度构建应用程序" /&gt;&lt;h2 id="上下文窗口革命"&gt;上下文窗口革命
&lt;/h2&gt;&lt;p&gt;Gemini 1.5 Pro 通过提供高达&lt;strong&gt;200 万个令牌&lt;/strong&gt;的上下文窗口，重新定义了大型语言模型的可能性。这意味着您可以在单个请求中传递整个代码库、数小时的视频或数千页文档——从根本上改变我们与人工智能交互的方式。&lt;/p&gt;</description></item><item><title>Apex灵敏度与瞄准练习</title><link>https://takao.blog/zh/game/apex-sensitivity-aim-practice/</link><pubDate>Wed, 04 Mar 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/apex-sensitivity-aim-practice/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/apex-sensitivity-aim-practice-zh.png" alt="Featured image of post Apex灵敏度与瞄准练习" /&gt;&lt;h1 id="apex-legendsの感度設定とエイム練習の考え方"&gt;Apex Legendsの感度設定とエイム練習の考え方
&lt;/h1&gt;&lt;p&gt;Sensitivity settings and practice quality are two of the biggest factors in improving your aim in Apex Legends. Simply playing matches is not enough; you need a deliberate approach to find the right sensitivity and train effectively. This guide covers how to set up your sensitivity and build a practice routine that works.&lt;/p&gt;</description></item><item><title>Git Merge 与 Git Rebase：操作指南</title><link>https://takao.blog/zh/web/git-merge-vs-rebase-best-practice/</link><pubDate>Wed, 25 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-merge-vs-rebase-best-practice/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-merge-vs-rebase-best-practice-zh.png" alt="Featured image of post Git Merge 与 Git Rebase：操作指南" /&gt;&lt;p&gt;在 Git 中将一个分支的更改集成到另一个分支时，开发人员通常依赖两个主要命令：&lt;code&gt;git merge&lt;/code&gt; 和 &lt;code&gt;git rebase&lt;/code&gt;。虽然两者都有相同的最终目的——将两个分支的代码整合在一起——但它们解决问题的方式不同，导致提交历史记录截然不同。&lt;/p&gt;</description></item><item><title>替换 LocalStorage：动态 IndexedDB 包装器 localForage</title><link>https://takao.blog/zh/web/js-indexeddb-localforage-localstorage/</link><pubDate>Fri, 20 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-indexeddb-localforage-localstorage/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-indexeddb-localforage-localstorage-zh.png" alt="Featured image of post 替换 LocalStorage：动态 IndexedDB 包装器 localForage" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;客户端存储是现代 Web 应用程序的基本要求 - 离线缓存、用户首选项、草稿数据和会话状态都需要保留在浏览器中。多年来，&lt;strong&gt;localStorage&lt;/strong&gt; 一直是最简单的首选解决方案，但随着应用程序的增长，它的局限性变得令人痛苦。本文对 localStorage、原始 IndexedDB 和 &lt;strong&gt;localForage&lt;/strong&gt; 包装器库进行了比较，为选择正确的存储引擎提供了实用指导。&lt;/p&gt;</description></item><item><title>域安全：设置 SPF、DKIM 和 DMARC 设置</title><link>https://takao.blog/zh/web/web-security-dnssec-spf-dkim-dmarc/</link><pubDate>Sun, 15 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-security-dnssec-spf-dkim-dmarc/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-security-dnssec-spf-dkim-dmarc-zh.png" alt="Featured image of post 域安全：设置 SPF、DKIM 和 DMARC 设置" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;电子邮件身份验证对于防止域欺骗、网络钓鱼和垃圾邮件文件夹拒绝至关重要。三个基于 DNS 的标准 — &lt;strong&gt;SPF&lt;/strong&gt;、&lt;strong&gt;DKIM&lt;/strong&gt; 和 &lt;strong&gt;DMARC&lt;/strong&gt; — 共同验证声称来自您的域的电子邮件是否合法。如果没有这些记录，攻击者就可以代表您发送伪造的电子邮件，而合法电子邮件可能会进入收件人的垃圾邮件文件夹。本指南解释了每个标准并展示了如何在 Cloudflare 或您的 DNS 提供商上配置它们。&lt;/p&gt;</description></item><item><title>Valorant常见错误</title><link>https://takao.blog/zh/game/valorant-common-mistakes/</link><pubDate>Wed, 11 Feb 2026 09:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/valorant-common-mistakes/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/valorant-common-mistakes-zh.png" alt="Featured image of post Valorant常见错误" /&gt;&lt;h1 id="valorant初心者がやりがちな失敗と対策"&gt;Valorant初心者がやりがちな失敗と対策
&lt;/h1&gt;&lt;p&gt;Valorant is a tactical FPS where smart decisions matter as much as aim. Many players, especially at lower ranks, repeat the same mistakes without realizing it. Fixing these common errors is one of the fastest ways to climb. This guide covers the most frequent mistakes and how to correct them.&lt;/p&gt;
&lt;h2 id="shooting-while-moving"&gt;Shooting While Moving
&lt;/h2&gt;&lt;p&gt;This is the most common bad habit. Valorant has high movement inaccuracy, so running and gunning is ineffective. Always stop before you shoot. Practice counter-strafing: tap the opposite movement key to come to a quick stop, then fire. Use the practice range to drill this until it becomes muscle memory. Once you master the stop-and-shoot rhythm, your accuracy will improve dramatically.&lt;/p&gt;</description></item><item><title>PPR（部分预渲染）：合并静态和动态路由</title><link>https://takao.blog/zh/web/nextjs-partial-prerendering-ppr/</link><pubDate>Tue, 10 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-partial-prerendering-ppr/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-partial-prerendering-ppr-zh.png" alt="Featured image of post PPR（部分预渲染）：合并静态和动态路由" /&gt;&lt;h2 id="问题静态与动态的权衡"&gt;问题：静态与动态的权衡
&lt;/h2&gt;&lt;p&gt;传统上，Next.js 开发人员面临着一个二元选择：&lt;strong&gt;静态生成&lt;/strong&gt;（快速但陈旧）或&lt;strong&gt;服务器端渲染&lt;/strong&gt;（新鲜但较慢）。部分预渲染（PPR）通过将两种方法结合在一个页面中消除了这种权衡——静态 HTML shell 立即流式传输，而动态内容通过 React Suspense 加载。&lt;/p&gt;</description></item><item><title>Tailwind CSS v4.0 发布和纯 CSS 配置</title><link>https://takao.blog/zh/web/tailwind-css-v4-release-changes/</link><pubDate>Thu, 05 Feb 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/tailwind-css-v4-release-changes/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/tailwind-css-v4-release-changes-zh.png" alt="Featured image of post Tailwind CSS v4.0 发布和纯 CSS 配置" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Tailwind CSS v4.0 标志着从基于 JavaScript 的配置到 &lt;strong&gt;CSS 优先架构&lt;/strong&gt; 的范式转变。 &lt;code&gt;tailwind.config.js&lt;/code&gt; 文件消失了；设计标记现在使用 &lt;code&gt;@theme&lt;/code&gt; 直接在 CSS 中定义。此版本还集成了 &lt;strong&gt;Lightning CSS&lt;/strong&gt; 以实现极快的构建，采用了 CSS 嵌套和 &lt;code&gt;@layer&lt;/code&gt; 等现代 CSS 功能，并提供了完全重写的引擎。本文详细介绍了 v3 的主要变化并提供了实用的迁移指南。&lt;/p&gt;</description></item><item><title>自动发布工作流程的常规提交</title><link>https://takao.blog/zh/web/git-semantic-commit-messages-standard/</link><pubDate>Sun, 25 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-semantic-commit-messages-standard/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-semantic-commit-messages-standard-zh.png" alt="Featured image of post 自动发布工作流程的常规提交" /&gt;&lt;p&gt;在协作软件开发团队中，提交消息结构的不一致会使跟踪更改变得困难。诸如 &lt;code&gt;fix bug&lt;/code&gt;、&lt;code&gt;update code&lt;/code&gt; 或 &lt;code&gt;minor changes&lt;/code&gt; 之类的模糊提交消息会使代码审核和延迟发布文档变得复杂。&lt;/p&gt;</description></item><item><title>具有错误边界的强大前端异常管理</title><link>https://takao.blog/zh/web/frontend-error-boundaries-logging/</link><pubDate>Tue, 20 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/frontend-error-boundaries-logging/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/frontend-error-boundaries-logging-zh.png" alt="Featured image of post 具有错误边界的强大前端异常管理" /&gt;&lt;h2 id="为什么误差边界很重要"&gt;为什么误差边界很重要
&lt;/h2&gt;&lt;p&gt;在 React 应用程序中，组件中一个未捕获的 JavaScript 错误可能会导致整个 UI 崩溃。在错误边界之前，这意味着用户会看到一个白屏，没有任何错误提示。错误边界是 React 组件，可以捕获子组件树中任何位置的 JavaScript 错误，并呈现后备 UI，而不是崩溃。&lt;/p&gt;</description></item><item><title>使用 HSTS 策略安全地实施 HTTPS 连接</title><link>https://takao.blog/zh/web/web-security-http-strict-transport-hsts-hacks/</link><pubDate>Fri, 16 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-security-http-strict-transport-hsts-hacks/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-security-http-strict-transport-hsts-hacks-zh.png" alt="Featured image of post 使用 HSTS 策略安全地实施 HTTPS 连接" /&gt;&lt;h2 id="第一个请求问题"&gt;第一个请求问题
&lt;/h2&gt;&lt;p&gt;HTTPS 在建立连接后对流量进行加密，但对 HTTP URL 的初始请求仍以明文形式发送。同网络上的攻击者可以拦截第一个请求，执行 &lt;strong&gt;SSL 分割&lt;/strong&gt;攻击，将用户在整个会话中降级为 HTTP。&lt;/p&gt;</description></item><item><title>TS 类型系统中的分支：条件类型简介</title><link>https://takao.blog/zh/web/typescript-conditional-types/</link><pubDate>Thu, 15 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-conditional-types/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-conditional-types-zh.png" alt="Featured image of post TS 类型系统中的分支：条件类型简介" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;TypeScript 的类型系统是&lt;strong&gt;图灵完备&lt;/strong&gt;，而释放其全部功能的关键功能之一是&lt;strong&gt;条件类型&lt;/strong&gt;。就像 JavaScript 中的三元运算符 (&lt;code&gt;condition ? a : b&lt;/code&gt;) 一样，条件类型可让您创建类型级逻辑：&lt;code&gt;T extends U ? X : Y&lt;/code&gt;。这使得动态的、上下文感知的类型解析成为可能。&lt;/p&gt;</description></item><item><title>React 编译器：告别手动记忆</title><link>https://takao.blog/zh/web/react-compiler-automated-memoization/</link><pubDate>Sat, 10 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-compiler-automated-memoization/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-compiler-automated-memoization-zh.png" alt="Featured image of post React 编译器：告别手动记忆" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;多年来，React 开发人员一直使用 &lt;code&gt;useMemo&lt;/code&gt;、&lt;code&gt;useCallback&lt;/code&gt;、&lt;code&gt;React.memo&lt;/code&gt; 和各种状态管理启发式方法手动优化重新渲染。 &lt;strong&gt;React Compiler&lt;/strong&gt;（以前称为 React Forget）完全改变了这种范例。它是一个构建时工具，通过在编译时分析反应依赖关系来自动记忆 React 组件、钩子和值，从而无需手动优化钩子。&lt;/p&gt;</description></item><item><title>Cloudflare Workers与Wasm边缘计算发展</title><link>https://takao.blog/zh/web/cloudflare-workers-wasm-edge-developments/</link><pubDate>Mon, 05 Jan 2026 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/cloudflare-workers-wasm-edge-developments/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/cloudflare-workers-wasm-edge-developments-zh.png" alt="Featured image of post Cloudflare Workers与Wasm边缘计算发展" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;Cloudflare Workers revolutionized serverless computing by bringing code execution to the network edge — over 330 locations worldwide. By integrating &lt;strong&gt;WebAssembly (Wasm)&lt;/strong&gt; modules into Workers, you can run computationally intensive tasks (image processing, cryptography, video encoding, scientific calculations) at near-native speeds while maintaining the low-latency benefits of edge distribution. This article explores how to compile languages like Rust and AssemblyScript to Wasm, deploy them on Workers, and the performance trade-offs involved.&lt;/p&gt;</description></item><item><title>使用 git fetch --prune 清理孤立远程分支</title><link>https://takao.blog/zh/web/git-prune-clean-remote-branches/</link><pubDate>Thu, 25 Dec 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-prune-clean-remote-branches/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-prune-clean-remote-branches-zh.png" alt="Featured image of post 使用 git fetch --prune 清理孤立远程分支" /&gt;&lt;p&gt;在使用 GitHub 或 GitLab 的现代开发工作流程中，一旦合并了相应的拉取请求 (PR)，功能分支通常就会在远程主机上删除。&lt;/p&gt;
&lt;p&gt;但是，当您在本地终端中运行 &lt;code&gt;git branch -a&lt;/code&gt; 时，您会注意到 &lt;strong&gt;指向那些已删除的远程分支（例如 &lt;code&gt;remotes/origin/feature-xxx&lt;/code&gt;）的引用无限期地保留在您的分支列表中。&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>优化浏览器渲染管道（关键路径）</title><link>https://takao.blog/zh/web/performance-critical-rendering-path-optimizations/</link><pubDate>Sat, 20 Dec 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/performance-critical-rendering-path-optimizations/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/performance-critical-rendering-path-optimizations-zh.png" alt="Featured image of post 优化浏览器渲染管道（关键路径）" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;关键渲染路径 (CRP)&lt;/strong&gt; 是浏览器执行的将 HTML、CSS 和 JavaScript 转换为屏幕上可见像素的步骤序列。优化此管道直接影响&lt;strong&gt;第一内容绘制 (FCP)&lt;/strong&gt; 和 &lt;strong&gt;最大内容绘制 (LCP)&lt;/strong&gt;。本文详细介绍了每个 CRP 阶段——DOM 构建、CSSOM 构建、渲染树、布局、绘制和合成——并提供了可行的优化策略。&lt;/p&gt;</description></item><item><title>CORS 的工作原理以及修复访问阻止错误</title><link>https://takao.blog/zh/web/web-security-http-headers-cors/</link><pubDate>Mon, 15 Dec 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-security-http-headers-cors/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-security-http-headers-cors-zh.png" alt="Featured image of post CORS 的工作原理以及修复访问阻止错误" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;CORS（资源共享）&lt;strong&gt;是一种浏览器安全，用于控制来自一个源的网页如何请求来自不同源的资源。当&lt;code&gt;https://app.example.com&lt;/code&gt;处的前端尝试从&lt;code&gt;https://api.example.org&lt;/code&gt;获取数据时，浏览器默认强制执行&lt;/strong&gt;同源策略&lt;/strong&gt;。CORS提供了一种通过HTTP标头来放宽此策略的受控方法。本文介绍了完整的CORS流程、预检请求以及如何修复常见的阻止访问错误。&lt;/p&gt;</description></item><item><title>使用 CSS 纵横比防止累积布局偏移</title><link>https://takao.blog/zh/web/css-aspect-ratio-cumulative-layout-shift/</link><pubDate>Wed, 10 Dec 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-aspect-ratio-cumulative-layout-shift/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-aspect-ratio-cumulative-layout-shift-zh.png" alt="Featured image of post 使用 CSS 纵横比防止累积布局偏移" /&gt;&lt;h2 id="了解累积布局偏移"&gt;了解累积布局偏移
&lt;/h2&gt;&lt;p&gt;累积布局偏移 (CLS) 是 Google 衡量视觉稳定性的 &lt;strong&gt;Core Web Vitals&lt;/strong&gt; 指标之一。它量化了用户经历意外布局变化的频率。高 CLS 分数会损害用户体验和 SEO 排名。主要原因是？媒体元素（图像、视频、iframe）加载时无需保留空间。&lt;/p&gt;</description></item><item><title>Cloudflare隐私沙盒与第三方Cookie淘汰</title><link>https://takao.blog/zh/web/cloudflare-privacy-sandbox-thirdparty-cookie-deprecation/</link><pubDate>Fri, 05 Dec 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/cloudflare-privacy-sandbox-thirdparty-cookie-deprecation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/cloudflare-privacy-sandbox-thirdparty-cookie-deprecation-zh.png" alt="Featured image of post Cloudflare隐私沙盒与第三方Cookie淘汰" /&gt;&lt;h2 id="the-end-of-third-party-cookies"&gt;The End of Third-Party Cookies
&lt;/h2&gt;&lt;p&gt;The third-party cookie era is ending. After years of delays and industry pushback, Chrome has begun phasing out cross-site tracking cookies. This fundamentally changes how web analytics, advertising, and personalization function. Understanding the deprecation timeline and replacement APIs is essential for every web developer.&lt;/p&gt;
&lt;h2 id="chrome-phase-out-timeline"&gt;Chrome Phase-Out Timeline
&lt;/h2&gt;&lt;p&gt;Google&amp;rsquo;s Privacy Sandbox initiative has followed this trajectory:&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Date&lt;/th&gt;
					&lt;th&gt;Milestone&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;2024 Q1&lt;/td&gt;
					&lt;td&gt;1% Chrome users have 3PC restricted&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;2025 Q2&lt;/td&gt;
					&lt;td&gt;Testing phase with expanded cohorts&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;2025 Q3-Q4&lt;/td&gt;
					&lt;td&gt;Graduated rollout begins&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;2026&lt;/td&gt;
					&lt;td&gt;Full deprecation for all Chrome users&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="privacy-sandbox-apis"&gt;Privacy Sandbox APIs
&lt;/h2&gt;&lt;p&gt;The Privacy Sandbox replaces third-party cookies with several purpose-built APIs:&lt;/p&gt;</description></item><item><title>使用 git revert -m 安全地撤消合并提交</title><link>https://takao.blog/zh/web/git-revert-merge-commit-safe/</link><pubDate>Tue, 25 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-revert-merge-commit-safe/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-revert-merge-commit-safe-zh.png" alt="Featured image of post 使用 git revert -m 安全地撤消合并提交" /&gt;&lt;p&gt;将功能分支合并到主发布分支 (&lt;code&gt;main&lt;/code&gt;) 后，您可能会发现一个严重的错误，需要您立即回滚集成。&lt;/p&gt;
&lt;p&gt;通过标准提交，您可以使用 &lt;code&gt;git revert &amp;lt;commit-hash&amp;gt;&lt;/code&gt; 轻松撤消更改。但是，尝试恢复合并提交会直接导致 Git 错误：&lt;code&gt;fatal: commit &amp;lt;hash&amp;gt; is a merge but no -m option was given.&lt;/code&gt;&lt;/p&gt;</description></item><item><title>通过 actions/cache 加速 GitHub Actions 工作流程</title><link>https://takao.blog/zh/web/github-actions-caching-setup/</link><pubDate>Thu, 20 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/github-actions-caching-setup/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/github-actions-caching-setup-zh.png" alt="Featured image of post 通过 actions/cache 加速 GitHub Actions 工作流程" /&gt;&lt;p&gt;自动化 CI/CD 管道（如 GitHub Actions）是现代软件质量控制的基石。但是，如果您的工作流程在每个拉取请求上获取外部包、启动容器环境并从头开始重建整个应用程序，则执行时间可能会迅速增加到几分钟。&lt;/p&gt;</description></item><item><title>审核 NPM 依赖关系：Snyk 和自动化补丁管理</title><link>https://takao.blog/zh/web/security-dependency-vulnerabilities-npm-audit/</link><pubDate>Sat, 15 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-dependency-vulnerabilities-npm-audit/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-dependency-vulnerabilities-npm-audit-zh.png" alt="Featured image of post 审核 NPM 依赖关系：Snyk 和自动化补丁管理" /&gt;&lt;h2 id="供应链问题"&gt;供应链问题
&lt;/h2&gt;&lt;p&gt;现代 JavaScript 应用程序提供了数以万计的传递依赖项。每一个都是潜在的攻击媒介。 &lt;strong&gt;event-stream&lt;/strong&gt; 事件（2018 年）将恶意程序包注入到流行的依赖项中，这表明漏洞可能来自树中的任何位置。在这种规模下，仅依靠人工审核是不可能的。&lt;/p&gt;</description></item><item><title>使用映射类型动态转换类型</title><link>https://takao.blog/zh/web/typescript-mapped-types/</link><pubDate>Mon, 10 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-mapped-types/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-mapped-types-zh.png" alt="Featured image of post 使用映射类型动态转换类型" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;映射类型&lt;/strong&gt;允许您通过迭代其键来转换现有对象类型。将它们视为 &lt;code&gt;Array.prototype.map()&lt;/code&gt; 但处于 &lt;strong&gt;类型级别&lt;/strong&gt;。语法 &lt;code&gt;{ [K in keyof T]: T[K] }&lt;/code&gt; 通过对 &lt;code&gt;T&lt;/code&gt; 的每个属性应用转换来创建新类型。这就是 TypeScript 的许多内置实用程序类型在幕后工作的方式。&lt;/p&gt;</description></item><item><title>Node.js 对需要 ESM 模块的稳定支持</title><link>https://takao.blog/zh/web/node-esm-require-support-stable/</link><pubDate>Wed, 05 Nov 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/node-esm-require-support-stable/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/node-esm-require-support-stable-zh.png" alt="Featured image of post Node.js 对需要 ESM 模块的稳定支持" /&gt;&lt;h2 id="nodejs-对需要-esm-模块的稳定支持"&gt;Node.js 对需要 ESM 模块的稳定支持
&lt;/h2&gt;&lt;p&gt;多年来，Node.js 开发人员面临着痛苦的分歧：&lt;strong&gt;CommonJS&lt;/strong&gt; (CJS) 和 &lt;strong&gt;ES 模块&lt;/strong&gt; (ESM) 共存，但互操作性有限。 CJS 代码可以异步加载 &lt;code&gt;import()&lt;/code&gt; ESM 模块，但 &lt;code&gt;require()&lt;/code&gt;（CJS 核心的同步加载机制）根本无法加载 ESM。这迫使代码库迁移成为要么全有要么全无的事情。&lt;/p&gt;</description></item><item><title>使用 git bisect 快速查找回归提交</title><link>https://takao.blog/zh/web/git-bisect-debug-regression/</link><pubDate>Mon, 20 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-bisect-debug-regression/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-bisect-debug-regression-zh.png" alt="Featured image of post 使用 git bisect 快速查找回归提交" /&gt;&lt;p&gt;“昨天还能用，今天就坏了。”在任何活跃的软件项目中，回归错误都必然会出现。从数百或数千个提交中查找引入错误的确切提交就像大海捞针一样。&lt;/p&gt;
&lt;p&gt;您可以使用 Git 的内置调试工具：&lt;strong&gt;&lt;code&gt;git bisect&lt;/code&gt;&lt;/strong&gt;，而不是手动一一检查提交或花费数小时分析代码更改。&lt;/p&gt;</description></item><item><title>使用 v 标志解锁 JavaScript RegExp 功能</title><link>https://takao.blog/zh/web/js-regex-v-flag/</link><pubDate>Wed, 15 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-regex-v-flag/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-regex-v-flag-zh.png" alt="Featured image of post 使用 v 标志解锁 JavaScript RegExp 功能" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;JavaScript 中的正则表达式已经有了显着的发展。 ES2024 引入了 &lt;strong&gt;&lt;code&gt;v&lt;/code&gt; 标志&lt;/strong&gt; — &lt;code&gt;u&lt;/code&gt; 标志的超集，可解锁强大的集合表示法、字符类减法、交集和正确的 Unicode 表情符号匹配。如果您一直在努力应对复杂的字符类逻辑或表情符号正则表达式模式，那么 &lt;code&gt;v&lt;/code&gt; 标志将改变游戏规则。&lt;/p&gt;</description></item><item><title>使用 CSS light-dark() 实现简单的深色模式</title><link>https://takao.blog/zh/web/css-light-dark-color-scheme/</link><pubDate>Fri, 10 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-light-dark-color-scheme/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-light-dark-color-scheme-zh.png" alt="Featured image of post 使用 CSS light-dark() 实现简单的深色模式" /&gt;&lt;h2 id="传统深色模式的问题"&gt;传统深色模式的问题
&lt;/h2&gt;&lt;p&gt;传统上，实现深色模式需要将重复的 CSS 规则封装在 &lt;code&gt;@media (prefers-color-scheme: dark)&lt;/code&gt; 中：&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-css" data-lang="css"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;:&lt;span style="color:#a6e22e"&gt;root&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --bg: &lt;span style="color:#ae81ff"&gt;#ffffff&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --text: &lt;span style="color:#ae81ff"&gt;#111111&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;@&lt;span style="color:#66d9ef"&gt;media&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;&lt;span style="color:#f92672"&gt;prefers-color-scheme&lt;/span&gt;&lt;span style="color:#f92672"&gt;:&lt;/span&gt; &lt;span style="color:#f92672"&gt;dark&lt;/span&gt;&lt;span style="color:#f92672"&gt;)&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; :&lt;span style="color:#a6e22e"&gt;root&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --bg: &lt;span style="color:#ae81ff"&gt;#1a1a2e&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; --text: &lt;span style="color:#ae81ff"&gt;#e0e0e0&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;这可行，但会产生维护开销，特别是在跨大型样式表管理多个颜色属性时。 &lt;code&gt;light-dark()&lt;/code&gt; CSS 函数完全消除了这种重复。&lt;/p&gt;</description></item><item><title>Next.js 15 稳定版：生产中的最佳实践</title><link>https://takao.blog/zh/web/nextjs-15-stable-features-overview/</link><pubDate>Sun, 05 Oct 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-15-stable-features-overview/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-15-stable-features-overview-zh.png" alt="Featured image of post Next.js 15 稳定版：生产中的最佳实践" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Next.js 15 作为稳定版本发布，提供 &lt;strong&gt;React 19 支持&lt;/strong&gt;、重新设计的缓存模型以及针对异步请求处理的主要 API 改进。此版本默认对获取请求和 GET 路由处理程序&lt;strong&gt;无缓存&lt;/strong&gt;，从而简化了行为可预测性。它还引入了 &lt;code&gt;cookies()&lt;/code&gt;、&lt;code&gt;headers()&lt;/code&gt; 和 &lt;code&gt;params()&lt;/code&gt; 的 &lt;code&gt;async&lt;/code&gt; 变体，与 React 19 的异步渲染范例保持一致。本文涵盖了生产采用的每一项重大变更和最佳实践。&lt;/p&gt;</description></item><item><title>使用 GPG 或 SSH 和验证徽章签署 Git 提交</title><link>https://takao.blog/zh/web/git-commit-signing-gpg/</link><pubDate>Thu, 25 Sep 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-commit-signing-gpg/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-commit-signing-gpg-zh.png" alt="Featured image of post 使用 GPG 或 SSH 和验证徽章签署 Git 提交" /&gt;&lt;p&gt;在 GitHub 上查看提交日志时，您可能会注意到某些提交旁边有一个绿色的“&lt;strong&gt;已验证&lt;/strong&gt;”徽章。此标签表明提交已经过加密签名并确认来自合法的、经过验证的用户。&lt;/p&gt;
&lt;p&gt;默认情况下，Git 允许开发人员使用 &lt;code&gt;git config user.email&lt;/code&gt; 等简单命令配置他们选择的任何名称和电子邮件地址。这意味着冒充是微不足道的。为了保证身份验证并防止未经授权的贡献，强烈建议&lt;strong&gt;提交签名&lt;/strong&gt;。&lt;/p&gt;</description></item><item><title>最大化 Docker 构建缓存以加快部署管道</title><link>https://takao.blog/zh/web/docker-build-caches-speedup/</link><pubDate>Sat, 20 Sep 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-build-caches-speedup/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-build-caches-speedup-zh.png" alt="Featured image of post 最大化 Docker 构建缓存以加快部署管道" /&gt;&lt;p&gt;无论您是想加快本地迭代容器的运行速度，还是旨在缩短 CI/CD 管道的时间，优化 &lt;strong&gt;Docker 映像构建速度&lt;/strong&gt; 都是工程生产力的一个重要方面。较长的构建等待时间会扰乱开发人员的注意力并推高云计算成本。&lt;/p&gt;</description></item><item><title>辅助功能要点：何时以及如何编写 WAI-ARIA</title><link>https://takao.blog/zh/web/web-accessibility-aria-basics/</link><pubDate>Mon, 15 Sep 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-accessibility-aria-basics/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-accessibility-aria-basics-zh.png" alt="Featured image of post 辅助功能要点：何时以及如何编写 WAI-ARIA" /&gt;&lt;p&gt;在现代 Web 开发中，数字可访问性（通常缩写为 A11y）不再是奢侈品或事后的想法，而是核心质量标准。创建每个人都可以导航的界面，无论身体或认知能力如何，都从语义 HTML 开始。&lt;/p&gt;</description></item><item><title>使用受歧视联合的类型安全状态转换</title><link>https://takao.blog/zh/web/typescript-discriminated-unions/</link><pubDate>Wed, 10 Sep 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-discriminated-unions/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-discriminated-unions-zh.png" alt="Featured image of post 使用受歧视联合的类型安全状态转换" /&gt;&lt;p&gt;在使用 TypeScript 的现代前端和后端开发中，确保状态转换期间的类型安全是构建健壮且无崩溃的应用程序的关键要素。在处理异步 API 通信（例如加载、成功和错误状态之间的转换）或复杂的用户交互时，不明确的类型定义很容易导致意外的运行时错误。&lt;/p&gt;</description></item><item><title>GitHub Copilot 工作区如何改变开发工作流程</title><link>https://takao.blog/zh/web/github-copilot-workspace-developer-agent/</link><pubDate>Fri, 05 Sep 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/github-copilot-workspace-developer-agent/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/github-copilot-workspace-developer-agent-zh.png" alt="Featured image of post GitHub Copilot 工作区如何改变开发工作流程" /&gt;&lt;h2 id="超越自动完成"&gt;超越自动完成
&lt;/h2&gt;&lt;p&gt;GitHub Copilot Chat 和内联补全功能可帮助开发人员更快地编写代码，但它们是在微观层面上操作的——这里是一个函数，那里是一个注释。 &lt;strong&gt;GitHub Copilot Workspace&lt;/strong&gt; 将范例转移到宏观层面：它采用 GitHub 问题（错误报告、功能请求或任务）并生成包含多文件更改、测试和文档的完整拉取请求。&lt;/p&gt;</description></item><item><title>缓解 CSRF：SameSite Cookie 属性和 CSRF 令牌</title><link>https://takao.blog/zh/web/security-csrf-tokens-samesite-cookies/</link><pubDate>Mon, 25 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-csrf-tokens-samesite-cookies/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-csrf-tokens-samesite-cookies-zh.png" alt="Featured image of post 缓解 CSRF：SameSite Cookie 属性和 CSRF 令牌" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Cookie 是管理用户身份验证状态的便捷机制。当会话 ID 存储在 cookie 中时，浏览器会自动将其附加到针对该域的传出 HTTP 请求。&lt;/p&gt;
&lt;p&gt;但是，此自动附件功能会被 &lt;strong&gt;跨站点请求伪造 (CSRF)&lt;/strong&gt; 攻击所利用。&lt;/p&gt;</description></item><item><title>高级 git stash：保存未跟踪的内容并部分恢复</title><link>https://takao.blog/zh/web/git-stash-advanced-techniques/</link><pubDate>Wed, 20 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-stash-advanced-techniques/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-stash-advanced-techniques-zh.png" alt="Featured image of post 高级 git stash：保存未跟踪的内容并部分恢复" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在团队开发中，在为功能分支编写代码的过程中，您经常需要切换分支来解决紧急的错误修复。&lt;/p&gt;
&lt;p&gt;虽然您可以将半成品作为临时“WIP”提交提交，但更简洁的方法是使用 &lt;strong&gt;&lt;code&gt;git stash&lt;/code&gt;&lt;/strong&gt;。&lt;/p&gt;</description></item><item><title>没有预处理器的 CSS 嵌套的标准语法</title><link>https://takao.blog/zh/web/css-nesting-standard-syntax/</link><pubDate>Fri, 15 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-nesting-standard-syntax/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-nesting-standard-syntax-zh.png" alt="Featured image of post 没有预处理器的 CSS 嵌套的标准语法" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;从历史上看，编写嵌套 CSS 规则需要 Sass (SCSS)、Less 或 PostCSS 等预处理工具。&lt;/p&gt;
&lt;p&gt;然而，浏览器供应商已经标准化了 &lt;strong&gt;CSS 嵌套规范&lt;/strong&gt;。如今，您可以直接在纯 CSS 文件中编写嵌套选择器，并在所有现代 Web 浏览器中本机运行它们。&lt;/p&gt;</description></item><item><title>设计干净的 React 自定义 Hook 以实现可重用性</title><link>https://takao.blog/zh/web/react-custom-hooks-rules/</link><pubDate>Sun, 10 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-custom-hooks-rules/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-custom-hooks-rules-zh.png" alt="Featured image of post 设计干净的 React 自定义 Hook 以实现可重用性" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;当您开发 React 组件时，您可能会发现文件增长到数百行。当 &lt;code&gt;useState&lt;/code&gt;、&lt;code&gt;useEffect&lt;/code&gt;、API 查询和验证逻辑与渲染标记混合时，就会发生这种情况，使组件难以阅读和维护。&lt;/p&gt;</description></item><item><title>当前趋势：Vite 6 和基于 Rust 的 Bundler Rspack</title><link>https://takao.blog/zh/web/vite-6-rspack-bundler-speeds/</link><pubDate>Tue, 05 Aug 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/vite-6-rspack-bundler-speeds/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/vite-6-rspack-bundler-speeds-zh.png" alt="Featured image of post 当前趋势：Vite 6 和基于 Rust 的 Bundler Rspack" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在前端开发中，开发服务器启动的速度和生产编译周期直接影响开发人员体验（DX）。&lt;/p&gt;
&lt;p&gt;近年来，社区已经从标准 Webpack 配置迁移到本机、基于 Go (ESBuild) 和基于 Rust (SWC) 的构建帮助程序。&lt;/p&gt;</description></item><item><title>Node.js 中的 ESM 与 CommonJS 互操作挑战</title><link>https://takao.blog/zh/web/node-esm-cjs-interoperability/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/node-esm-cjs-interoperability/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/node-esm-cjs-interoperability-zh.png" alt="Featured image of post Node.js 中的 ESM 与 CommonJS 互操作挑战" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Node.js 自 v12 起就支持 ECMAScript 模块 (ESM)，但生态系统仍然深深植根于 CommonJS (CJS)。将两个模块系统混合在一个项目中——或者从 ESM 代码中使用 CJS 包——会引入围绕导出、默认导入和全局的微妙陷阱。本文绘制了互操作边界并提供了平滑迁移的具体策略。&lt;/p&gt;</description></item><item><title>使用 requestIdleCallback 执行非阻塞脚本</title><link>https://takao.blog/zh/web/web-performance-requestidlecallback-optimizations/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-performance-requestidlecallback-optimizations/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-performance-requestidlecallback-optimizations-zh.png" alt="Featured image of post 使用 requestIdleCallback 执行非阻塞脚本" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在构建复杂的 Web 应用程序时，保持流畅的动画和响应式用户输入（理想情况下匹配 60+ FPS 帧速率）对于良好的用户体验至关重要。&lt;/p&gt;
&lt;p&gt;然而，现代应用程序通常需要执行低优先级的后台操作，例如发送分析数据、同步缓存、解析遥测日志或预取资产。&lt;/p&gt;</description></item><item><title>使用 .git-blame-ignore-revs 忽略 gitblame 中的格式提交</title><link>https://takao.blog/zh/web/git-blame-ignore-revs/</link><pubDate>Sun, 20 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-blame-ignore-revs/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-blame-ignore-revs-zh.png" alt="Featured image of post 使用 .git-blame-ignore-revs 忽略 gitblame 中的格式提交" /&gt;&lt;p&gt;当审核代码库以找出何时以及为何引入一行代码时，&lt;code&gt;git blame&lt;/code&gt; 是开发人员最好的朋友。然而，大型样式更新、代码格式化程序采用（如 Prettier）或全局 linter 自动修复可能会扰乱这段历史。单个批量重新格式化提交可以重写整个存储库的代码作者身份标签，隐藏原始开发人员和引入实际业务逻辑的提交。&lt;/p&gt;</description></item><item><title>使用延迟加载的框架和图像提高初始页面速度</title><link>https://takao.blog/zh/web/web-performance-lazyloading-iframe/</link><pubDate>Sun, 20 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-performance-lazyloading-iframe/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-performance-lazyloading-iframe-zh.png" alt="Featured image of post 使用延迟加载的框架和图像提高初始页面速度" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;优化网页速度的一个有效但经常被忽视的策略是&lt;strong&gt;推迟屏幕外资源加载&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;默认情况下，当用户加载网页时，浏览器会立即请求页面上的所有图像和 &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt; 元素（例如 YouTube 嵌入、交互式地图、社交小部件或广告脚本），即使它们位于折叠下方很远的位置。这种并发下载会阻塞主线程并减慢页面的首次内容绘制 (FCP) 时间。&lt;/p&gt;</description></item><item><title>优化图像：WebP 与 AVIF 以及响应式尺寸</title><link>https://takao.blog/zh/web/web-performance-image-optimizations/</link><pubDate>Tue, 15 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-performance-image-optimizations/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-performance-image-optimizations-zh.png" alt="Featured image of post 优化图像：WebP 与 AVIF 以及响应式尺寸" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;优化图像资源是提高 Lighthouse 分数和 LCP（最大内容绘制）等 Web 性能指标的最有效方法之一。&lt;/p&gt;
&lt;p&gt;在许多 Web 应用程序中，图像占总负载大小的一半以上。缓慢的图像加载时间直接降低了用户体验。&lt;/p&gt;</description></item><item><title>使用 CSS 容器查询设计模块化布局</title><link>https://takao.blog/zh/web/css-container-queries-vs-media-queries/</link><pubDate>Thu, 10 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-container-queries-vs-media-queries/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-container-queries-vs-media-queries-zh.png" alt="Featured image of post 使用 CSS 容器查询设计模块化布局" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;多年来，&lt;strong&gt;媒体查询 (&lt;code&gt;@media&lt;/code&gt;)&lt;/strong&gt; 一直是响应式网页设计的基础。&lt;/p&gt;
&lt;p&gt;媒体查询根据浏览器窗口的视口宽度触发布局更改。然而，在现代组件驱动开发（使用 React、Vue 或 Web Components）中，基于视口的样式组件有明显的局限性。&lt;/p&gt;</description></item><item><title>如何在 TypeScript 中使用标准装饰器</title><link>https://takao.blog/zh/web/typescript-5-decorations-adoption/</link><pubDate>Sat, 05 Jul 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-5-decorations-adoption/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-5-decorations-adoption-zh.png" alt="Featured image of post 如何在 TypeScript 中使用标准装饰器" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在 TypeScript 中，&lt;strong&gt;装饰器&lt;/strong&gt;长期以来一直是一个关键功能，被 Angular、NestJS 和 TypeORM 等主要框架所普及，用于管理元数据和依赖项注入。&lt;/p&gt;
&lt;p&gt;然而，多年来，装饰器仍然是一个实验性功能（需要 &lt;code&gt;experimentalDecorators&lt;/code&gt; 标志），依赖于与不断发展的 ECMAScript (JavaScript) 标准不同的遗留提案。&lt;/p&gt;</description></item><item><title>Web 开发人员必备的 Linux 命令和管道</title><link>https://takao.blog/zh/web/linux-shell-commands-for-webdevelopers/</link><pubDate>Wed, 25 Jun 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/linux-shell-commands-for-webdevelopers/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/linux-shell-commands-for-webdevelopers-zh.png" alt="Featured image of post Web 开发人员必备的 Linux 命令和管道" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;无论您从事前端还是后端工作，shell 命令熟练程度对于 Web 开发人员来说都是一项重要技能。&lt;/p&gt;
&lt;p&gt;命令行任务不断出现：sshing 到 AWS/VPS 实例、在 Docker 容器内调试或编写自动化 CI/CD 管道 shell 脚本（例如 GitHub Actions）。&lt;/p&gt;</description></item><item><title>停止在 React 中过度使用 useMemo 和 useCallback</title><link>https://takao.blog/zh/web/react-hooks-usememo-usecallback/</link><pubDate>Fri, 20 Jun 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-hooks-usememo-usecallback/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-hooks-usememo-usecallback-zh.png" alt="Featured image of post 停止在 React 中过度使用 useMemo 和 useCallback" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在优化 React 应用程序性能时，开发人员通常会使用 &lt;strong&gt;&lt;code&gt;useMemo&lt;/code&gt;&lt;/strong&gt; 和 &lt;strong&gt;&lt;code&gt;useCallback&lt;/code&gt;&lt;/strong&gt;。&lt;/p&gt;
&lt;p&gt;人们很容易将每个对象和函数包装在这些钩子中，假设缓存输出将自动加速应用程序。然而，这是一个常见的误解。&lt;/p&gt;</description></item><item><title>为什么以及如何在 CSP 中采用“严格动态”</title><link>https://takao.blog/zh/web/security-csp-strict-dynamic-implementation/</link><pubDate>Sun, 15 Jun 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-csp-strict-dynamic-implementation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-csp-strict-dynamic-implementation-zh.png" alt="Featured image of post 为什么以及如何在 CSP 中采用“严格动态”" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;实施&lt;strong&gt;内容安全策略 (CSP)&lt;/strong&gt; 是减轻跨站脚本 (XSS) 风险的高效方法。然而，配置和维护策略可能会成为一个令人头疼的问题。&lt;/p&gt;
&lt;p&gt;对于使用第三方 SDK（例如 Google 跟踪代码管理器、分析信标、支付小部件或社交共享按钮）的网站，这些脚本通常会从嵌套域动态加载（注入）其他脚本。这迫使开发人员在 &lt;code&gt;script-src&lt;/code&gt; 指令中维护一个长而脆弱的外部域白名单。&lt;/p&gt;</description></item><item><title>使用 TS 模板文字创建强大的字符串类型</title><link>https://takao.blog/zh/web/typescript-template-literal-types/</link><pubDate>Tue, 10 Jun 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-template-literal-types/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-template-literal-types-zh.png" alt="Featured image of post 使用 TS 模板文字创建强大的字符串类型" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;TypeScript 提供了先进的类型系统，允许开发人员在编译时对复杂的运行时约束进行建模。&lt;/p&gt;
&lt;p&gt;在这些功能中，&lt;strong&gt;模板文字类型&lt;/strong&gt;（在 TypeScript 4.1 中引入）允许您通过组合字符串文字来定义结构化字符串约束。&lt;/p&gt;</description></item><item><title>WWDC 2025 Safari更新</title><link>https://takao.blog/zh/web/apple-wwdc-2025-safari-updates/</link><pubDate>Thu, 05 Jun 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/apple-wwdc-2025-safari-updates/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/apple-wwdc-2025-safari-updates-zh.png" alt="Featured image of post WWDC 2025 Safari更新" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;At Apple&amp;rsquo;s annual developer conference &lt;strong&gt;WWDC 2025&lt;/strong&gt;, major updates were announced for iOS 19 and macOS, along with the release of &lt;strong&gt;Safari 19&lt;/strong&gt; powered by the WebKit rendering engine.&lt;/p&gt;
&lt;p&gt;In recent years, the WebKit team has accelerated its adoption of web standards to improve layout compatibility across browser engines (Blink and Gecko).&lt;/p&gt;
&lt;p&gt;This article highlights key Safari 19 announcements from WWDC 2025, focusing on WebGPU integration, browser fingerprinting shields, and newly supported CSS properties.&lt;/p&gt;</description></item><item><title>后端数据库索引基础</title><link>https://takao.blog/zh/web/backend-database-indexing-basics/</link><pubDate>Sun, 25 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/backend-database-indexing-basics/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/backend-database-indexing-basics-zh.png" alt="Featured image of post 后端数据库索引基础" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;As web applications scale and data volumes grow, backend systems often face database bottleneck issues like query latencies.&lt;/p&gt;
&lt;p&gt;Running join (&lt;code&gt;JOIN&lt;/code&gt;) operations or complex search queries on tables with hundreds of thousands of records without proper index optimizations can cause database CPU spikes, leading to slow response times for end users.&lt;/p&gt;
&lt;p&gt;Designing database indices is a powerful way to address these performance bottlenecks. This article explains how database indices work, details B-Tree structures, and shares guidelines for designing effective indices.&lt;/p&gt;</description></item><item><title>使用 git worktree 进行并发分支开发</title><link>https://takao.blog/zh/web/git-worktree-multi-branches/</link><pubDate>Tue, 20 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-worktree-multi-branches/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-worktree-multi-branches-zh.png" alt="Featured image of post 使用 git worktree 进行并发分支开发" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在日常软件开发中，在为功能分支编写代码时经常会被紧急修复请求打断。&lt;/p&gt;
&lt;p&gt;传统上，开发人员通过以下两种方式之一处理此问题：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;使用 &lt;code&gt;git stash&lt;/code&gt; 暂时搁置活动更改，切换分支以修复错误，提交，切换回来，然后运行 ​​&lt;code&gt;git stash pop&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;将存储库的完全独立的副本克隆到另一个目录中以处理修补程序。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;但是，存储在恢复时存在冲突错误的风险，并且克隆同一存储库的多个副本会浪费磁盘空间并使本地提交同步变得复杂。&lt;/p&gt;</description></item><item><title>ECMAScript 2025 (ES16) 中令人兴奋的功能</title><link>https://takao.blog/zh/web/js-es2025-new-features/</link><pubDate>Thu, 15 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-es2025-new-features/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-es2025-new-features-zh.png" alt="Featured image of post ECMAScript 2025 (ES16) 中令人兴奋的功能" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;每年，TC39 委员会都会更新 ECMAScript 规范，为 JavaScript 生态系统引入新的语言功能和 API。&lt;/p&gt;
&lt;p&gt;对于即将推出的 &lt;strong&gt;ECMAScript 2025 (ES16)&lt;/strong&gt; 标准，一些提案已达到第 3 阶段或第 4 阶段，表明它们正处于浏览器实施和采用的最后阶段。&lt;/p&gt;</description></item><item><title>与 CSS 网格子网格完美对齐</title><link>https://takao.blog/zh/web/css-subgrid-grid-nesting/</link><pubDate>Sat, 10 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-subgrid-grid-nesting/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-subgrid-grid-nesting-zh.png" alt="Featured image of post 与 CSS 网格子网格完美对齐" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在卡片布局中跨列对齐嵌套组件是响应式网页设计中常见的布局挑战。&lt;/p&gt;
&lt;p&gt;虽然 CSS Grid 和 Flexbox 可以轻松均衡同级卡片容器的高度，但对齐内部元素（例如标题、正文和 CTA 按钮）仍然很困难。如果一张卡片具有多行标题，而另一张卡片具有单行标题，则以下元素将错位，从而导致 UI 不一致。&lt;/p&gt;</description></item><item><title>Google I/O 2025：集成网络技术和人工智能</title><link>https://takao.blog/zh/web/google-io-2025-web-updates/</link><pubDate>Mon, 05 May 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/google-io-2025-web-updates/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/google-io-2025-web-updates-zh.png" alt="Featured image of post Google I/O 2025：集成网络技术和人工智能" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在 Google 年度开发者大会 &lt;strong&gt;Google I/O 2025&lt;/strong&gt; 上，重大公告强调了人工智能和网络平台的融合。&lt;/p&gt;
&lt;p&gt;对于 Web 开发人员来说，关注点已经扩展到云托管模型端点之外。业界正在向&lt;strong&gt;设备上人工智能执行&lt;/strong&gt;转变，允许开发人员直接在客户端浏览器内运行轻量级法学硕士。&lt;/p&gt;</description></item><item><title>设计 REST API 端点的最佳实践</title><link>https://takao.blog/zh/web/web-api-design-rest-best-practices/</link><pubDate>Fri, 25 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-api-design-rest-best-practices/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-api-design-rest-best-practices-zh.png" alt="Featured image of post 设计 REST API 端点的最佳实践" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在现代 Web 开发中，&lt;strong&gt;API 一致性&lt;/strong&gt;对于开发人员的生产力起着至关重要的作用。&lt;/p&gt;
&lt;p&gt;不一致的端点 (URL)、不正确的 HTTP 方法以及将所有错误包装在 &lt;code&gt;200 OK&lt;/code&gt; 状态代码中会导致混乱、错误和浪费的开发周期。&lt;/p&gt;</description></item><item><title>使用 Husky 和 ​​Git Hooks 自动进行预提交检查</title><link>https://takao.blog/zh/web/git-hooks-husky-prevent-bugs/</link><pubDate>Sun, 20 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-hooks-husky-prevent-bugs/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-hooks-husky-prevent-bugs-zh.png" alt="Featured image of post 使用 Husky 和 ​​Git Hooks 自动进行预提交检查" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在团队开发中，提交具有语法错误或格式错误的代码等简单错误很常见。这些问题可能会破坏 CI 构建或在代码审查期间导致混乱的格式冲突。&lt;/p&gt;
&lt;p&gt;您可以自动执行这些检查，而不是依赖开发人员的警惕性来执行准则。&lt;/p&gt;</description></item><item><title>比较包管理器：npm、pnpm 和yarn</title><link>https://takao.blog/zh/web/npm-pnpm-yarn-package-managers/</link><pubDate>Tue, 15 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/npm-pnpm-yarn-package-managers/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/npm-pnpm-yarn-package-managers-zh.png" alt="Featured image of post 比较包管理器：npm、pnpm 和yarn" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在 JavaScript 和 Node.js 开发中，包管理器是必不可少的日常工具。&lt;/p&gt;
&lt;p&gt;虽然&lt;strong&gt;npm&lt;/strong&gt;仍然是默认的行业标准，但&lt;strong&gt;pnpm&lt;/strong&gt;（以节省磁盘空间和速度而闻名）和&lt;strong&gt;yarn&lt;/strong&gt;（具有零安装和即插即用模式）等现代替代品提供了独特的架构。&lt;/p&gt;</description></item><item><title>揭秘 Next.js 应用路由器缓存机制</title><link>https://takao.blog/zh/web/nextjs-app-router-caching/</link><pubDate>Thu, 10 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-app-router-caching/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-app-router-caching-zh.png" alt="Featured image of post 揭秘 Next.js 应用路由器缓存机制" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Next.js App Router 具有强大的缓存架构，旨在优化加载速度并减少后端 API 开销。&lt;/p&gt;
&lt;p&gt;然而，由于 Next.js 集成了多个缓存层，开发人员经常遇到调试问题。常见问题包括页面显示陈旧数据或 API 触发过于频繁。&lt;/p&gt;</description></item><item><title>使用视图转换 API 实现平滑页面转换</title><link>https://takao.blog/zh/web/css-view-transitions-single-page-api/</link><pubDate>Sat, 05 Apr 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-view-transitions-single-page-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-view-transitions-single-page-api-zh.png" alt="Featured image of post 使用视图转换 API 实现平滑页面转换" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;提供动态页面转换是提升现代 Web 应用程序整体用户体验 (UX) 的关键因素。&lt;/p&gt;
&lt;p&gt;从历史上看，为了在页面导航之间平滑地变形或淡出元素，开发人员必须导入大量 JavaScript 库，例如 Framer Motion 或 GS​​AP。这些库需要深度挂钩渲染生命周期，以在对旧 DOM 节点进行动画处理时延迟卸载。&lt;/p&gt;</description></item><item><title>gitcherry-pick 用于特定提交的安全用例</title><link>https://takao.blog/zh/web/git-cherry-pick-usecases/</link><pubDate>Tue, 25 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-cherry-pick-usecases/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-cherry-pick-usecases-zh.png" alt="Featured image of post gitcherry-pick 用于特定提交的安全用例" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在团队开发中，您经常会遇到需要立即将特定错误修复从正在进行的功能分支部署到生产分支（&lt;code&gt;main&lt;/code&gt;）的情况，而不释放半完成的功能本身。&lt;/p&gt;
&lt;p&gt;合并整个分支会引入未完成的代码。&lt;/p&gt;</description></item><item><title>通过多阶段构建减少 Docker 镜像大小</title><link>https://takao.blog/zh/web/docker-multi-stage-build-reduction/</link><pubDate>Thu, 20 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-multi-stage-build-reduction/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-multi-stage-build-reduction-zh.png" alt="Featured image of post 通过多阶段构建减少 Docker 镜像大小" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;保持 Docker 镜像占用空间较小对于加速​​部署周期、降低存储成本以及通过缩小容器的攻击面来加强安全性至关重要。&lt;/p&gt;
&lt;p&gt;然而，简单的 Dockerfile 构造通常将编译时依赖项（如 gcc、标头、构建缓存）和测试工具直接捆绑到最终的运行时映像中。这会使图像大小从几兆字节膨胀到数百或千兆字节。&lt;/p&gt;</description></item><item><title>改善下次绘制 (INP) 交互的方法</title><link>https://takao.blog/zh/web/performance-web-vitals-inp/</link><pubDate>Sat, 15 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/performance-web-vitals-inp/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/performance-web-vitals-inp-zh.png" alt="Featured image of post 改善下次绘制 (INP) 交互的方法" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在谷歌衡量网页用户体验的&lt;strong&gt;Core Web Vitals&lt;/strong&gt;指标中，FID（首次输入延迟）已正式被**INP（与下一次绘制的交互）**取代。&lt;/p&gt;
&lt;p&gt;FID 仅测量第一次用户交互的响应速度，而 INP 则评估页面访问整个生命周期中所有点击、敲击和键盘输入的响应能力。它记录交互和后续视觉更新（“下一次绘制”）之间的延迟。&lt;/p&gt;</description></item><item><title>怪物猎人：荒野</title><link>https://takao.blog/zh/game/monster-hunter-wilds/</link><pubDate>Mon, 10 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/monster-hunter-wilds/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/monster-hunter-wilds-zh.png" alt="Featured image of post 怪物猎人：荒野" /&gt;&lt;h1 id="monster-hunter-wilds-complete-hunting-guide"&gt;Monster Hunter Wilds: Complete Hunting Guide
&lt;/h1&gt;&lt;h2 id="overview-a-new-frontier"&gt;Overview: A New Frontier
&lt;/h2&gt;&lt;p&gt;Monster Hunter Wilds is the latest installment in Capcom&amp;rsquo;s flagship action RPG series, introducing vast open environments, dynamic weather systems, and a new generation of monsters. As a hunter in the Forbidden Lands, you track, hunt, and harvest massive creatures to craft ever-stronger gear. This guide covers everything you need to thrive.&lt;/p&gt;
&lt;h2 id="weapon-types-and-playstyles"&gt;Weapon Types and Playstyles
&lt;/h2&gt;&lt;p&gt;Monster Hunter Wilds features 14 weapon types, each with unique mechanics and combos. Here&amp;rsquo;s a breakdown of the most beginner-friendly options:&lt;/p&gt;</description></item><item><title>掌握 TypeScript 可以让 Operator 满意</title><link>https://takao.blog/zh/web/typescript-satisfies-operator/</link><pubDate>Mon, 10 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-satisfies-operator/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-satisfies-operator-zh.png" alt="Featured image of post 掌握 TypeScript 可以让 Operator 满意" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;TypeScript 4.9 中引入的 &lt;strong&gt;&lt;code&gt;satisfies&lt;/code&gt; 运算符&lt;/strong&gt;是一项强大的功能，旨在提高类型安全性，同时保持开发人员的灵活性。&lt;/p&gt;
&lt;p&gt;但是，区分 &lt;code&gt;satisfies&lt;/code&gt;、类型注释 (&lt;code&gt;: Type&lt;/code&gt;) 和类型断言 (&lt;code&gt;as Type&lt;/code&gt;) 之间的差异可能会令人困惑。本指南详细介绍了 &lt;code&gt;satisfies&lt;/code&gt; 运算符的机制，并分享了生产代码库的实际用例。&lt;/p&gt;</description></item><item><title>React 19 正式发布及实用功能指南</title><link>https://takao.blog/zh/web/react-19-new-features-practical/</link><pubDate>Wed, 05 Mar 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-19-new-features-practical/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-19-new-features-practical-zh.png" alt="Featured image of post React 19 正式发布及实用功能指南" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;React 19 代表了前端开发的重大范式转变。&lt;/p&gt;
&lt;p&gt;以前仅限于 Next.js 等元框架的功能（例如用于表单处理的 &lt;strong&gt;React Server Components (RSC)&lt;/strong&gt; 和 &lt;strong&gt;Actions API&lt;/strong&gt;）现在已正式集成到稳定的核心 React 库中。&lt;/p&gt;
&lt;p&gt;本指南重点介绍了 React 19 中最重要的功能，提供了实用的代码示例和升级技巧来清理您的代码库。&lt;/p&gt;</description></item><item><title>Web开发中XSS的防御原则</title><link>https://takao.blog/zh/web/security-basics-xss-prevention/</link><pubDate>Tue, 25 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/security-basics-xss-prevention/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/security-basics-xss-prevention-zh.png" alt="Featured image of post Web开发中XSS的防御原则" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在网络安全中，&lt;strong&gt;跨站脚本 (XSS)&lt;/strong&gt; 是最古老、最持久的漏洞之一。&lt;/p&gt;
&lt;p&gt;如果恶意脚本在受害者的浏览器上运行，它们可能会破坏整个会话、窃取会话令牌 (cookie)、劫持帐户或动态更改页面内容以获取敏感凭据。&lt;/p&gt;</description></item><item><title>使用交互式 Git Rebase 清理提交历史记录</title><link>https://takao.blog/zh/web/git-rebase-interactive-flow/</link><pubDate>Thu, 20 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-rebase-interactive-flow/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-rebase-interactive-flow-zh.png" alt="Featured image of post 使用交互式 Git Rebase 清理提交历史记录" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在日常软件开发过程中，通常会出现混乱的提交历史记录，其中充满了“WIP”、“修复拼写错误”或“测试部署”等日志。&lt;/p&gt;
&lt;p&gt;如果将这些提交直接合并到主分支中，则查找引入特定错误的位置或理解添加一行代码的原因变得极其困难。&lt;/p&gt;</description></item><item><title>JavaScript 异步/等待应避免的模式</title><link>https://takao.blog/zh/web/javascript-async-await-tips/</link><pubDate>Sat, 15 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/javascript-async-await-tips/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/javascript-async-await-tips-zh.png" alt="Featured image of post JavaScript 异步/等待应避免的模式" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;自从 ES2017 中引入 &lt;code&gt;async/await&lt;/code&gt; 以来，编写异步 JavaScript 变得更加直观。它允许开发人员以看起来同步的结构表达异步逻辑，与嵌套的 Promise 链 (&lt;code&gt;.then().catch()&lt;/code&gt;) 相比，大大提高了代码库的可读性。&lt;/p&gt;
&lt;p&gt;然而，这种干净的类似同步的语法可以隐藏性能缺陷和错误处理错误。在本文中，我们将深入研究常见的异步/等待反模式，并学习如何将它们重构为高性能、有弹性的代码。&lt;/p&gt;</description></item><item><title>CSS 锚点定位简介和示例</title><link>https://takao.blog/zh/web/css-anchor-positioning-guide/</link><pubDate>Mon, 10 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-anchor-positioning-guide/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-anchor-positioning-guide-zh.png" alt="Featured image of post CSS 锚点定位简介和示例" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;在 Web 开发中，相对于特定参考元素（锚点）定位浮动元素（例如工具提示、弹出窗口、下拉菜单和悬停卡）历来是一项复杂的挑战。&lt;/p&gt;
&lt;p&gt;为了使浮动元素在窗口大小调整或页面滚动时跟随锚点，开发人员传统上依靠连续的 JavaScript 坐标计算（使用 &lt;code&gt;getBoundingClientRect()&lt;/code&gt;）来动态更改内联样式。因此，像 Popper.js 或 Floating UI 这样的库成为了行业标准。但是，在滚动事件期间在主线程上执行脚本循环经常会导致渲染延迟和卡顿，尤其是在移动设备上。&lt;/p&gt;</description></item><item><title>AI推理模型与OpenAI</title><link>https://takao.blog/zh/web/ai-reasoning-models-openai/</link><pubDate>Wed, 05 Feb 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/ai-reasoning-models-openai/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/ai-reasoning-models-openai-zh.png" alt="Featured image of post AI推理模型与OpenAI" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;In recent years, the evolutionary pace of generative AI has been nothing short of extraordinary. Among these developments, the new reasoning models released by OpenAI (such as the o1 and o3 series) employ a fundamentally different architecture and approach compared to conventional large language models like GPT-4o.&lt;/p&gt;
&lt;p&gt;Traditional Large Language Models (LLMs) excel at predicting and generating the &amp;ldquo;most likely next word&amp;rdquo; at high speeds. However, when faced with tasks demanding deep logical deduction—such as complex logic puzzles, advanced mathematics, or refactoring large-scale codebases—they often rely on intuitive leaps, leading to logical inconsistencies known as hallucinations.&lt;/p&gt;</description></item><item><title>Proxmox 备份策略：vzdump、PBS 和灾难恢复</title><link>https://takao.blog/zh/web/proxmox-backup-disaster-recovery/</link><pubDate>Mon, 20 Jan 2025 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/proxmox-backup-disaster-recovery/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/proxmox-backup-disaster-recovery-zh.png" alt="Featured image of post Proxmox 备份策略：vzdump、PBS 和灾难恢复" /&gt;&lt;p&gt;备份不是可选的。位腐烂、意外删除和勒索软件都是虚拟机管理程序存储的目标。 Proxmox VE 提供两种备份路径：内置 &lt;code&gt;vzdump&lt;/code&gt; 和专用 Proxmox 备份服务器 (PBS)。&lt;/p&gt;
&lt;h2 id="为什么备份很重要"&gt;为什么备份很重要
&lt;/h2&gt;&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;威胁&lt;/th&gt;
					&lt;th&gt;影响&lt;/th&gt;
					&lt;th&gt;缓解措施&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;位腐&lt;/td&gt;
					&lt;td&gt;无声的单位腐败&lt;/td&gt;
					&lt;td&gt;完整性验证 (PBS)&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;意外删除&lt;/td&gt;
					&lt;td&gt;VM瞬间丢失&lt;/td&gt;
					&lt;td&gt;保留+异地&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;勒索软件&lt;/td&gt;
					&lt;td&gt;加密磁盘&lt;/td&gt;
					&lt;td&gt;不可变的异地备份&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="vzdump内置工具"&gt;vzdump：内置工具
&lt;/h2&gt;&lt;p&gt;vzdump 创建虚拟机和容器的一致备份。对于虚拟机，安装 Qemu Guest Agent，以便 vzdump 可以在快照之前静默文件系统：&lt;/p&gt;</description></item><item><title>适合初学者的任务管理工具：选择正确的工具</title><link>https://takao.blog/zh/web/task-managenemt/</link><pubDate>Tue, 14 Jan 2025 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/task-managenemt/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/task-management-zh.png" alt="Featured image of post 适合初学者的任务管理工具：选择正确的工具" /&gt;&lt;p&gt;你好！今天，我将向您介绍“如何选择任务管理工具”，以更有效地管理您的日常任务。在日常生活中安排“要做的事情”非常重要，无论是工作、学业还是家务。但找到适合您的工具可能有点困难。因此，这里为初学者提供一些提示，帮助您毫不犹豫地选择合适的！&lt;/p&gt;</description></item><item><title>CDN缓存策略</title><link>https://takao.blog/zh/web/cdn-caching-strategies/</link><pubDate>Mon, 30 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/cdn-caching-strategies/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/cdn-caching-strategies-zh.png" alt="Featured image of post CDN缓存策略" /&gt;&lt;h2 id="introduction"&gt;Introduction
&lt;/h2&gt;&lt;p&gt;Content Delivery Networks (CDNs) are the backbone of modern web performance. By caching content at edge nodes distributed globally, CDNs dramatically reduce latency and offload traffic from origin servers. However, effective caching is not simply a matter of enabling a CDN and forgetting about it. Striking the right balance between performance — high cache hit rates and low latency — and freshness — minimal staleness and fast invalidation — requires deliberate strategy.&lt;/p&gt;</description></item><item><title>文件系统访问API：强大的本地文件操作</title><link>https://takao.blog/zh/web/file-system-access-api/</link><pubDate>Sat, 28 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/file-system-access-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/file-system-access-api-zh.png" alt="Featured image of post 文件系统访问API：强大的本地文件操作" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;几十年来，Web 应用程序仅限于通过笨重的 &lt;code&gt;&amp;lt;input type=&amp;quot;file&amp;quot;&amp;gt;&lt;/code&gt; 元素读取文件，并且没有可靠的方法将更改保存回原始文件。文件系统访问 API 完全改变了这一点。它使 Web 应用程序能够直接在用户的本地文件系统上读取、写入和管理文件和目录——当然，需要用户许可。这为构建原生的文本编辑器、图像编辑器、IDE 和生产力工具打开了大门。&lt;/p&gt;</description></item><item><title>移动 Web 性能优化：2024 年技术</title><link>https://takao.blog/zh/web/mobile-performance/</link><pubDate>Thu, 26 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/mobile-performance/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/mobile-performance-zh.png" alt="Featured image of post 移动 Web 性能优化：2024 年技术" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;移动网络性能不再是次要问题。由于移动流量占全球网络流量的 60% 以上，并且在新兴市场中增长迅速，因此网站在移动设备上的性能特征直接影响用户保留率、转化率和搜索排名。用户期望快速、流畅的体验 - 53% 的人会放弃加载时间超过 3 秒的网站。本文涵盖了 2024 年优化移动 Web 性能的关键技术，从网络感知加载到触摸事件优化和 Core Web Vitals。&lt;/p&gt;</description></item><item><title>用于自动化的 Git Hooks：超越代码质量</title><link>https://takao.blog/zh/web/git-hooks-automation/</link><pubDate>Tue, 24 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-hooks-automation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-hooks-automation-zh.png" alt="Featured image of post 用于自动化的 Git Hooks：超越代码质量" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Git 挂钩是在 Git 生命周期中的特定点自动运行的可执行脚本。虽然许多开发人员仅将它们与代码格式化和 linting 联系起来，但它们的潜力远远超出了工作流程自动化、项目管理和团队协作。本文探讨了如何利用 Git hook 来实现全面的自动化策略。&lt;/p&gt;</description></item><item><title>TypeScript 路径别名：大规模清理导入</title><link>https://takao.blog/zh/web/typescript-path-aliases/</link><pubDate>Sun, 22 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-path-aliases/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-path-aliases-zh.png" alt="Featured image of post TypeScript 路径别名：大规模清理导入" /&gt;&lt;p&gt;TypeScript 路径别名消除了深度相对导入（如 &lt;code&gt;../../../utils/helpers&lt;/code&gt;）的痛苦，将其替换为干净的、揭示意图的路径（如 &lt;code&gt;@utils/helpers&lt;/code&gt;）。本文涵盖配置、捆绑程序集成、测试和迁移策略。&lt;/p&gt;</description></item><item><title>子资源完整性：保护您的 CDN 依赖项</title><link>https://takao.blog/zh/web/subresource-integrity/</link><pubDate>Fri, 20 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/subresource-integrity/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/subresource-integrity-zh.png" alt="Featured image of post 子资源完整性：保护您的 CDN 依赖项" /&gt;&lt;p&gt;子资源完整性 (SRI) 是一项安全功能，可让浏览器验证从 CDN 或第三方来源获取的资源是否未被篡改。在供应链攻击的时代——英国航空公司 Magecart 漏洞、Polyfill.io 泄露以及众多 CDN 事件——SRI 提供加密保证，确保您的页面加载的资源正是您想要的。&lt;/p&gt;</description></item><item><title>Node.js 性能监控：重要的指标</title><link>https://takao.blog/zh/web/nodejs-performance/</link><pubDate>Wed, 18 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nodejs-performance/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nodejs-performance-zh.png" alt="Featured image of post Node.js 性能监控：重要的指标" /&gt;&lt;p&gt;Node.js 性能监控需要采用与传统服务器环境不同的方法。单线程事件循环、垃圾收集内存模型和异步 I/O 创建了通用 CPU 和内存指标无法单独捕获的独特故障模式。本文介绍了保持 Node.js 应用程序在生产环境中平稳运行所需的基本指标和工具。&lt;/p&gt;</description></item><item><title>CSS 作用域样式：@scope 和封装策略</title><link>https://takao.blog/zh/web/css-scoped-styles/</link><pubDate>Sun, 15 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-scoped-styles/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-scoped-styles-zh.png" alt="Featured image of post CSS 作用域样式：@scope 和封装策略" /&gt;&lt;p&gt;CSS 范围界定一直是一个挑战。默认情况下，样式是全局级联的，这意味着一个组件中的选择器可能会无意中影响另一个组件中的元素。多年来，开发人员采用命名约定、构建时工具和完整的 DOM 隔离来解决这个问题。该工具包的最新成员是 CSS &lt;code&gt;@scope&lt;/code&gt; at 规则，它引入了基于邻近度的级联控制。本文比较了所有主要的范围界定策略，并帮助您选择正确的策略。&lt;/p&gt;</description></item><item><title>JavaScript 数组方法：从基础知识到高级模式</title><link>https://takao.blog/zh/web/js-array-methods/</link><pubDate>Thu, 12 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-array-methods/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-array-methods-zh.png" alt="Featured image of post JavaScript 数组方法：从基础知识到高级模式" /&gt;&lt;p&gt;JavaScript 数组是现代 Web 开发中数据操作的支柱。随着 ES2023 规范引入了长期变异方法的不可变替代方案，现在是重新审视我们如何使用数组的最佳时机。本文涵盖了数组方法的全部内容，从熟悉的 &lt;code&gt;map&lt;/code&gt;、&lt;code&gt;filter&lt;/code&gt; 和 &lt;code&gt;reduce&lt;/code&gt; 到前沿的添加，并提供了实际示例和性能见解。&lt;/p&gt;</description></item><item><title>安全 Cookie 配置：完整的 Web 开发人员指南</title><link>https://takao.blog/zh/web/secure-cookies/</link><pubDate>Mon, 09 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/secure-cookies/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/secure-cookies-zh.png" alt="Featured image of post 安全 Cookie 配置：完整的 Web 开发人员指南" /&gt;&lt;p&gt;Cookie 仍然是网络上最常配置错误的安全控制之一。单个缺失的属性可能会使您的应用程序遭受会话劫持、CSRF 或跨站点信息泄漏。现代浏览器已经推出了更严格的默认值，但了解每个属性并正确组合它们对于纵深防御至关重要。&lt;/p&gt;</description></item><item><title>React 并发功能：构建响应式 UI</title><link>https://takao.blog/zh/web/react-concurrent/</link><pubDate>Fri, 06 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-concurrent/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-concurrent-zh.png" alt="Featured image of post React 并发功能：构建响应式 UI" /&gt;&lt;p&gt;React 18 引入了并发功能，从根本上改变了渲染的工作方式。这些功能使 React 可以一次准备多个版本的 UI、中断正在进行的工作，并优先考虑紧急更新而不是非紧急更新。结果是应用程序响应速度更快，而无需放弃使 React 高效的声明式编程模型。&lt;/p&gt;</description></item><item><title>2024 年 GraphQL 与 REST：做出正确的选择</title><link>https://takao.blog/zh/web/graphql-vs-rest-2024/</link><pubDate>Tue, 03 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/graphql-vs-rest-2024/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/graphql-vs-rest-2024-zh.png" alt="Featured image of post 2024 年 GraphQL 与 REST：做出正确的选择" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;到 2024 年，GraphQL 和 REST 之间的争论已显着成熟。这两种方法都在不断发展，互相采用了彼此的功能，并找到了各自的定位。问题不再是哪个普遍优越，而是哪个适合您的特定项目环境。本文提供了平衡的比较，以帮助团队做出明智的 API 架构决策。&lt;/p&gt;</description></item><item><title>用于浏览器应用程序的 WebAssembly：超越炒作</title><link>https://takao.blog/zh/web/wasm-browser-apps/</link><pubDate>Sat, 30 Nov 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/wasm-browser-apps/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/wasm-browser-apps-zh.png" alt="Featured image of post 用于浏览器应用程序的 WebAssembly：超越炒作" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;WebAssembly 已经从一个小众的好奇心发展成为一个用于基于浏览器的应用程序的生产就绪工具。虽然早期的演示侧重于游戏引擎和科学模拟，但如今 Wasm 用于图像编辑器、视频转码器、压缩库和加密实用程序 - 所有这些都以接近本机的速度在浏览器中运行。&lt;/p&gt;</description></item><item><title>Git LFS：管理存储库中的大文件</title><link>https://takao.blog/zh/web/git-lfs/</link><pubDate>Tue, 26 Nov 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-lfs/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-lfs-zh.png" alt="Featured image of post Git LFS：管理存储库中的大文件" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Git 是为文本文件而不是大型二进制文件设计的。当大文件进入 Git 存储库时，克隆时间会增加，存储库大小会膨胀，并且 &lt;code&gt;git log&lt;/code&gt; 等操作会变慢。 Git LFS（大文件存储）通过用存储库中的文本指针文件替换大文件，同时将实际内容存储在远程服务器上来解决这个问题。&lt;/p&gt;</description></item><item><title>第三方脚本优化：抑制页面膨胀</title><link>https://takao.blog/zh/web/third-party-scripts/</link><pubDate>Tue, 19 Nov 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/third-party-scripts/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/third-party-scripts-zh.png" alt="Featured image of post 第三方脚本优化：抑制页面膨胀" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;第三方脚本是现代 Web 开发的隐性税收。平均页面加载15-25个第三方请求，占页面总权重的60-80%。来自 HTTP Archive 的数据证实第三方 JavaScript 的增长速度快于第一方代码。每个外部脚本都会增加网络延迟、解析和编译时间、主线程争用以及潜在的安全风险。好消息：您可以优化第三方脚本而不删除其功能。目标是最大限度地减少性能影响，同时保留业务价值。&lt;/p&gt;</description></item><item><title>用于生产的 Docker Compose：部署最佳实践</title><link>https://takao.blog/zh/web/docker-compose-production/</link><pubDate>Tue, 12 Nov 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-compose-production/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-compose-production-zh.png" alt="Featured image of post 用于生产的 Docker Compose：部署最佳实践" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Docker Compose 通常被归为本地开发，但它越来越多地用于中小型应用程序的单主机生产部署。 “Compose 不适用于生产”的常见批评忽略了一个关键点：对于许多工作负载，单个虚拟机上配置良好的 Compose 堆栈可以提供简单性和可靠性之间的适当平衡。&lt;/p&gt;</description></item><item><title>CSS 三角函数：样式表中的数学</title><link>https://takao.blog/zh/web/css-trig-functions/</link><pubDate>Tue, 05 Nov 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-trig-functions/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-trig-functions-zh.png" alt="Featured image of post CSS 三角函数：样式表中的数学" /&gt;&lt;p&gt;CSS 已经从一种简单的样式语言发展成为一种强大的计算引擎。 CSS 值和单位模块级别 4 中引入的三角函数（在 Chrome 111+、Firefox 108+ 和 Safari 15.4+ 中发布）标志着范式转变。开发人员现在可以直接在样式表中执行几何计算，无需预处理器或 JavaScript。&lt;/p&gt;</description></item><item><title>AI内容生成</title><link>https://takao.blog/zh/web/ai-content-generation/</link><pubDate>Tue, 29 Oct 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/ai-content-generation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/ai-content-generation-zh.png" alt="Featured image of post AI内容生成" /&gt;&lt;p&gt;AI content generation has moved from experimentation to production. Developers are no longer asking whether AI can generate content but how to integrate it reliably, at scale, and with quality control. This article provides a practical guide for building content systems with AI, focusing on technical architecture, quality assurance, and ethical deployment rather than prompt engineering tips.&lt;/p&gt;
&lt;h2 id="llm-powered-content-pipelines"&gt;LLM-Powered Content Pipelines
&lt;/h2&gt;&lt;p&gt;A well-architected AI content pipeline consists of several stages. It starts with content specification input including structured metadata, topic briefs, and tone guidelines. A prompt construction layer uses a template system with variable injection, guardrails, and few-shot examples. The LLM API dispatch routes requests to providers such as OpenAI, Anthropic, or open-source models via vLLM or Ollama. Post-processing handles format validation, content extraction, and cleanup before the result enters a human review queue.&lt;/p&gt;</description></item><item><title>打包体积优化</title><link>https://takao.blog/zh/web/bundle-size-optimization/</link><pubDate>Tue, 22 Oct 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/bundle-size-optimization/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/bundle-size-optimization-zh.png" alt="Featured image of post 打包体积优化" /&gt;&lt;p&gt;JavaScript bundle size directly impacts user experience. Larger bundles mean longer download times, slower parsing and compilation, and worse Core Web Vitals. A 100KB increase in JavaScript reduces conversion rates by 2 to 3 percent. Bundle optimization is an ongoing investment, not a one-time fix, and follows a cycle of analysis, identification, optimization, and monitoring.&lt;/p&gt;
&lt;h2 id="bundle-analysis-tools"&gt;Bundle Analysis Tools
&lt;/h2&gt;&lt;p&gt;Understanding what is in your bundle is the first step. webpack-bundle-analyzer provides an interactive treemap visualization that highlights large dependencies and duplicate modules. Vite users can leverage rollup-plugin-visualizer with sunburst and network graphs, while esbuild offers the &amp;ndash;metafile flag for detailed output analysis. source-map-explorer maps compiled code back to source files.&lt;/p&gt;</description></item><item><title>TypeScript 品牌类型：防止原始混乱</title><link>https://takao.blog/zh/web/typescript-branded-types/</link><pubDate>Tue, 15 Oct 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-branded-types/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-branded-types-zh.png" alt="Featured image of post TypeScript 品牌类型：防止原始混乱" /&gt;&lt;p&gt;TypeScript 使用结构类型（鸭子类型）：具有相同形状的两种类型可以互换。当基元类型返回域概念时，这会导致错误 - 在需要 &lt;code&gt;orderId&lt;/code&gt; 的地方传递 &lt;code&gt;userId&lt;/code&gt; ，两者都键入为 &lt;code&gt;string&lt;/code&gt; 。考虑一个发送电子邮件但意外收到数据库 ID 而不是地址的函数，因为两者都是 &lt;code&gt;string&lt;/code&gt;。品牌类型通过添加幻像类型标记来解决这个问题，该标记在编译时以零运行时成本区分结构相同的类型。&lt;/p&gt;</description></item><item><title>Next.js 国际化：路由和内容策略</title><link>https://takao.blog/zh/web/nextjs-i18n-routing/</link><pubDate>Tue, 08 Oct 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-i18n-routing/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-i18n-routing-zh.png" alt="Featured image of post Next.js 国际化：路由和内容策略" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;国际化是现代 Web 应用程序的基本要求。 Next.js 已将其 i18n 支持从 Pages Router 中的集成路由系统发展为 App Router 中灵活的基于中间件的方法。本文涵盖多语言 Next.js 应用程序的路由策略、区域设置检测、内容管理和 SEO 优化。&lt;/p&gt;</description></item><item><title>SQL注入预防：现代数据库安全指南</title><link>https://takao.blog/zh/web/sql-injection-prevention/</link><pubDate>Tue, 01 Oct 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/sql-injection-prevention/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/sql-injection-prevention-zh.png" alt="Featured image of post SQL注入预防：现代数据库安全指南" /&gt;&lt;p&gt;尽管人们已经意识到 SQL 注入数十年，但它仍然位居 OWASP 前 10 名之列。 2023 年至 2024 年期间，医疗保健、电子商务和政府部门发生了引人注目的涉及 SQLi 的违规事件。虽然经典的 &lt;code&gt;' OR 1=1 --&lt;/code&gt; 攻击众所周知，但现代变体包括二阶注入、盲目 SQLi（基于时间和基于布尔）和带外渗漏。预防措施很容易理解，但由于遗留代码、ORM 滥用和测试自动化不足而执行不力。&lt;/p&gt;</description></item><item><title>Monorepo 管理与 Turborepo：扩展开发</title><link>https://takao.blog/zh/web/monorepo-turborepo/</link><pubDate>Tue, 24 Sep 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/monorepo-turborepo/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/monorepo-turborepo-zh.png" alt="Featured image of post Monorepo 管理与 Turborepo：扩展开发" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;随着 JavaScript monorepos 的增长，构建时间螺旋式上升，CI 管道饱和，开发人员生产力下降。由 Vercel 创建的 Turborepo 通过智能缓存和并行任务执行来解决这些挑战。与 Lerna 或 Nx 不同，Turborepo 专注于成为任务运行程序而不是构建工具，将编译委托给 esbuild、webpack 和 tsc 等工具。&lt;/p&gt;</description></item><item><title>无服务器架构模式：超越 Lambda 函数</title><link>https://takao.blog/zh/web/serverless-patterns/</link><pubDate>Tue, 17 Sep 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/serverless-patterns/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/serverless-patterns-zh.png" alt="Featured image of post 无服务器架构模式：超越 Lambda 函数" /&gt;&lt;p&gt;无服务器计算的发展已经远远超出了用 API Gateway 背后的 Lambda 函数取代简单的 REST API 的范围。现代无服务器架构是完全事件驱动的、异步的，并将单体分解为协调的功能工作流程。主要企业现在在 AWS Lambda、Azure Functions 和 Cloudflare Workers 上运行生产工作负载。本文探讨了超越基础知识的模式。&lt;/p&gt;</description></item><item><title>JavaScript 类型数组：浏览器中的二进制数据处理</title><link>https://takao.blog/zh/web/js-typed-arrays/</link><pubDate>Tue, 10 Sep 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-typed-arrays/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-typed-arrays-zh.png" alt="Featured image of post JavaScript 类型数组：浏览器中的二进制数据处理" /&gt;&lt;p&gt;JavaScript 的原生 &lt;code&gt;Number&lt;/code&gt; 类型（IEEE 754 双精度浮点数）对于二进制数据来说效率低下。早期的解决方案涉及在普通数组中手动​​打包字节，这种方法速度慢且容易出错。 ECMAScript 2015 正式化了类型数组，为 JavaScript 带来了类似 C 的内存管理。这种三层架构 — &lt;code&gt;ArrayBuffer&lt;/code&gt;、TypedArray 视图和 &lt;code&gt;DataView&lt;/code&gt; — 支持在浏览器和 Node.js 中进行高性能二进制数据处理。&lt;/p&gt;</description></item><item><title>React 门户：模态和叠加的高级模式</title><link>https://takao.blog/zh/web/react-portal-patterns/</link><pubDate>Tue, 03 Sep 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-portal-patterns/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-portal-patterns-zh.png" alt="Featured image of post React 门户：模态和叠加的高级模式" /&gt;&lt;p&gt;React 门户解决了一个基本问题：DOM 层次结构约束。在深度嵌套组件内呈现的模态框继承其父级的 &lt;code&gt;z-index&lt;/code&gt; 堆叠上下文，并且可以通过 &lt;code&gt;overflow: hidden&lt;/code&gt; 进行剪辑。门户允许您将子级渲染到不同的 DOM 节点，同时保留 React 树，因此上下文、事件处理和组件生命周期都按预期工作。&lt;/p&gt;</description></item><item><title>Docker 网络：从桥接网络到覆盖网络</title><link>https://takao.blog/zh/web/docker-networking/</link><pubDate>Tue, 27 Aug 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-networking/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-networking-zh.png" alt="Featured image of post Docker 网络：从桥接网络到覆盖网络" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Docker 容器被设计为可移植和隔离的，但它们很少单独运行。容器需要相互通信、与主机系统以及外部服务通信。了解 Docker 的网络模型对于构建可靠、安全和高性能的容器化应用程序至关重要。&lt;/p&gt;</description></item><item><title>CSS Popover API：无需 JavaScript 的原生覆盖</title><link>https://takao.blog/zh/web/css-popover-api/</link><pubDate>Tue, 20 Aug 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-popover-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-popover-api-zh.png" alt="Featured image of post CSS Popover API：无需 JavaScript 的原生覆盖" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;传统上，构建工具提示、下拉菜单和模式等叠加层需要大量 JavaScript。开发人员依赖 CSS &lt;code&gt;position: absolute&lt;/code&gt; 进行手动坐标计算、ARIA 属性以实现可访问性，以及特定于框架的解决方案（例如 React 门户或浮动 UI）。 CSS Popover API 改变了这一点，它提供了一种原生的声明性方式来创建覆盖层，无需任何 JavaScript 即可处理定位、显示/隐藏切换、焦点管理和灯光关闭。&lt;/p&gt;</description></item><item><title>Proxmox VE ZFS 存储：池设置、快照和优化</title><link>https://takao.blog/zh/web/proxmox-zfs-storage/</link><pubDate>Wed, 14 Aug 2024 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/proxmox-zfs-storage/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/proxmox-zfs-storage-zh.png" alt="Featured image of post Proxmox VE ZFS 存储：池设置、快照和优化" /&gt;&lt;h2 id="为什么在-proxmox-上使用-zfs"&gt;为什么在 Proxmox 上使用 ZFS
&lt;/h2&gt;&lt;p&gt;ZFS 为 Proxmox VE 带来了企业级功能：通过校验和实现数据完整性（检测并修复静默损坏）、透明压缩、即时快照和克隆以及灵活的类似 RAID 池。它用单个统一的堆栈取代了传统的卷管理和文件系统层。&lt;/p&gt;</description></item><item><title>TypeScript 项目参考：扩展大型代码库</title><link>https://takao.blog/zh/web/typescript-project-references/</link><pubDate>Tue, 13 Aug 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-project-references/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-project-references-zh.png" alt="Featured image of post TypeScript 项目参考：扩展大型代码库" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;随着 TypeScript 代码库的增长，单一的 &lt;code&gt;tsconfig.json&lt;/code&gt; 方法会崩溃。每次调用 &lt;code&gt;tsc&lt;/code&gt; 都会进行类型检查并发出整个项目 - 即使在大型 monorepos 中使用 &lt;code&gt;--noEmit&lt;/code&gt; ，这个过程也可能需要几分钟的时间。更糟糕的是，没有模块边界，任何文件都可以导入任何其他文件，从而创建难以重构的混乱依赖关系图。 &lt;strong&gt;TypeScript 项目参考&lt;/strong&gt; 通过允许您将代码库拆分为独立的子项目（每个子项目都有自己的 &lt;code&gt;tsconfig.json&lt;/code&gt;）来解决此问题，从而实现增量构建、强制执行 API 边界以及显着加快类型检查速度。&lt;/p&gt;</description></item><item><title>Node.js 日志记录最佳实践：结构化且可扩展</title><link>https://takao.blog/zh/web/nodejs-logging/</link><pubDate>Tue, 06 Aug 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nodejs-logging/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nodejs-logging-zh.png" alt="Featured image of post Node.js 日志记录最佳实践：结构化且可扩展" /&gt;&lt;p&gt;生产级日志记录是 Node.js 应用程序开发中最容易被忽视的方面之一。虽然 &lt;code&gt;console.log&lt;/code&gt; 适用于本地调试，但它在日志必须可搜索、结构化和可操作的分布式环境中会崩溃。本文介绍了构建可扩展的日志记录策略的基本模式。&lt;/p&gt;</description></item><item><title>使用 TensorFlow.js 在浏览器中进行机器学习</title><link>https://takao.blog/zh/web/ml-in-browser/</link><pubDate>Tue, 30 Jul 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/ml-in-browser/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/ml-in-browser-zh.png" alt="Featured image of post 使用 TensorFlow.js 在浏览器中进行机器学习" /&gt;&lt;p&gt;浏览器中的机器学习消除了服务器成本，保护用户隐私，并支持离线智能应用程序。 TensorFlow.js 通过由 WebGL 和 WebGPU 后端提供支持的 GPU 加速推理和训练，为 JavaScript 开发人员带来了 ML。本文涵盖加载预训练模型、迁移学习、实时姿态检测和生产部署注意事项。&lt;/p&gt;</description></item><item><title>Web 蓝牙 API：从浏览器连接硬件</title><link>https://takao.blog/zh/web/web-bluetooth-api/</link><pubDate>Tue, 23 Jul 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/web-bluetooth-api/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/web-bluetooth-api-zh.png" alt="Featured image of post Web 蓝牙 API：从浏览器连接硬件" /&gt;&lt;p&gt;Web 蓝牙 API 将硬件交互引入浏览器，使 Web 应用程序能够与蓝牙低功耗 (BLE) 设备进行通信。这开辟了物联网用例，例如直接从网页连接心率监视器、温度传感器和智能灯。&lt;/p&gt;</description></item><item><title>容器安全</title><link>https://takao.blog/zh/web/container-security/</link><pubDate>Tue, 16 Jul 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/container-security/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/container-security-zh.png" alt="Featured image of post 容器安全" /&gt;&lt;p&gt;Container security is no longer optional. With supply chain attacks on the rise, securing container images from build to runtime is a fundamental requirement for any organization running containerized workloads. Runtime security alone is insufficient; supply chain security must start at the image build stage.&lt;/p&gt;
&lt;h2 id="the-container-supply-chain-threat-landscape"&gt;The Container Supply Chain Threat Landscape
&lt;/h2&gt;&lt;p&gt;Attack vectors in the container supply chain include compromised base images, vulnerable dependencies, leaked secrets, and malicious packages. Real-world incidents such as the Codecov breach exposing credentials, dependency confusion attacks, and cryptominers found in public images highlight the severity of these threats. The shared responsibility model means that while platforms like Docker provide base infrastructure, the security of your built images is your responsibility.&lt;/p&gt;</description></item><item><title>JavaScript 模块联盟：微前端实践</title><link>https://takao.blog/zh/web/module-federation/</link><pubDate>Tue, 09 Jul 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/module-federation/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/module-federation-zh.png" alt="Featured image of post JavaScript 模块联盟：微前端实践" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Webpack 5 中引入的模块联合提供了用于构建微前端架构的运行时集成机制。与构建时集成方法不同，它使独立部署的应用程序能够在运行时共享代码，从而促进团队自治和增量迁移，而无需协调发布。&lt;/p&gt;</description></item><item><title>2024 年图像优化策略：AVIF、WebP 及其他</title><link>https://takao.blog/zh/web/image-optimization-2024/</link><pubDate>Tue, 02 Jul 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/image-optimization-2024/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/image-optimization-2024-zh.png" alt="Featured image of post 2024 年图像优化策略：AVIF、WebP 及其他" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;图片占典型网页总重量的一半以上。随着 Web 应用程序变得更加可视化，优化图像交付对于性能、用户体验和 Core Web Vitals 分数变得至关重要。本文探讨了现代图像优化策略，从下一代格式到响应式交付技术。&lt;/p&gt;</description></item><item><title>CSS 滚动驱动的动画：基于滚动的效果的未来</title><link>https://takao.blog/zh/web/css-scroll-driven-animations/</link><pubDate>Tue, 25 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-scroll-driven-animations/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-scroll-driven-animations-zh.png" alt="Featured image of post CSS 滚动驱动的动画：基于滚动的效果的未来" /&gt;&lt;h2 id="javascript-滚动事件的问题"&gt;JavaScript 滚动事件的问题
&lt;/h2&gt;&lt;p&gt;传统上，基于滚动的效果依赖于在主线程上运行的 JavaScript 滚动事件侦听器，这通常会导致卡顿、丢帧和糟糕的用户体验。即使有被动侦听器和 &lt;code&gt;requestAnimationFrame&lt;/code&gt; 限制，布局抖动仍然是一个持续存在的问题。 CSS 滚动驱动动画通过将滚动跟踪移动到合成器线程来解决这个问题，从而实现流畅的 60fps 效果，而无需任何 JavaScript 开销。&lt;/p&gt;</description></item><item><title>使用 Vaultwarden 和 Bitwarden SSH 代理管理 SSH 密钥</title><link>https://takao.blog/zh/web/vaultwarden-ssh-key/</link><pubDate>Thu, 20 Jun 2024 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/vaultwarden-ssh-key/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/vaultwarden-ssh-key-zh.png" alt="Featured image of post 使用 Vaultwarden 和 Bitwarden SSH 代理管理 SSH 密钥" /&gt;&lt;h2 id="为什么将-ssh-密钥存储在密码管理器中"&gt;为什么将 SSH 密钥存储在密码管理器中
&lt;/h2&gt;&lt;p&gt;SSH 密钥是对远程服务器、Git 提供商和内部基础设施进行身份验证的黄金标准。然而，大多数开发人员将它们作为普通文件存储在 &lt;code&gt;~/.ssh/&lt;/code&gt; 下 - 不受保护、未同步且未经审核。将 SSH 密钥移至 Vaultwarden（或 Bitwarden）解决了三个基本问题：&lt;/p&gt;</description></item><item><title>Next.js 中间件：路由、身份验证和边缘计算</title><link>https://takao.blog/zh/web/nextjs-middleware/</link><pubDate>Tue, 18 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-middleware/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-middleware-zh.png" alt="Featured image of post Next.js 中间件：路由、身份验证和边缘计算" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Next.js 中间件在每个请求之前执行，在边缘或无服务器区域运行。项目根目录下的单个 &lt;code&gt;middleware.ts&lt;/code&gt; 文件会拦截传入请求，并可以在请求到达匹配路由之前重定向、重写、操作标头或执行身份验证检查。&lt;/p&gt;</description></item><item><title>星露谷物语：农场与冒险新手指南</title><link>https://takao.blog/zh/game/stardew-valley/</link><pubDate>Sat, 15 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/stardew-valley/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/stardew-valley-zh.png" alt="Featured image of post 星露谷物语：农场与冒险新手指南" /&gt;&lt;h1 id="stardew-valley-beginners-guide-to-farming-and-adventure"&gt;Stardew Valley: Beginner&amp;rsquo;s Guide to Farming and Adventure
&lt;/h1&gt;&lt;h2 id="getting-started-your-first-day"&gt;Getting Started: Your First Day
&lt;/h2&gt;&lt;p&gt;You inherit your grandfather&amp;rsquo;s old farm in Stardew Valley with nothing but a few parsnip seeds and a rusty hoe. Your first task is to clear a small patch of soil, plant your parsnips, and water them daily. Parsnips take only 4 days to grow and sell for 35g each, making them the perfect starter crop.&lt;/p&gt;
&lt;p&gt;Visit Pierre&amp;rsquo;s General Store to buy additional seeds. The most profitable spring crops for beginners are:&lt;/p&gt;</description></item><item><title>CSS @layer：使用层架构管理级联</title><link>https://takao.blog/zh/web/css-layer-architecture/</link><pubDate>Tue, 11 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-layer-architecture/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-layer-architecture-zh.png" alt="Featured image of post CSS @layer：使用层架构管理级联" /&gt;&lt;p&gt;如果您曾经在大型 CSS 项目中经历过特殊性战争 - 覆盖第三方样式、散布 &lt;code&gt;!important&lt;/code&gt; 声明，或者重组 HTML 只是为了赢得级联 - &lt;code&gt;@layer&lt;/code&gt; 就是您一直在等待的解决方案。 CSS &lt;code&gt;@layer&lt;/code&gt; at 规则使开发人员能够明确控制级联顺序，而与特殊性或源顺序无关。&lt;/p&gt;</description></item><item><title>JavaScript 代理和 Reflect API：元编程模式</title><link>https://takao.blog/zh/web/js-proxy-reflect/</link><pubDate>Tue, 04 Jun 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-proxy-reflect/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-proxy-reflect-zh.png" alt="Featured image of post JavaScript 代理和 Reflect API：元编程模式" /&gt;&lt;p&gt;JavaScript 的 &lt;code&gt;Proxy&lt;/code&gt; 和 &lt;code&gt;Reflect&lt;/code&gt; API 是该语言中最强大的元编程工具之一。它们允许开发人员拦截和自定义对象的基本操作——属性访问、赋值、枚举、函数调用，甚至构造函数调用。本文探讨了所有 13 个代理陷阱、互补的 &lt;code&gt;Reflect&lt;/code&gt; API 以及 Vue 3、MobX 和 Immer 等生产框架中使用的真实模式。&lt;/p&gt;</description></item><item><title>AI代码审查工具</title><link>https://takao.blog/zh/web/ai-code-review-tools/</link><pubDate>Tue, 28 May 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/ai-code-review-tools/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/ai-code-review-tools-zh.png" alt="Featured image of post AI代码审查工具" /&gt;&lt;p&gt;Code review remains one of the most effective practices for improving software quality, yet it is time-consuming and subject to human fatigue. In 2024, AI-powered code review tools have matured significantly, offering automated analysis that complements human reviewers. This article surveys the leading tools, their capabilities, integration patterns, and guidance for incorporating them into development workflows.&lt;/p&gt;
&lt;h2 id="github-copilot-code-review"&gt;GitHub Copilot Code Review
&lt;/h2&gt;&lt;p&gt;GitHub Copilot&amp;rsquo;s code review capabilities extend well beyond inline code completion. The Copilot Chat integration provides pull request-level analysis including automated summaries of changes, specific improvement recommendations with code examples, security vulnerability identification within diffs, and consistency checks against project conventions. You can trigger a Copilot review directly from the CLI:&lt;/p&gt;</description></item><item><title>Proxmox LXC 容器：完整管理指南</title><link>https://takao.blog/zh/web/proxmox-lxc-containers/</link><pubDate>Wed, 22 May 2024 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/proxmox-lxc-containers/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/proxmox-lxc-containers-zh.png" alt="Featured image of post Proxmox LXC 容器：完整管理指南" /&gt;&lt;h2 id="什么是lxc"&gt;什么是LXC？
&lt;/h2&gt;&lt;p&gt;LXC（Linux 容器）是一种操作系统级虚拟化方法，它使用共享内核在单个主机上运行多个隔离的 Linux 系统。与完整虚拟机不同，LXC 容器共享主机操作系统内核，同时维护自己的文件系统、进程和网络堆栈。这种设计使它们极其轻便且启动速度快。&lt;/p&gt;</description></item><item><title>Git Squash Merge：团队的清理历史策略</title><link>https://takao.blog/zh/web/git-squash-merge/</link><pubDate>Tue, 21 May 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-squash-merge/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-squash-merge-zh.png" alt="Featured image of post Git Squash Merge：团队的清理历史策略" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Git 历史记录是您的团队和未来的您的沟通工具。干净、可读的历史记录使调试、代码审查和发布管理变得更加容易。挤压合并是维护干净历史的主要策略之一，但了解何时以及如何使用它以及何时选择替代方案需要了解所涉及的权衡。本文提供了团队压缩合并策略的综合指南。&lt;/p&gt;</description></item><item><title>用于实时应用程序的 WebSocket：完整指南</title><link>https://takao.blog/zh/web/websocket-applications/</link><pubDate>Tue, 14 May 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/websocket-applications/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/websocket-applications-zh.png" alt="Featured image of post 用于实时应用程序的 WebSocket：完整指南" /&gt;&lt;p&gt;实时功能已成为现代 Web 应用程序的基本期望。 WebSocket 通过单个 TCP 连接提供全双工通信通道，从而实现客户端和服务器之间的低延迟数据交换。本指南涵盖了 WebSocket 协议、实现模式、扩展策略以及构建生产级实时应用程序的实际注意事项。&lt;/p&gt;</description></item><item><title>API速率限制</title><link>https://takao.blog/zh/web/api-rate-limiting/</link><pubDate>Tue, 07 May 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/api-rate-limiting/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/api-rate-limiting-zh.png" alt="Featured image of post API速率限制" /&gt;&lt;p&gt;Rate limiting is a critical component of any production API. It protects backend services from abuse, ensures fair resource allocation, maintains performance under load, and mitigates denial-of-service attacks. This article examines the major rate limiting algorithms, their trade-offs, and best practices for designing robust systems.&lt;/p&gt;
&lt;h2 id="token-bucket-algorithm"&gt;Token Bucket Algorithm
&lt;/h2&gt;&lt;p&gt;The token bucket is one of the most widely used rate limiting algorithms. A bucket holds tokens that refill at a steady rate, and each request consumes one token. If the bucket is empty, the request is denied. This approach allows bursts up to the bucket capacity while smoothing traffic over time.&lt;/p&gt;</description></item><item><title>LLM 即时工程：开发人员实用指南</title><link>https://takao.blog/zh/web/llm-prompt-engineering/</link><pubDate>Tue, 30 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/llm-prompt-engineering/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/llm-prompt-engineering-zh.png" alt="Featured image of post LLM 即时工程：开发人员实用指南" /&gt;&lt;p&gt;快速工程已成为开发人员使用大型语言模型构建应用程序的一项基本技能。随着法学硕士更深入地融入软件产品，有效的即时设计直接影响输出质量、可靠性和成本。本文提供了实用的、以开发人员为中心的指南，以促进在生产中发挥作用的工程技术。&lt;/p&gt;</description></item><item><title>Node.js 工作线程：并行处理实践</title><link>https://takao.blog/zh/web/nodejs-worker-threads/</link><pubDate>Tue, 23 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nodejs-worker-threads/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nodejs-worker-threads-zh.png" alt="Featured image of post Node.js 工作线程：并行处理实践" /&gt;&lt;p&gt;Node.js 传统上是单线程的，依赖异步 I/O 来实现并发。虽然此模型擅长处理 I/O 密集型工作负载，但 CPU 密集型操作会阻止事件循环并降低应用程序响应能力。在 Node.js 12 中稳定的工作线程通过在单独的 V8 隔离中运行 JavaScript 来在单个进程中提供真正的并行执行。本文介绍了在生产中使用工作线程的实用模式。&lt;/p&gt;</description></item><item><title>GitHub Actions Advanced：超越 CI/CD 基础知识的工作流程</title><link>https://takao.blog/zh/web/github-actions-advanced/</link><pubDate>Tue, 16 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/github-actions-advanced/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/github-actions-advanced-zh.png" alt="Featured image of post GitHub Actions Advanced：超越 CI/CD 基础知识的工作流程" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;GitHub Actions 已经从一个简单的 CI/CD 工具发展成为一个全面的自动化平台。虽然基本工作流程有详细记录，但该平台的高级功能（可重用工作流程、复合操作、矩阵策略和部署模式）支持复杂的自动化管道。本文探讨了构建复杂 CI/CD 系统的团队的这些高级功能。&lt;/p&gt;</description></item><item><title>附表一</title><link>https://takao.blog/zh/game/schedule-i/</link><pubDate>Mon, 15 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/schedule-i/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/schedule-i-zh.png" alt="Featured image of post 附表一" /&gt;&lt;h1 id="附表一开放世界毒品帝国游戏完整指南"&gt;附表一：开放世界毒品帝国游戏完整指南
&lt;/h1&gt;&lt;p&gt;Schedule I 是一款由澳大利亚独立开发商TVGS（Tyler&amp;rsquo;s Video Game Studios）开发和发行的开放世界犯罪模拟游戏。该游戏于 2025 年 3 月 24 日通过 Steam 推出 Windows 版抢先体验版，第一周内同时在线玩家数量飙升至超过 400,000 名，并获得超过 190,000 条评论的“压倒性积极”评级。 《附表 I》以肮脏的西海岸城市海兰角为背景，结合了商业管理、战术策略和黑色喜剧，玩家从无到有地建立了一个毒品帝国。&lt;/p&gt;</description></item><item><title>CSS 自定义属性：可扩展样式的策略模式</title><link>https://takao.blog/zh/web/css-custom-properties/</link><pubDate>Tue, 09 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-custom-properties/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-custom-properties-zh.png" alt="Featured image of post CSS 自定义属性：可扩展样式的策略模式" /&gt;&lt;p&gt;CSS 自定义属性（也称为 CSS 变量）从根本上改变了我们编写和维护样式表的方式。与 Sass 或 Less 中的预处理器变量不同，自定义属性是实时的、动态的，并且参与级联和继承。本文探讨了在生产应用程序中使用它们的战略模式——从设计令牌管理到运行时操作。&lt;/p&gt;</description></item><item><title>WebAuthn和密钥：2024年的无密码身份验证</title><link>https://takao.blog/zh/web/webauthn-passkeys/</link><pubDate>Tue, 02 Apr 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/webauthn-passkeys/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/webauthn-passkeys-zh.png" alt="Featured image of post WebAuthn和密钥：2024年的无密码身份验证" /&gt;&lt;p&gt;几十年来，密码一直是主要的身份验证机制，但它们存在着可查的安全性和可用性问题。WebAuthn（Web 验证）和新兴的密钥生态系统有望用加密安全、防网络钓鱼的身份验证取代密码。到2024年，所有主要平台的密钥支持都已达到关键点，这使得现在实施无密码身份验证的理想时机。&lt;/p&gt;</description></item><item><title>Next.js 图像优化：从设置到高级模式</title><link>https://takao.blog/zh/web/nextjs-image-optimization/</link><pubDate>Tue, 26 Mar 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nextjs-image-optimization/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nextjs-image-optimization-zh.png" alt="Featured image of post Next.js 图像优化：从设置到高级模式" /&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;图片平均占网页总字节数的 50% 以上，因此优化对于性能至关重要。 Next.js 通过 &lt;code&gt;next/image&lt;/code&gt; 组件及其内置图像优化 API 提供全面的图像优化管道。本文涵盖设置、配置和高级模式，重点关注 Core Web Vitals 的影响。&lt;/p&gt;</description></item><item><title>2024 年的 React 状态管理：选择正确的工具</title><link>https://takao.blog/zh/web/react-state-management-2024/</link><pubDate>Tue, 19 Mar 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-state-management-2024/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-state-management-2024-zh.png" alt="Featured image of post 2024 年的 React 状态管理：选择正确的工具" /&gt;&lt;p&gt;到 2024 年，React 的状态管理环境已经成熟，选择正确的工具只是了解状态类别而不是选择获胜者。核心库为本地问题提供 &lt;code&gt;useState&lt;/code&gt; 和 &lt;code&gt;useReducer&lt;/code&gt; ，而生态系统为全局 UI 状态和服务器状态提供专门的解决方案。关键的见解是，不同类别的状态受益于不同的工具，适当地混合它们会产生最可维护的应用程序。&lt;/p&gt;</description></item><item><title>Vaultwarden：自托管密码管理器安装指南</title><link>https://takao.blog/zh/web/vaultwarden-install/</link><pubDate>Fri, 15 Mar 2024 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/vaultwarden-install/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/vaultwarden-install-zh.png" alt="Featured image of post Vaultwarden：自托管密码管理器安装指南" /&gt;&lt;h2 id="避难所守护者是什么"&gt;避难所守护者是什么？
&lt;/h2&gt;&lt;p&gt;Vaultwarden 是 Bitwarden 服务器 API 的开源、自托管实现，用 Rust 编写。与需要 Microsoft SQL Server 数据库和大量系统资源的官方 Bitwarden 服务器相比，它的设计是轻量级且资源高效的。 Vaultwarden 支持所有官方 Bitwarden 客户端——桌面、浏览器扩展、移动应用程序和 CLI——无需任何修改。&lt;/p&gt;</description></item><item><title>ES2024 新功能：JavaScript 的新功能</title><link>https://takao.blog/zh/web/es2024-new-features/</link><pubDate>Tue, 12 Mar 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/es2024-new-features/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/es2024-new-features-zh.png" alt="Featured image of post ES2024 新功能：JavaScript 的新功能" /&gt;&lt;p&gt;ECMAScript 2024 (ES15) 为 JavaScript 引入了几个期待已久的功能。本文通过实际示例和采用时间表指南介绍了新功能。&lt;/p&gt;
&lt;h2 id="数组分组objectgroupby-和-mapgroupby"&gt;数组分组：Object.groupBy 和 Map.groupBy
&lt;/h2&gt;&lt;p&gt;最受欢迎的 JavaScript 功能之一终于到来了。 &lt;code&gt;Object.groupBy&lt;/code&gt; 和 &lt;code&gt;Map.groupBy&lt;/code&gt; 根据回调将数组元素划分为组：&lt;/p&gt;</description></item><item><title>TypeScript 通用约束：构建类型安全的 API</title><link>https://takao.blog/zh/web/typescript-generic-constraints/</link><pubDate>Tue, 05 Mar 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-generic-constraints/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-generic-constraints-zh.png" alt="Featured image of post TypeScript 通用约束：构建类型安全的 API" /&gt;&lt;p&gt;TypeScript 泛型允许您编写可重用、类型安全的代码，但如果没有约束，它们就过于宽松了。 &lt;code&gt;extends&lt;/code&gt; 关键字将类型参数限制为具有特定属性的形状，为您提供灵活性和安全性。&lt;/p&gt;</description></item><item><title>ESLint Flat Config：旧版 .eslintrc 的迁移指南</title><link>https://takao.blog/zh/web/eslint-flat-config/</link><pubDate>Mon, 26 Feb 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/eslint-flat-config/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/eslint-flat-config-zh.png" alt="Featured image of post ESLint Flat Config：旧版 .eslintrc 的迁移指南" /&gt;&lt;p&gt;ESLint v9.0 于 2024 年发布，将平面配置系统 (&lt;code&gt;eslint.config.js&lt;/code&gt;) 设为默认值，取代了已使用十多年的旧版 &lt;code&gt;.eslintrc&lt;/code&gt; 格式。本迁移指南涵盖了完整的迁移过程、新概念和实际示例。&lt;/p&gt;
&lt;h2 id="为什么采用扁平化配置"&gt;为什么采用扁平化配置？
&lt;/h2&gt;&lt;p&gt;遗留的 &lt;code&gt;.eslintrc&lt;/code&gt; 系统存在几个问题：配置级联使行为变得不可预测，基于目录的解析很复杂，JSON/YAML 缺乏对函数和注释的支持，以及难以编写可共享的配置。扁平配置通过单个配置文件、通过 JavaScript 数组的显式组合、简化的插件解析和完整的 JavaScript 原生语法来解决这些问题。&lt;/p&gt;</description></item><item><title>幻兽帕鲁</title><link>https://takao.blog/zh/game/palworld/</link><pubDate>Tue, 20 Feb 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/palworld/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/palworld-zh.png" alt="Featured image of post 幻兽帕鲁" /&gt;&lt;h1 id="palworld-the-pokémon-with-guns-survival-game-guide"&gt;Palworld: The Pokémon-with-Guns Survival Game Guide
&lt;/h1&gt;&lt;h2 id="overview"&gt;Overview
&lt;/h2&gt;&lt;p&gt;&lt;em&gt;Palworld&lt;/em&gt;, developed by Pocket Pair, launched into Early Access in January 2024 and became an instant phenomenon. Blending creature collection, open-world survival, third-person shooting, and base-building automation, the game has been described as &amp;ldquo;Pokémon with guns&amp;rdquo; — though it goes far deeper than that label suggests. Set across sprawling islands inhabited by over 100 species of Pals, players must gather resources, build bases, craft weapons, and fight alongside their captured creatures against hostile factions and towering boss Pals.&lt;/p&gt;</description></item><item><title>JavaScript 事件循环深入探讨：微任务、宏任务及其他</title><link>https://takao.blog/zh/web/js-event-loop/</link><pubDate>Mon, 19 Feb 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-event-loop/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-event-loop-zh.png" alt="Featured image of post JavaScript 事件循环深入探讨：微任务、宏任务及其他" /&gt;&lt;p&gt;JavaScript 事件循环是该语言中最重要但又被误解的概念之一。尽管 JavaScript 是单线程的，但它的事件循环通过复杂的队列系统实现了非阻塞并发。本文构建了 JavaScript 如何处理异步执行的完整心智模型，从调用堆栈到微任务队列以及其间的所有内容。&lt;/p&gt;</description></item><item><title>Proxmox VE 虚拟机管理：从创建到优化</title><link>https://takao.blog/zh/web/proxmox-vm-management/</link><pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/proxmox-vm-management/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/proxmox-vm-management-zh.png" alt="Featured image of post Proxmox VE 虚拟机管理：从创建到优化" /&gt;&lt;h2 id="逐步创建虚拟机"&gt;逐步创建虚拟机
&lt;/h2&gt;&lt;p&gt;Proxmox VE 提供了用于创建 VM 的引导向导，可通过 &lt;strong&gt;创建 VM&lt;/strong&gt; 的 Web UI 或通过 &lt;code&gt;qm&lt;/code&gt; CLI 工具进行访问。该向导将逐步完成八个配置页面。&lt;/p&gt;
&lt;h3 id="一般的"&gt;一般的
&lt;/h3&gt;&lt;p&gt;设置唯一的 VM ID（整数，通常从 100 开始）和描述性名称。该名称不会影响访客网络——它纯粹是为了识别。 （可选）选择资源池来组织相关虚拟机。&lt;/p&gt;</description></item><item><title>Service Workers：Web 应用程序的高级离线策略</title><link>https://takao.blog/zh/web/service-workers-offline/</link><pubDate>Mon, 12 Feb 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/service-workers-offline/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/service-workers-offline-zh.png" alt="Featured image of post Service Workers：Web 应用程序的高级离线策略" /&gt;&lt;p&gt;Service Worker 是支持离线的渐进式 Web 应用程序的基础。随着 Chrome、Firefox、Safari 和 Edge 浏览器的普遍支持，构建弹性离线体验是一项生产要求，而不是逐步增强。本指南涵盖了缓存、同步和离线优先架构的高级策略。&lt;/p&gt;</description></item><item><title>Vite插件开发：从零到量产</title><link>https://takao.blog/zh/web/vite-plugin-dev/</link><pubDate>Mon, 05 Feb 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/vite-plugin-dev/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/vite-plugin-dev-zh.png" alt="Featured image of post Vite插件开发：从零到量产" /&gt;&lt;p&gt;Vite 的插件系统是其最强大的功能之一，允许开发人员扩展和自定义构建管道。无论您需要转换文件类型、注入构建时常量还是与其他工具集成，Vite 插件 API 都可以让您完全控制。&lt;/p&gt;</description></item><item><title>OAuth 2.0 和 OpenID Connect：现代身份验证指南</title><link>https://takao.blog/zh/web/oauth-oidc/</link><pubDate>Mon, 29 Jan 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/oauth-oidc/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/oauth-oidc-zh.png" alt="Featured image of post OAuth 2.0 和 OpenID Connect：现代身份验证指南" /&gt;&lt;p&gt;OAuth 2.0 和 OpenID Connect 构成了现代 Web 身份验证和授权的支柱。尽管它们无处不在，但这些协议经常被误解和错误配置，导致出现可预防的安全漏洞。本指南涵盖了将身份验证安全地集成到应用程序中所需的核心概念、实施模式和安全最佳实践。&lt;/p&gt;</description></item><item><title>Git 子模块：有效管理嵌套存储库</title><link>https://takao.blog/zh/web/git-submodules/</link><pubDate>Mon, 22 Jan 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/git-submodules/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/git-submodules-zh.png" alt="Featured image of post Git 子模块：有效管理嵌套存储库" /&gt;&lt;p&gt;Git 子模块允许您将一个 Git 存储库嵌套在另一个 Git 存储库中，同时为每个存储库维护独立的版本控制。它们对于管理共享库、第三方依赖项或需要精确提交级别控制的配置集合非常有用。然而，子模块具有复杂性，需要了解其底层机制。&lt;/p&gt;</description></item><item><title>Core Web Vitals核心网页指标</title><link>https://takao.blog/zh/web/core-web-vitals/</link><pubDate>Mon, 15 Jan 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/core-web-vitals/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/core-web-vitals-zh.png" alt="Featured image of post Core Web Vitals核心网页指标" /&gt;&lt;p&gt;Core Web Vitals (CWV) are the set of user-centric performance metrics that Google uses to measure real-world experience on the web. In March 2024, Google replaced First Input Delay (FID) with Interaction to Next Paint (INP), making it critical to understand all three metrics: Largest Contentful Paint (LCP), INP, and Cumulative Layout Shift (CLS). This guide covers every aspect of optimizing your site for good CWV scores.&lt;/p&gt;
&lt;h2 id="understanding-core-web-vitals-in-2024"&gt;Understanding Core Web Vitals in 2024
&lt;/h2&gt;&lt;p&gt;The three CWV metrics measure distinct aspects of user experience. LCP tracks loading performance — how quickly the main content appears. INP measures interactivity — how responsive the page feels when users click, tap, or type. CLS quantifies visual stability — how much the layout shifts unexpectedly during load.&lt;/p&gt;</description></item><item><title>React 服务器组件：Web 渲染的未来</title><link>https://takao.blog/zh/web/react-server-components/</link><pubDate>Mon, 08 Jan 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/react-server-components/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/react-server-components-zh.png" alt="Featured image of post React 服务器组件：Web 渲染的未来" /&gt;&lt;p&gt;React 服务器组件 (RSC) 代表了 React 应用程序渲染方式的范式转变。组件专门在服务器上运行，向客户端发送零 JavaScript。这与服务器端渲染 (SSR) 不同，后者在服务器上渲染组件，但仍将它们的所有 JavaScript 发送到客户端进行水合作用。 RSC 生成一种特殊的序列化格式——RSC 有效负载——客户端上的 React 协调器使用它来重建组件树，而不执行组件代码。&lt;/p&gt;</description></item><item><title>Docker 健康检查和容器监控最佳实践</title><link>https://takao.blog/zh/web/docker-health-checks/</link><pubDate>Mon, 25 Dec 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/docker-health-checks/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/docker-health-checks-zh.png" alt="Featured image of post Docker 健康检查和容器监控最佳实践" /&gt;&lt;p&gt;Docker 健康检查对于构建自我修复的容器基础设施至关重要。它们支持自动检测应用程序故障并触发容器重新启动，确保您的服务保持可用。本指南涵盖了从基本 &lt;code&gt;HEALTHCHECK&lt;/code&gt; 实现到高级生产模式的所有内容。&lt;/p&gt;</description></item><item><title>Node.js Streams：数据处理实用指南</title><link>https://takao.blog/zh/web/nodejs-streams/</link><pubDate>Wed, 20 Dec 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/nodejs-streams/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/nodejs-streams-zh.png" alt="Featured image of post Node.js Streams：数据处理实用指南" /&gt;&lt;p&gt;Node.js 流是该平台最强大但未得到充分利用的功能之一。它们可以在数据到达时逐段处理数据，而不是将整个数据集加载到内存中。这使得它们对于处理大文件、网络通信和实时数据转换至关重要。本指南涵盖了构建强大数据管道的流基础知识和实用模式。&lt;/p&gt;</description></item><item><title>CSS Grid高级模式：复杂布局简单化</title><link>https://takao.blog/zh/web/css-grid-advanced/</link><pubDate>Fri, 15 Dec 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/css-grid-advanced/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/css-grid-advanced-zh.png" alt="Featured image of post CSS Grid高级模式：复杂布局简单化" /&gt;&lt;p&gt;CSS Grid has transformed web layout design, but many developers only scratch the surface. Beyond the basic &lt;code&gt;grid-template-columns: 1fr 1fr 1fr&lt;/code&gt; lies a powerful set of features that handle complex, responsive layouts with minimal code. This article explores advanced Grid patterns that every professional front-end developer should know.&lt;/p&gt;
&lt;h2 id="named-grid-areas-for-semantic-layouts"&gt;Named Grid Areas for Semantic Layouts
&lt;/h2&gt;&lt;p&gt;Line-based placement works, but it becomes unreadable as layouts grow complex. Named grid areas let you define layouts that read like a wireframe directly in CSS.&lt;/p&gt;</description></item><item><title>TypeScript 实用程序类型：包含真实示例的完整指南</title><link>https://takao.blog/zh/web/typescript-utility-types/</link><pubDate>Sun, 10 Dec 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/typescript-utility-types/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/typescript-utility-types-zh.png" alt="Featured image of post TypeScript 实用程序类型：包含真实示例的完整指南" /&gt;&lt;p&gt;TypeScript 提供了一组丰富的内置实用程序类型，可以转换和操作其他类型。了解这些工具可以让您编写更具表现力和类型安全的代码，而无需重新发明轮子。&lt;/p&gt;
&lt;h2 id="属性修改类型"&gt;属性修改类型
&lt;/h2&gt;&lt;p&gt;这些类型修改对象属性的可选性、可变性和要求：&lt;/p&gt;</description></item><item><title>高级 JavaScript Promise 模式：掌握异步控制流</title><link>https://takao.blog/zh/web/js-promise-patterns/</link><pubDate>Tue, 05 Dec 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/js-promise-patterns/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/js-promise-patterns-zh.png" alt="Featured image of post 高级 JavaScript Promise 模式：掌握异步控制流" /&gt;&lt;p&gt;Promise 是现代 JavaScript 的基础，但掌握异步控制流需要超越基本的 &lt;code&gt;.then()&lt;/code&gt; 链。本文探讨了中高级开发人员生产应用程序所需的高级 Promise 模式，从并发控制到错误处理和取消。&lt;/p&gt;
&lt;h2 id="超越基础的承诺景观"&gt;超越基础的承诺景观
&lt;/h2&gt;&lt;p&gt;JavaScript 在 Promise 上提供了四种静态方法来组合异步操作，每种方法适合不同的场景：&lt;/p&gt;</description></item><item><title>Cloudflare Pages：静态站点托管指南</title><link>https://takao.blog/zh/web/cloudflare-pages/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/cloudflare-pages/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-cloudflare-pages-zh.png" alt="Featured image of post Cloudflare Pages：静态站点托管指南" /&gt;&lt;h1 id="cloudflare-pages现代网站的静态站点托管"&gt;Cloudflare Pages：现代网站的静态站点托管
&lt;/h1&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;Cloudflare Pages 是一个构建在 Cloudflare 全球网络基础设施之上的静态站点托管平台。它将世界级 CDN 的速度与直观的部署管道结合在一起，使其成为想要专注于构建而不是配置服务器的开发人员的绝佳选择。从投资组合网站到功能齐全的 Web 应用程序，Cloudflare Pages 可以处理内容交付、SSL 终止和扩展的繁重工作 - 所有这些都提供慷慨的免费套餐。本指南逐步介绍在 Cloudflare Pages 上设置和优化站点的每一步。&lt;/p&gt;</description></item><item><title>Cloudflare 设置指南：安全性和性能</title><link>https://takao.blog/zh/web/cloudflare/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/cloudflare/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-cloudflare-zh.png" alt="Featured image of post Cloudflare 设置指南：安全性和性能" /&gt;&lt;h1 id="cloudflare-设置提高网站安全性和性能"&gt;Cloudflare 设置：提高网站安全性和性能
&lt;/h1&gt;&lt;h2 id="介绍"&gt;介绍
&lt;/h2&gt;&lt;p&gt;对于任何网站所有者来说，安全性和速度是同一枚硬币的两个方面。缓慢的网站会让访问者感到沮丧并损害转化率；不安全的网站会使数据和声誉面临风险。 Cloudflare 通过位于访问者和源服务器之间的集成平台解决了这两个问题，该平台同时充当反向代理、内容交付网络和安全网关。本指南逐步介绍如何配置 Cloudflare 的核心功能（从基本 DNS 设置到高级安全规则），以便您可以放心地保护和加速您的网站。&lt;/p&gt;</description></item><item><title>守望先锋2</title><link>https://takao.blog/zh/game/overwatch2/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/overwatch2/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/overwatch2-zh.png" alt="Featured image of post 守望先锋2" /&gt;&lt;h1 id="overwatch-2-the-next-era-of-team-based-action"&gt;Overwatch 2: The Next Era of Team-Based Action
&lt;/h1&gt;&lt;p&gt;Overwatch 2, developed by Blizzard Entertainment, launched in early access on October 5, 2022, marking a bold new chapter for the franchise. Rather than a simple expansion, Blizzard positioned it as a true sequel — rebuilding the core experience while carrying forward the vibrant world and diverse cast that made the original a phenomenon. The game is available on PC (Windows 10), PlayStation 5, PlayStation 4, Xbox Series X/S, Xbox One, and Nintendo Switch, with full cross-play support.&lt;/p&gt;</description></item><item><title>Proxmox VE 安装和初始设置指南</title><link>https://takao.blog/zh/web/proxmox-install-setup/</link><pubDate>Wed, 15 Nov 2023 00:00:00 +0000</pubDate><guid>https://takao.blog/zh/web/proxmox-install-setup/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/proxmox-install-setup-zh.png" alt="Featured image of post Proxmox VE 安装和初始设置指南" /&gt;&lt;h2 id="proxmox-ve是什么"&gt;Proxmox VE是什么？
&lt;/h2&gt;&lt;p&gt;Proxmox 虚拟环境 (Proxmox VE) 是一个开源服务器虚拟化平台，在单个 Web 界面下结合了基于 KVM 的虚拟机和基于 LXC 的容器。它基于 Debian Linux 构建，集成了实时迁移、高可用性、软件定义存储和内置防火墙等企业功能。其无代理设计和中央管理界面使其成为家庭实验室、小型企业和数据中心等的热门选择。&lt;/p&gt;</description></item><item><title>Google Analytics：实施和分析指南</title><link>https://takao.blog/zh/web/google-analytics/</link><pubDate>Fri, 20 Oct 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/google-analytics/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-google-analytics-zh.png" alt="Featured image of post Google Analytics：实施和分析指南" /&gt;&lt;h1 id="google-analytics实施和分析指南"&gt;Google Analytics：实施和分析指南
&lt;/h1&gt;&lt;p&gt;了解访问者如何与您的网站互动对于发展至关重要。 Google Analytics (GA) 是网络分析的行业标准，可提供对流量来源、用户行为和转化性能的深入洞察。本指南介绍了从帐户创建到高级优化的完整实施过程，以便您可以自信地开始做出数据驱动的决策。&lt;/p&gt;</description></item><item><title>OWASP ZAP：Web 应用程序安全测试指南</title><link>https://takao.blog/zh/web/owasp-zap/</link><pubDate>Fri, 20 Oct 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/owasp-zap/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-owasp-zap-zh.png" alt="Featured image of post OWASP ZAP：Web 应用程序安全测试指南" /&gt;&lt;h1 id="owasp-zapweb-应用程序安全测试指南"&gt;OWASP ZAP：Web 应用程序安全测试指南
&lt;/h1&gt;&lt;p&gt;Web 应用程序安全性不再是可选的 — 它是保护用户数据和维护信任的基本要求。 OWASP ZAP（Zed Attack Proxy）是最流行的开源安全测试工具之一。它通过自动扫描和手动测试功能帮助开发人员和安全专业人员识别 Web 应用程序中的漏洞。本指南涵盖了从安装到修复的完整工作流程。&lt;/p&gt;</description></item><item><title>奇幻生活i</title><link>https://takao.blog/zh/game/fantasy-life-i/</link><pubDate>Tue, 10 Oct 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/fantasy-life-i/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/fantasy-life-i-zh.png" alt="Featured image of post 奇幻生活i" /&gt;&lt;h1 id="fantasy-life-i-the-girl-who-steals-time--complete-guide"&gt;Fantasy Life i: The Girl Who Steals Time — Complete Guide
&lt;/h1&gt;&lt;h2 id="overview-of-the-game"&gt;Overview of the Game
&lt;/h2&gt;&lt;p&gt;&lt;em&gt;Fantasy Life i: The Girl Who Steals Time&lt;/em&gt; is the long-awaited sequel to Level-5&amp;rsquo;s 2012 cult classic &lt;em&gt;Fantasy Life&lt;/em&gt; for Nintendo 3DS. Originally announced as a Nintendo Switch title, the game blends open-world action RPG combat with deep life simulation mechanics. The story follows a mysterious girl who manipulates time, granting players the ability to revisit past eras and reshape the world. With over a dozen Life Classes (jobs), a fully customizable island hub, and a sprawling narrative spanning multiple timelines, the game offers hundreds of hours of content.&lt;/p&gt;</description></item><item><title>时光机：探索互联网档案馆</title><link>https://takao.blog/zh/web/waybackmachine/</link><pubDate>Mon, 11 Sep 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/waybackmachine/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/wayback-machine-zh.png" alt="Featured image of post 时光机：探索互联网档案馆" /&gt;&lt;h1 id="时光机探索互联网档案馆"&gt;时光机：探索互联网档案馆
&lt;/h1&gt;&lt;p&gt;Wayback Machine 是万维网的数字时间胶囊。它由成立于 1996 年的非营利组织互联网档案馆 (Internet Archive) 运营，保存了数十年的网页快照，让任何人都能回到过去，看看网站几年前的样子。无论您是在进行研究、恢复丢失的内容，还是只是对互联网的历史感到好奇，Wayback Machine 都是一个不可或缺的工具。&lt;/p&gt;</description></item><item><title>Git 教程：从基础知识到高级工作流程</title><link>https://takao.blog/zh/web/how-to-git/</link><pubDate>Sun, 10 Sep 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/how-to-git/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-git-zh.png" alt="Featured image of post Git 教程：从基础知识到高级工作流程" /&gt;&lt;h1 id="git-教程项目管理和版本控制基础知识"&gt;Git 教程：项目管理和版本控制基础知识
&lt;/h1&gt;&lt;p&gt;Git 是现代软件开发中版本控制的事实上的标准。它跟踪代码库的每次更改，实现无缝团队协作，并为实验提供安全网。无论您是维护个人项目的独立开发人员还是大型工程团队的一员，掌握 Git 都是必不可少的。本指南涵盖了 Git 从基本原理到高级工作流程，以及实用命令和真实场景。&lt;/p&gt;</description></item><item><title>GitHub 指南：协作和项目管理</title><link>https://takao.blog/zh/web/how-to-github/</link><pubDate>Sun, 10 Sep 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/how-to-github/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-github-zh.png" alt="Featured image of post GitHub 指南：协作和项目管理" /&gt;&lt;h1 id="github-指南协作和项目管理"&gt;GitHub 指南：协作和项目管理
&lt;/h1&gt;&lt;p&gt;GitHub 已成为软件开发人员和项目经理等的重要平台。它将强大的版本控制与社交编码功能相结合，使团队协作无缝。无论您是为开源项目做出贡献还是管理私人团队存储库，GitHub 都可以提供您跟踪更改、审查代码和自动化工作流程所需的工具。本指南介绍了从帐户设置到高级项目管理的所有内容。&lt;/p&gt;</description></item><item><title>Apex安装指南</title><link>https://takao.blog/zh/game/apex-install/</link><pubDate>Sun, 27 Aug 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/apex-install/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/apex-install-zh.png" alt="Featured image of post Apex安装指南" /&gt;&lt;h1 id="how-to-install-the-steam-version-of-apex-legends"&gt;How to install the Steam version of Apex Legends
&lt;/h1&gt;&lt;p&gt;Apex Legends is a thrilling battle royale game that can be played through Steam. This article details the steps to install the Steam version of Apex Legends.&lt;/p&gt;
&lt;h2 id="step-1-install-the-steam-client"&gt;Step 1: Install the Steam client
&lt;/h2&gt;&lt;p&gt;First, you will need to download and install the Steam client in order to play Apex Legends. Follow these steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;go to the &lt;a class="link" href="https://store.steampowered.com/" target="_blank" rel="noopener"
 &gt;official Steam website&lt;/a&gt;. 2.&lt;/li&gt;
&lt;li&gt;click on the &amp;ldquo;Install&amp;rdquo; button at the top right of the page to download the Steam client. 3.&lt;/li&gt;
&lt;li&gt;after the download is complete, run the downloaded file to install the Steam client.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="step-2-create-a-steam-account"&gt;Step 2: Create a Steam account
&lt;/h2&gt;&lt;p&gt;After installing the Steam client, create an account or login with your existing account. Follow these steps: 1.&lt;/p&gt;</description></item><item><title>如何设置 Hugo：初学者完整指南</title><link>https://takao.blog/zh/web/hugo-setup/</link><pubDate>Wed, 23 Aug 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/web/hugo-setup/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/hugo-setup-zh.png" alt="Featured image of post 如何设置 Hugo：初学者完整指南" /&gt;&lt;h1 id="如何安装-hugo---静态站点生成器安装说明"&gt;如何安装 Hugo - 静态站点生成器安装说明
&lt;/h1&gt;&lt;p&gt;Hugo 是一个快速、简单的静态站点生成器和工具，可以轻松构建网站。本文详细介绍了安装 Hugo 的步骤。&lt;/p&gt;
&lt;h2 id="第1步下载hugo"&gt;第1步：下载Hugo
&lt;/h2&gt;&lt;p&gt;要安装 Hugo，首先从官方下载页面下载适当版本的 Hugo 二进制文件。&lt;/p&gt;</description></item><item><title>Minecraft安装指南</title><link>https://takao.blog/zh/game/minecraft-install/</link><pubDate>Tue, 22 Aug 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/minecraft-install/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/minecraft-install-zh.png" alt="Featured image of post Minecraft安装指南" /&gt;&lt;h1 id="how-to-install-minecraft---first-steps-guide"&gt;How to Install Minecraft - First Steps Guide
&lt;/h1&gt;&lt;h2 id="overview"&gt;Overview
&lt;/h2&gt;&lt;p&gt;Minecraft is a popular game for adventuring and building in creative worlds. This article details the steps to install Minecraft on your computer.&lt;/p&gt;
&lt;h2 id="step-1-visit-the-official-website"&gt;Step 1: Visit the official website
&lt;/h2&gt;&lt;p&gt;First, visit the official Minecraft website at &lt;a class="link" href="https://www.minecraft.net/" target="_blank" rel="noopener"
 &gt;https://www.minecraft.net/&lt;/a&gt;. From here you can purchase the official game.&lt;/p&gt;
&lt;h2 id="step-2-create-an-account-and-purchase-the-game"&gt;Step 2: Create an account and purchase the game
&lt;/h2&gt;&lt;p&gt;Once on the website, create an account by clicking the &amp;ldquo;Login&amp;rdquo; or &amp;ldquo;Create Account&amp;rdquo; button in the upper right corner. Once you have created an account, you can purchase games. Select the appropriate option and complete the payment process.&lt;/p&gt;</description></item><item><title>Minecraft模组推荐</title><link>https://takao.blog/zh/game/minecraft-mod-recommend/</link><pubDate>Mon, 21 Aug 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/minecraft-mod-recommend/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/minecraft-mod-recommend-zh.png" alt="Featured image of post Minecraft模组推荐" /&gt;&lt;h1 id="10-recommended-minecraft-mods---add-new-adventure-and-fun"&gt;10 Recommended Minecraft Mods - Add New Adventure and Fun
&lt;/h1&gt;&lt;p&gt;The beauty of Minecraft is that mods allow you to customize your gameplay and add new adventures and fun. In this article, we present 10 recommended Minecraft mods. By implementing these mods, you can enjoy the game more deeply.&lt;/p&gt;
&lt;h2 id="1-optifine"&gt;1. Optifine
&lt;/h2&gt;&lt;p&gt;Optifine is a mod that optimizes Minecraft&amp;rsquo;s graphics and increases the frame rate. It allows for beautiful textures and shaders and also contributes to improved performance.
&lt;a class="link" href="https://optifine.net/downloads" target="_blank" rel="noopener"
 &gt;download at&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Valorant安装指南</title><link>https://takao.blog/zh/game/valorant-install/</link><pubDate>Sun, 20 Aug 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/zh/game/valorant-install/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/valorant-install-zh.png" alt="Featured image of post Valorant安装指南" /&gt;&lt;h1 id="how-to-install-valorant---first-time-steps-guide"&gt;How to install Valorant - First Time Steps Guide
&lt;/h1&gt;&lt;h2 id="overview"&gt;Overview
&lt;/h2&gt;&lt;p&gt;Valorant is a popular tactical shooter game that is gaining attention in the competitive scene. This article details the steps to install Valorant on your computer.&lt;/p&gt;
&lt;h2 id="step-1-create-a-riot-games-account"&gt;Step 1: Create a Riot Games account
&lt;/h2&gt;&lt;p&gt;First, you will need a Riot Games account in order to play Valorant. Go to the official website (&lt;a class="link" href="https://playvalorant.com/" target="_blank" rel="noopener"
 &gt;https://playvalorant.com/&lt;/a&gt;) and click on the &amp;ldquo;Create Account&amp;rdquo; button in the upper right corner to create an account.&lt;/p&gt;</description></item></channel></rss>