# 牧宇的Blog > 以代码记行藏,以文字观万象;守寸心而求真,循长风以致远。 ## Content - [SillyTavern 是什么:在“愚蠢的小酒馆”里和模型聊天](https://www.lihuanyu.com/posts/2026/SillyTavern%E6%98%AF%E4%BB%80%E4%B9%88-%E4%BB%8E%E8%81%8A%E5%A4%A9%E7%95%8C%E9%9D%A2%E5%88%B0%E6%A8%A1%E5%9E%8B%E5%B7%A5%E4%BD%9C%E5%8F%B0/) - 从 SillyTavern 这个有点醉意的名字说起,介绍这个开源聊天界面、角色卡和模型连接,也谈谈使用陪伴类 AI 时该留意的边界。 - [What Is SillyTavern? A Little Tavern for Talking to Models](https://www.lihuanyu.com/en/posts/2026/what-is-sillytavern-an-open-source-tavern-for-model-chat/) - A friendly introduction to SillyTavern, its character cards, model connections, and the strange charm of an open-source roleplay interface. - [Intelligence Is Becoming Aluminum](https://www.lihuanyu.com/en/posts/2026/intelligence-is-becoming-aluminum/) - A personal reflection on shrinking frontend roles, increasingly capable coding agents, the falling price of intelligence, and why changing careers may be changing cabins rather than finding a lifeboat. - [智力正在变成铝](https://www.lihuanyu.com/posts/2026/%E6%99%BA%E5%8A%9B%E6%AD%A3%E5%9C%A8%E5%8F%98%E6%88%90%E9%93%9D/) - 从前端岗位收缩、AI 编程能力提升和独立开发经历出发,讨论智力成本下降后,程序员为何只是最早进水的舱室,以及在尚未找到救生艇时为什么仍要行动。 - [Context Engineering Is Not About Adding More Context](https://www.lihuanyu.com/en/posts/context-engineering-is-not-about-more-context/) - A large context window only defines how much a model can see. Context engineering decides what enters that window, how to compress and order it, what to isolate, and what to discard as a task grows. - [From One Model Call to an Agent: How LLMs, RAG, Tools, Loops, and ReAct Fit Together](https://www.lihuanyu.com/en/posts/2026/from-one-model-call-to-an-agent/) - LLMs, prompts, context, RAG, tools, workflows, loops, ReAct, memory, and agents belong to different layers. This guide explains what each one does and how they fit into a working system. - [上下文工程,不是把更多东西塞给模型](https://www.lihuanyu.com/posts/context-engineering-is-not-more-context/) - 上下文窗口只规定模型最多能看到多少内容。真正的上下文工程,要处理材料的选择、压缩、排序、隔离和淘汰,还要给长任务留下可以继续工作的状态。 - [从一次模型调用到一个 Agent](https://www.lihuanyu.com/posts/from-one-model-call-to-an-agent/) - LLM、Prompt、Context、RAG、Tool、Workflow、Loop、ReAct、Memory 和 Agent 经常出现在同一段介绍里,却不处于同一层:模型负责生成,上下文与 RAG 补充材料,Tool 连接外部能力,Loop 和 ReAct 组织决策,Agent 把它们变成一套运行系统。 - [How to Run Redis with Docker Compose on Ubuntu](https://www.lihuanyu.com/en/posts/2026/run-redis-with-docker-compose-on-ubuntu/) - Deploy Redis 8 on Ubuntu with Docker Compose using localhost-only access, authentication, AOF persistence, memory limits, backups, and safe upgrades. - [如何用 GitHub Actions 持续部署微信和支付宝小程序](https://www.lihuanyu.com/posts/2026/%E7%94%A8-GitHub-Actions-%E6%8C%81%E7%BB%AD%E9%83%A8%E7%BD%B2%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F/) - 使用微信官方 miniprogram-ci 和支付宝官方 minidev,把小程序构建、检查与版本上传接入 GitHub Actions。方案不依赖具体框架,原生项目和跨端框架都能使用。 - [Locks Are Not Syntax, They Are Boundaries](https://www.lihuanyu.com/en/posts/2026/locks-are-boundaries-not-syntax/) - A practical explanation of what locks are for, when to consider them, how optimistic and pessimistic locking differ, and why local locks are not enough in distributed systems. - [锁不是语法,是一种边界](https://www.lihuanyu.com/posts/locks-are-boundaries-not-syntax/) - 从公共账本、会议室预约、库存和余额几个例子说起,理解锁到底解决什么问题,什么时候需要考虑锁,乐观锁和悲观锁怎么选,以及分布式场景里为什么不能只靠本机锁。 - [AI 整理全书为什么不能只靠一个大 Prompt](https://www.lihuanyu.com/posts/ai-book-review-beyond-large-prompt/) - 续章的全书整理功能曾把作品设定、章节、事实和记忆一次性发给模型,两次调用跑了八分多钟。后来我把它改成按需查资料的有限 Agent 循环,没用框架,也没再被单次超长上下文拖死。 - [I Stopped Sending the Whole Book to the Model](https://www.lihuanyu.com/en/posts/2026/i-stopped-sending-the-whole-book-to-the-model/) - My whole-book review feature used to send the setting, chapter plan, facts, and memories in one giant prompt. Two model calls took more than eight minutes. I replaced that request with a small, bounded agent loop that retrieves context only when it needs it. - [OIDC: The Identity Boundary Behind Login](https://www.lihuanyu.com/en/posts/2026/oidc-identity-boundary-behind-login/) - A practical introduction to OpenID Connect: what problem it solves, when it is worth using, how it fits login and payments, and how it differs from OAuth, SAML, CAS, LDAP, JWT, and passkeys. - [OIDC:登录背后的身份边界](https://www.lihuanyu.com/posts/oidc-identity-boundary-behind-login/) - 从个人产品和 AI 应用的真实工程需求出发,聊聊 OpenID Connect 解决的到底是什么问题、什么时候适合使用、和 OAuth、SAML、CAS、LDAP、WebAuthn 等方案有什么区别。 - [AI 时代,工具链性能变得前所未有的重要](https://www.lihuanyu.com/posts/ai-toolchain-performance-matters-in-ai-era/) - AI 编程真正改变的不是“写代码更快”这么简单,而是开发进入了 agentic loop:AI 写代码、跑验证、读错误、再修复。这个循环里,test、lint、build 的耗时会直接决定整体吞吐。 - [Toolchain Performance Matters More Than Ever in the AI Era](https://www.lihuanyu.com/en/posts/2026/toolchain-performance-matters-more-than-ever-in-the-ai-era/) - AI coding is increasingly an agentic loop: write code, run validation, read failures, and fix again. In that loop, test, lint, and build performance directly shape engineering throughput. - [The Next Step for Admin Platforms Is CLI and Skill](https://www.lihuanyu.com/en/posts/2026/the-next-step-for-admin-platforms-is-cli-and-skill/) - A reflection on why admin and configuration platforms should stop exposing their capabilities only through pages, and start turning operations into CLI commands and agent-readable skills. - [中后台的下一站,是 CLI 和 Skill](https://www.lihuanyu.com/posts/2026/%E4%B8%AD%E5%90%8E%E5%8F%B0%E7%9A%84%E4%B8%8B%E4%B8%80%E7%AB%99%E6%98%AFCLI%E5%92%8CSkill/) - 从后台表单、配置平台和 AI agent 的使用方式出发,聊聊为什么中后台下一步不该只继续堆页面,而应该把能力沉淀成 CLI 和 Skill。 - [gpt-image-2 Prompt Library: Technical Diagrams, Covers, and Visuals](https://www.lihuanyu.com/en/posts/2026/gpt-image-2-prompt-patterns/) - Tested gpt-image-2 prompts for technical diagrams, infographics, editorial covers, miniature scenes, logos, and knowledge cards, organized by use case. - [gpt-image-2 Prompts for Commercial Covers and Miniature Visuals](https://www.lihuanyu.com/en/posts/2026/gpt-image-2-commercial-cover-prompts/) - Tested gpt-image-2 prompts for editorial covers, miniature product scenes, technology posters, concept logos, and botanical knowledge cards. - [gpt-image-2 Prompts for Technical Diagrams and Infographics](https://www.lihuanyu.com/en/posts/2026/gpt-image-2-technical-diagram-prompts/) - Tested gpt-image-2 prompts for turning architecture notes, technical mechanisms, and Mermaid flows into readable technical diagrams and infographics. - [gpt-image-2 提示词分享:商业封面与微缩视觉](https://www.lihuanyu.com/posts/gpt-image-2-commercial-cover-prompts/) - 整理适合 PPT 封面、报告插图、自媒体头图、科技行业封面和微缩视觉的 gpt-image-2 提示词模板。 - [gpt-image-2 提示词分享:城市海报与艺术壁纸](https://www.lihuanyu.com/posts/gpt-image-2-city-wallpaper-prompts/) - 整理适合城市收藏海报、旅行视觉、拼音主题海报和艺术壁纸的 gpt-image-2 提示词模板。 - [gpt-image-2 提示词分享:技术图解与信息图](https://www.lihuanyu.com/posts/gpt-image-2-technical-diagram-prompts/) - 整理适合技术方案、架构说明、报告插图和 Mermaid 重构的 gpt-image-2 提示词模板。 - [gpt-image-2 提示词分享:诗词文化与东方叙事海报](https://www.lihuanyu.com/posts/gpt-image-2-cultural-poster-prompts/) - 整理适合诗词鉴赏、文化主题、东方幻想人像、章节页和叙事海报的 gpt-image-2 提示词模板。 - [gpt-image-2 提示词库:技术图、商业封面与视觉海报模板](https://www.lihuanyu.com/posts/gpt-image-2-prompt-gallery/) - 按用途整理经过实测的 gpt-image-2 提示词,覆盖技术图解、信息图、商业封面、微缩视觉、文化海报和城市壁纸。 - [From tinify-cli to imgasset: Turning Blog Images into a Pipeline](https://www.lihuanyu.com/en/posts/2026/from-tinify-cli-to-imgasset-turning-blog-images-into-a-pipeline/) - How a repeated blog image workflow became two reusable npm CLI tools: tinify-cli for compression and imgasset for AI generation, raw asset storage, compression, and publishing. - [从 tinify-cli 到 imgasset:把博客配图做成一条流水线](https://www.lihuanyu.com/posts/2026/%E4%BB%8E-tinify-cli-%E5%88%B0-imgasset-%E6%8A%8A%E5%8D%9A%E5%AE%A2%E9%85%8D%E5%9B%BE%E5%81%9A%E6%88%90%E4%B8%80%E6%9D%A1%E6%B5%81%E6%B0%B4%E7%BA%BF/) - 从图片压缩工具 tinify-cli 到 AI 生图与压缩一体化工具 imgasset,记录一套博客配图工作流如何从临时脚本沉淀成可复用的 npm CLI。 - [Static Sites Are Having a Renaissance. Here Is Why I Chose Astro](https://www.lihuanyu.com/en/posts/2026/static-sites-renaissance-why-i-chose-astro/) - A reflection on why Astro fits content-driven static sites, based on recent website projects, a blog migration from Hexo to Astro, and comparisons with Hugo, Eleventy, VitePress, Docusaurus, and Next.js. - [静态网站回潮时,我为什么选择 Astro](https://www.lihuanyu.com/posts/2026/%E9%9D%99%E6%80%81%E7%BD%91%E7%AB%99%E5%9B%9E%E6%BD%AE%E6%97%B6-%E6%88%91%E4%B8%BA%E4%BB%80%E4%B9%88%E9%80%89%E6%8B%A9-Astro/) - 从 Cloudflare 关于静态站点生成器的讨论出发,结合个人官网项目和博客从 Hexo 迁移到 Astro 的实践,讨论 Astro 为什么适合内容型静态网站,以及它和 Hugo、Eleventy、VitePress、Docusaurus、Next.js 等方案的取舍。 - [AI 时代,有重构的自由](https://www.lihuanyu.com/posts/2026/AI%E6%97%B6%E4%BB%A3%E6%9C%89%E9%87%8D%E6%9E%84%E7%9A%84%E8%87%AA%E7%94%B1/) - 从 Bun 迁移到 Rust 和个人项目从 SolidJS 迁到 Vue 出发,讨论 AI 如何降低重构成本,以及技术选型在 AI 时代为什么逐渐从一次性押注变成可持续修正。 - [In the AI Era, Developers Have the Freedom to Refactor](https://www.lihuanyu.com/en/posts/2026/developers-have-the-freedom-to-refactor-ai-era/) - A reflection on Bun's move toward Rust, a small SolidJS-to-Vue migration, and why technical choices in the AI era are becoming less like permanent bets and more like decisions that can be revised. - [AI 打破了互联网的零边际成本神话](https://www.lihuanyu.com/posts/2026/AI%E6%89%93%E7%A0%B4%E4%BA%86%E4%BA%92%E8%81%94%E7%BD%91%E7%9A%84%E9%9B%B6%E8%BE%B9%E9%99%85%E6%88%90%E6%9C%AC%E7%A5%9E%E8%AF%9D/) - 从 AI 应用的真实账单出发,重新理解传统互联网的低边际成本、AI 的按需生产属性,以及免费、增长和独立开发在 AI 时代为什么都要重新算账。 - [Why AI Has Higher Marginal Costs Than Internet Software](https://www.lihuanyu.com/en/posts/2026/ai-broke-the-zero-marginal-cost-myth-of-the-internet/) - Marginal cost is the cost of serving one more unit. AI adds inference, tokens, GPU time, and tool calls to each request, changing software unit economics. - [I Built a FIRE Calculator Because Financial Freedom Should Not Depend on Vibes](https://www.lihuanyu.com/en/posts/2026/i-built-a-fire-calculator-financial-freedom-should-not-depend-on-vibes/) - A personal reflection on why I built ChooseFIRE, and how a simple calculator can make income, spending, savings rate, returns, and personal freedom easier to reason about. - [我做了一个 FIRE 计算器:财务自由不该只靠感觉](https://www.lihuanyu.com/posts/2026/%E6%88%91%E5%81%9A%E4%BA%86%E4%B8%80%E4%B8%AAFIRE%E8%AE%A1%E7%AE%97%E5%99%A8-%E8%B4%A2%E5%8A%A1%E8%87%AA%E7%94%B1%E4%B8%8D%E8%AF%A5%E5%8F%AA%E9%9D%A0%E6%84%9F%E8%A7%89/) - 从接触 FIRE 的个人感受出发,聊聊为什么做 ChooseFIRE,以及一个计算器能如何帮助人更清楚地理解收入、支出、储蓄率和选择权之间的关系。 - [DeepSeek API 接入 SillyTavern:不用本地显卡的小酒馆方案](https://www.lihuanyu.com/posts/deepseek-api-sillytavern-no-gpu/) - 在没有高性能显卡的情况下,通过 DeepSeek 官方 API 和 SillyTavern 的 Chat Completion / OpenAI-compatible 配置,把小酒馆连接到云端 DeepSeek 模型。 - [SillyTavern DeepSeek API Setup: Step-by-Step, No GPU Required](https://www.lihuanyu.com/en/posts/2026/deepseek-api-sillytavern-no-gpu/) - Configure the DeepSeek API in SillyTavern step by step with the built-in provider or an OpenAI-compatible connection, without a local GPU. - [墨屿 InkIsle:我为什么又写了一个博客系统](https://www.lihuanyu.com/posts/2026/%E5%A2%A8%E5%B1%BF-InkIsle-%E6%88%91%E4%B8%BA%E4%BB%80%E4%B9%88%E5%8F%88%E5%86%99%E4%BA%86%E4%B8%80%E4%B8%AA%E5%8D%9A%E5%AE%A2%E7%B3%BB%E7%BB%9F/) - 从 Hexo 个人博客迁移出发,介绍墨屿 InkIsle 的背景、设计取舍、实现方案、迁移结果、使用方式和未来开源计划。 - [AI时代,前后端分离不该再是默认选项](https://www.lihuanyu.com/posts/2026/AI%E6%97%B6%E4%BB%A3%E5%89%8D%E5%90%8E%E7%AB%AF%E5%88%86%E7%A6%BB%E4%B8%8D%E8%AF%A5%E5%86%8D%E6%98%AF%E9%BB%98%E8%AE%A4%E9%80%89%E9%A1%B9/) - 从 AI 对上下文完整性的依赖出发,重新讨论前后端分离、产品层全栈、同构框架和业务域团队在新时代的默认选择。 - [In the AI Era, Frontend-Backend Separation Should No Longer Be the Default](https://www.lihuanyu.com/en/posts/2026/frontend-backend-separation-should-not-be-default-ai-era/) - A reflection on why AI changes the cost-benefit balance of frontend-backend separation, and why product-layer full stack should become the default for many projects. - [Docker Performance: Linux vs Docker Desktop Overhead](https://www.lihuanyu.com/en/posts/2025/rethinking-docker-development-linux-redis/) - Why Docker feels heavy on macOS and Windows but runs leaner on Linux, including the real costs of filesystems, networking, memory, and container limits. - [重新认识 Docker:开发环境、Linux 性能开销与 Redis 实战](https://www.lihuanyu.com/posts/2025/%E9%87%8D%E6%96%B0%E8%AE%A4%E8%AF%86Docker%E7%9A%84%E6%80%A7%E8%83%BD%E5%BC%80%E9%94%80/) - 从早期用 Docker 统一开发环境,到后来在 Linux 服务器上部署 Redis,重新梳理 Docker 在开发机和服务器上的真实成本、适用边界和实践细节。 - [NestJS 框架下的三种测试类型对比分析](https://www.lihuanyu.com/posts/2025/NestJS-%E6%A1%86%E6%9E%B6%E4%B8%8B%E7%9A%84%E4%B8%89%E7%A7%8D%E6%B5%8B%E8%AF%95%E7%B1%BB%E5%9E%8B%E5%AF%B9%E6%AF%94%E5%88%86%E6%9E%90/) - 以 NestJS 为例,对比单元测试、集成测试和端到端测试的测试范围、执行特性、实现方式和适用场景。 - [GitHub Actions 自动发布 npm 包简易指南](https://www.lihuanyu.com/posts/2025/GitHub-Actions-%E8%87%AA%E5%8A%A8%E5%8F%91%E5%B8%83-npm-%E5%8C%85%E7%AE%80%E6%98%93%E6%8C%87%E5%8D%97/) - 已并入《GitHub Actions 适合做什么,不适合做什么》。 - [无人驾驶与人因工程](https://www.lihuanyu.com/posts/2025/%E6%97%A0%E4%BA%BA%E9%A9%BE%E9%A9%B6%E4%B8%8E%E4%BA%BA%E5%9B%A0%E5%B7%A5%E7%A8%8B/) - 从小米 SU7 高速事故谈起,借助情景意识和自动化接管问题讨论智能驾驶中的人因工程风险。 - [GitHub OAuth 登录教程:PKCE、state 与 Session](https://www.lihuanyu.com/posts/2025/%E5%A6%82%E4%BD%95%E9%9B%86%E6%88%90Github%E7%99%BB%E5%BD%95/) - 使用 GitHub OAuth Authorization Code flow 接入登录,包含 state 校验、PKCE、服务端换取 token、用户绑定和本站 Session。 - [How to Implement Login with GitHub Safely](https://www.lihuanyu.com/en/posts/2025/implement-login-with-github-safely/) - A practical server-side GitHub OAuth login flow using state validation, authorization code exchange, GitHub user lookup, and a local session. - [互联网创业寒冬](https://www.lihuanyu.com/posts/2025/%E4%BA%92%E8%81%94%E7%BD%91%E5%88%9B%E4%B8%9A%E5%AF%92%E5%86%AC/) - 已并入《平台、算法与创作者:为什么还需要独立博客》。 - [在 GitHub Actions 里构建大型 Docker 镜像](https://www.lihuanyu.com/posts/2025/%E5%9C%A8Github%20Action%E9%87%8C%E6%9E%84%E5%BB%BA%E5%A4%A7%E5%9E%8BDocker%E9%95%9C%E5%83%8F/) - 已并入《GitHub Actions 适合做什么,不适合做什么》。 - [小程序组件库用 px 还是 rpx?兼容性与选型指南](https://www.lihuanyu.com/posts/2025/%E5%B0%8F%E7%A8%8B%E5%BA%8F%E7%BB%84%E4%BB%B6%E5%BA%93%E8%AF%A5%E7%94%A8rpx%E8%BF%98%E6%98%AFpx/) - 解释微信小程序 px 与 rpx 的换算规则、translateX 等场景的单位行为,并给出业务页面、自研组件库和第三方组件库的选型建议。 - [DeepSeek R1 with SillyTavern: Local Ollama Setup on Windows](https://www.lihuanyu.com/en/posts/2025/deepseek-r1-sillytavern-ollama-local-deployment/) - A practical Windows setup for running DeepSeek R1 with Ollama and connecting SillyTavern to the local model service, covering model size, GPU requirements, API settings, and common problems. - [DeepSeek R1 接入 SillyTavern 小酒馆:Ollama 本地部署教程](https://www.lihuanyu.com/posts/2025/%E6%9C%AC%E5%9C%B0%E9%83%A8%E7%BD%B2deepseek%E4%B8%8ESillyTavern/) - 在 Windows 上用 Ollama 运行 DeepSeek R1,并把 SillyTavern 小酒馆连接到本机模型服务,包含模型选择、显存要求、API 配置和常见问题。 - [Platforms, Algorithms, and Creators: Why Independent Blogs Still Matter](https://www.lihuanyu.com/en/posts/2025/platform-algorithms-independent-creators/) - A reflection on platform power, algorithmic distribution, creator assets, and why independent blogs still matter when most attention comes from social platforms. - [平台、算法与创作者:为什么还需要独立博客](https://www.lihuanyu.com/posts/2025/%E5%9C%A8%E5%9B%BD%E5%86%85%E7%9A%84%E5%B9%B3%E5%8F%B0%E4%BD%A0%E6%B2%A1%E6%9C%89%E7%B2%89%E4%B8%9D/) - 从大厂兴衰、算法分发、公众号红包封面和互联网创业寒冬出发,讨论创作者为什么不能只依赖平台,以及独立博客真正能沉淀什么。 - [【译】什么是前端架构](https://www.lihuanyu.com/posts/2025/%E4%BB%80%E4%B9%88%E6%98%AF%E5%89%8D%E7%AB%AF%E6%9E%B6%E6%9E%84/) - 翻译并整理前端架构的核心观点,强调架构不是目录结构,而是围绕业务驱动因素、权衡取舍和限制做出的重要决策。 - [25 年的微信红包封面](https://www.lihuanyu.com/posts/2025/25%E5%B9%B4%E7%9A%84%E5%BE%AE%E4%BF%A1%E7%BA%A2%E5%8C%85%E5%B0%81%E9%9D%A2/) - 已并入《平台、算法与创作者:为什么还需要独立博客》。 - [AI 应用开发者的困局:用户来了,账单也来了](https://www.lihuanyu.com/posts/2024/AI%E5%BA%94%E7%94%A8%E5%BC%80%E5%8F%91%E8%80%85%E7%9A%84%E5%9B%B0%E5%B1%80/) - 从 AI 绘图小程序的真实数据出发,讨论独立开发者做 AI 应用时最先撞上的问题:留存低、移动端使用频率有限、推理和绘图成本真实存在,免费增长不再天然是一件好事。 - [如何把svg渲染成png图片](https://www.lihuanyu.com/posts/2024/%E5%A6%82%E4%BD%95%E6%8A%8Asvg%E6%B8%B2%E6%9F%93%E6%88%90png%E5%9B%BE%E7%89%87/) - 记录把 AI 生成的 SVG 转为 PNG 的实践,比较 Cloudflare Worker、小程序 Canvas 和服务器端 sharp 方案的可行性。 - [图床系列之 TinyPNG 自动压缩图片](https://www.lihuanyu.com/posts/2024/%E5%9B%BE%E5%BA%8A%E7%B3%BB%E5%88%97%E4%B9%8Btinypng%E8%87%AA%E5%8A%A8%E5%8E%8B%E7%BC%A9%E5%9B%BE%E7%89%87/) - 已合并至 Cloudflare R2 图床完整方案。 - [shadcn/ui 是什么?它为什么不是传统组件库](https://www.lihuanyu.com/posts/2024/shadcn-ui%E7%BB%84%E4%BB%B6%E5%BA%93/) - shadcn/ui 通过 CLI 把组件源码加入项目,而不是提供一个封装好的组件 npm 包。本文说明它的使用、升级、Registry 和团队选型方式。 - [Cloudflare R2 Image Hosting with Workers and D1](https://www.lihuanyu.com/en/posts/2023/cloudflare-r2-image-hosting/) - Build a Cloudflare R2 image host with a custom domain, authenticated Worker upload API, D1 metadata, restricted CORS, caching, and cost controls. - [大厂的起起落落](https://www.lihuanyu.com/posts/2023/%E5%A4%A7%E5%8E%82%E7%9A%84%E8%B5%B7%E8%B5%B7%E8%90%BD%E8%90%BD/) - 已并入《平台、算法与创作者:为什么还需要独立博客》。 - [用 Cloudflare R2 搭建个人图床:上传、压缩、访问与成本](https://www.lihuanyu.com/posts/2023/%E4%BD%BF%E7%94%A8cloudflare%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%9B%BE%E5%BA%8A/) - 从只用 R2 控制台上传,到基于 Cloudflare Workers、D1、Pages 和 TinyPNG 搭建一个可用的个人图床应用。 - [英语的口音](https://www.lihuanyu.com/posts/2023/%E8%8B%B1%E8%AF%AD%E7%9A%84%E5%8F%A3%E9%9F%B3/) - 从印度、日本和中国人说英语的口音差异出发,解释清浊、送气、不送气等发音差异为什么会影响英语可理解度。 - [How to Skip a Global NestJS Interceptor for Specific Routes](https://www.lihuanyu.com/en/posts/2023/nestjs-interceptors-skip-response-wrapping/) - Skip a global NestJS response interceptor on selected routes with SetMetadata and Reflector, while keeping response wrapping enabled everywhere else. - [NestJS 拦截器与跳过拦截器](https://www.lihuanyu.com/posts/2023/nestjs%E6%8B%A6%E6%88%AA%E5%99%A8%E4%B8%8E%E8%B7%B3%E8%BF%87%E6%8B%A6%E6%88%AA%E5%99%A8/) - 用 NestJS 全局拦截器统一包装成功响应,并通过自定义装饰器为 Webhook、文件下载等接口跳过包装。 - [你好兰州](https://www.lihuanyu.com/posts/2023/%E4%BD%A0%E5%A5%BD%E5%85%B0%E5%B7%9E/) - 记录一次去兰州参加婚礼的短途旅行,从硬卧火车、黄河、牛肉面、博物馆到西北婚礼和城市气质。 - [React key Is Not Just a List Optimization](https://www.lihuanyu.com/en/posts/2023/react-key-is-not-just-a-list-optimization/) - A practical explanation of how React key participates in component identity, why changing it resets state, and when that is the right tool. - [React 里的 key 不只是列表优化](https://www.lihuanyu.com/posts/2023/React%E7%9A%84key/) - 从一次组件重建问题出发,解释 React key 如何参与组件身份判断,以及什么时候适合用 key 重置状态。 - [Mac 磁盘清理工具推荐:先看清楚,再决定删什么](https://www.lihuanyu.com/posts/2023/Mac%E7%A3%81%E7%9B%98%E6%B8%85%E7%90%86%E5%B7%A5%E5%85%B7%E6%8E%A8%E8%8D%90/) - 推荐 OmniDiskSweeper 作为 Mac 磁盘空间分析工具,并补充 Apple 自带存储管理、DaisyDisk、GrandPerspective 等替代方案,以及清理缓存、系统数据和大文件时的风险边界。 - [A SQL Injection Incident Review: NestJS Validation, Logs, and Server-Side Security](https://www.lihuanyu.com/en/posts/2023/sql-injection-investigation-nestjs/) - A practical review of a SQL injection issue found during a Mini Program security test, covering NestJS validation, ORM query safety, PM2 logs, database constraints, and defense in depth. - [一次 SQL 注入排查复盘:NestJS、日志与服务端安全](https://www.lihuanyu.com/posts/2023/%E8%AE%B0%E5%BD%95%E4%B8%80%E6%AC%A1SQL%E6%B3%A8%E5%85%A5%E4%B8%8E%E9%97%AE%E9%A2%98%E6%8E%92%E6%9F%A5/) - 从一次小程序安全测试触发的 SQL 注入排查出发,复盘 NestJS 参数校验、ORM 查询写法、日志定位、数据库约束和服务端安全防线。 - [小程序页面顶部的空隙](https://www.lihuanyu.com/posts/2023/%E5%B0%8F%E7%A8%8B%E5%BA%8F%E9%A1%B5%E9%9D%A2%E9%A1%B6%E9%83%A8%E7%9A%84%E7%A9%BA%E9%9A%99/) - 解释小程序页面顶部可滚动空隙背后的 margin 塌陷问题,并比较空元素、BFC 和 overflow 方案的取舍。 - [工程师画图工具:Excalidraw 和技术图表达](https://www.lihuanyu.com/posts/2022/%E7%94%BB%E5%9B%BE%E5%B7%A5%E5%85%B7-excalidraw/) - 从 Excalidraw 这款手绘风格画图工具出发,讨论技术文章里的图应该如何帮助读者理解结构、流程、边界和取舍,而不只是让页面看起来热闹。 - [交互的意义](https://www.lihuanyu.com/posts/2022/%E4%BA%A4%E4%BA%92%E7%9A%84%E6%84%8F%E4%B9%89/) - 从电饭煲预约煮粥这件小事出发,讨论好交互为什么不是功能更多,而是把用户需要理解的变量变少,让人用目标语言操作机器。 - [CSS之图片下的空隙与文本居中](https://www.lihuanyu.com/posts/2022/CSS%E4%B9%8B%E5%9B%BE%E7%89%87%E4%B8%8B%E7%9A%84%E7%A9%BA%E9%9A%99%E4%B8%8E%E6%96%87%E6%9C%AC%E5%B1%85%E4%B8%AD/) - 解释图片底部空隙和文本垂直居中偏差背后的 CSS 行内元素、基线、line-height 与字体度量问题。 - [Lockfiles Explained: npm ci and pnpm Frozen Installs](https://www.lihuanyu.com/en/posts/2022/frontend-dependencies-lockfile-reproducible-builds/) - Commit the lockfile and use npm ci or pnpm --frozen-lockfile in CI so package manifests cannot silently resolve a different dependency tree. - [前端依赖、lockfile 与可信构建](https://www.lihuanyu.com/posts/2022/%E5%89%8D%E7%AB%AF%E4%BE%9D%E8%B5%96%E4%B8%8E%E4%BF%A1%E4%BB%BB/) - 从 npm 依赖版本、传递依赖、lockfile、npm ci 和 pnpm frozen install 出发,整理前端项目如何获得更稳定、可复现的构建结果。 - [21年随笔](https://www.lihuanyu.com/posts/2021/21%E5%B9%B4%E9%9A%8F%E7%AC%94/) - 记录 2021 年回到成都后的工作、装修、新家、疫情、行业变化、技术状态、读书、换手机和生活节点。 - [Internationalization for Large Mini Programs: Engineering Lessons from Didi](https://www.lihuanyu.com/en/posts/2020/didi-mini-program-i18n-engineering/) - A review of Didi Mini Program internationalization, covering copy governance, Mini Program runtime constraints, WXS-based translation, cross-platform adaptation, and team workflow. - [大型小程序国际化实践:滴滴出行 i18n 的工程方法](https://www.lihuanyu.com/posts/2020/%E6%BB%B4%E6%BB%B4%E5%87%BA%E8%A1%8C%E5%B0%8F%E7%A8%8B%E5%BA%8FI18n%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5/) - 复盘滴滴出行小程序英文版改造,从文案治理、双线程架构、WXS 翻译函数、跨平台适配和协作流程中提炼大型小程序国际化方法论。 - [GitHub Actions Is an Automation Entry Point, Not a Deployment Machine](https://www.lihuanyu.com/en/posts/2020/github-actions-automation-entry-point-not-deployment-machine/) - A practical review of where GitHub Actions works well, where it becomes the wrong execution environment, and how to draw a cleaner boundary for small project deployments. - [GitHub Actions 适合做什么,不适合做什么](https://www.lihuanyu.com/posts/2020/%E4%BB%8ETravis%E8%BF%81%E7%A7%BB%E5%88%B0GitHub-Actions/) - 从 Travis 迁移、npm 自动发布、Docker 镜像构建和博客 webhook 部署改造出发,重新梳理 GitHub Actions 的使用边界。 - [Package Size Governance for Large Mini Programs: Lessons from Didi](https://www.lihuanyu.com/en/posts/2020/didi-mini-program-package-size-optimization/) - A review of Didi Mini Program package size optimization, covering size budgets, dependency analysis, subpackages, npm dependency placement, and architecture tradeoffs. - [大型小程序体积治理:滴滴出行的分包、依赖与架构取舍](https://www.lihuanyu.com/posts/2020/%E6%BB%B4%E6%BB%B4%E5%87%BA%E8%A1%8C%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BD%93%E7%A7%AF%E4%BC%98%E5%8C%96%E5%AE%9E%E8%B7%B5/) - 复盘滴滴出行小程序包体积优化,从资源压缩、依赖分析、分包治理到封面页方案,整理大型小程序可复用的体积治理方法论。 - [nginx+express做一个简易代理服务](https://www.lihuanyu.com/posts/2020/nginx-express%E5%81%9A%E4%B8%80%E4%B8%AA%E7%AE%80%E6%98%93%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1/) - 记录用 Nginx、Express、PM2 和 Let's Encrypt 搭建一个 HTTPS 代理服务的过程,以及排查 GitHub API 代理超时的细节。 - [npm ci 与稳定依赖安装](https://www.lihuanyu.com/posts/2020/NPM%E5%B0%8F%E6%8A%80%E5%B7%A7/) - 已并入《前端依赖、lockfile 与可信构建》。 - [小程序开发者,为什么你应该尝试下MPX](https://www.lihuanyu.com/posts/2019/mpx1/) - 从原生兼容、第三方组件支持、按需构建、跨平台编译和性能优化等角度,介绍 MPX 小程序框架的主要优势。 - [Docker for Windows 下的前端热更新问题](https://www.lihuanyu.com/posts/2017/docker-for-windows%E4%B8%8D%E5%93%8D%E5%BA%94react%E9%A1%B9%E7%9B%AE%E6%94%B9%E5%8F%98%E5%90%8E%E7%9A%84%E9%87%8D%E7%BC%96%E8%AF%91/) - 已并入《重新认识 Docker:开发环境、Linux 性能开销与 Redis 实战》。 - [前端项目工程化实践](https://www.lihuanyu.com/posts/2017/%E5%89%8D%E7%AB%AF%E9%A1%B9%E7%9B%AE%E5%B7%A5%E7%A8%8B%E5%8C%96%E5%AE%9E%E8%B7%B5/) - 以 Antue 组件库为例,记录前端开源项目接入 Travis CI、lint、测试、构建和 GitHub Pages 自动部署的工程化实践。 - [CORS Cookies Not Sent? Fix Credentials and SameSite](https://www.lihuanyu.com/en/posts/2017/cors-cookies-credentials-samesite/) - Cross-origin cookies not sent? Check credentials, explicit CORS response headers, Set-Cookie ownership, SameSite, Secure, and browser cookie policy. - [CORS 下 Cookie 为什么收不到:从 withCredentials 到 SameSite](https://www.lihuanyu.com/posts/2017/%E8%B0%88%E8%B0%88CORS%E4%B8%8B%E5%89%8D%E7%AB%AF%E7%9A%84cookie/) - CORS 下 Cookie 能不能生效,不只取决于 withCredentials,还取决于服务端 CORS 头、Cookie Domain、SameSite、Secure 和浏览器第三方 Cookie 策略。 - [使用 Docker 解决开发环境问题](https://www.lihuanyu.com/posts/2017/%E4%BD%BF%E7%94%A8Docker%E8%A7%A3%E5%86%B3%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83%E9%97%AE%E9%A2%98/) - 已并入《重新认识 Docker:开发环境、Linux 性能开销与 Redis 实战》。 - [package-lock.json[译]](https://www.lihuanyu.com/posts/2017/package-lock-json-%E8%AF%91/) - 已并入《前端依赖、lockfile 与可信构建》。 - [vue-cli webpack模板mock数据的方法](https://www.lihuanyu.com/posts/2017/webpack%E6%A8%A1%E6%9D%BFmock%E6%95%B0%E6%8D%AE%E7%9A%84%E6%96%B9%E6%B3%95/) - 早期 vue-cli webpack 模板 mock 数据方案的归档页。原方案基于修改 dev-server.js 和 Express 路由,在今天已经不适合作为主要实践参考。 - [排查问题时,不要太早相信第一假设](https://www.lihuanyu.com/posts/2017/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98%E4%B9%8B%E9%81%93/) - 从一次 Vue 组件事件失效的排查经历出发,讨论为什么排查问题时不要太早相信第一假设,以及如何用控制变量、断点、DOM 身份和版本控制把问题一步步缩小。 - [Hello World](https://www.lihuanyu.com/posts/2017/hello-world/) - 记录从 WordPress 迁移到 Hexo 的起点,以及当时对静态博客、服务器维护、CI/CD 和个人写作空间的想法。 - [写了个前端渲染的教程](https://www.lihuanyu.com/posts/2016/%E5%86%99%E4%BA%86%E4%B8%AA%E5%89%8D%E7%AB%AF%E6%B8%B2%E6%9F%93%E7%9A%84%E6%95%99%E7%A8%8B/) - 早年前端渲染教程的归档页。原文记录了从后端模板渲染走向 AJAX 与浏览器端渲染时的理解,今天更适合作为前端发展阶段的历史记录阅读。 - [对前后端分离的思考](https://www.lihuanyu.com/posts/2016/%E5%AF%B9%E5%89%8D%E5%90%8E%E7%AB%AF%E5%88%86%E7%A6%BB%E7%9A%84%E6%80%9D%E8%80%83/) - 结合学校易班轻应用实践,记录从静态页面、Spring Boot 动态网页到前后端分离架构的演进原因和取舍。 ## Pages - [About](https://www.lihuanyu.com/en/pages/about/) - [DeepSeek 接入 SillyTavern 指南:本地 Ollama 与 API 怎么选](https://www.lihuanyu.com/pages/sillytavern-deepseek/) - [SillyTavern with DeepSeek: Local Ollama vs API Setup](https://www.lihuanyu.com/en/pages/sillytavern-deepseek/) - [关于](https://www.lihuanyu.com/pages/about/) - [再见百度,你好滴滴](https://www.lihuanyu.com/pages/goodbyebaidu/) ## Machine-readable outputs - [Posts JSON](https://www.lihuanyu.com/api/posts.json) - [JSON Feed](https://www.lihuanyu.com/feed.json) - [RSS](https://www.lihuanyu.com/rss.xml)