<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>TOC on Timmoc 的技术小屋</title>
    <link>https://t1mmoc.github.io/tags/toc/</link>
    <description>Recent content in TOC on Timmoc 的技术小屋</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 12 Jul 2026 00:04:00 +0800</lastBuildDate>
    <atom:link href="https://t1mmoc.github.io/tags/toc/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>【AIGC】给 Hugo 博客加一段「GitHub 登录才解密」的私货</title>
      <link>https://t1mmoc.github.io/posts/2026-07-11-encrypted-blog/</link>
      <pubDate>Sat, 11 Jul 2026 00:50:00 +0800</pubDate>
      <guid>https://t1mmoc.github.io/posts/2026-07-11-encrypted-blog/</guid>
      <description>&lt;p&gt;最近想把博客里某些段落只给指定的人看——比如自己半成型的想法、给协作者的草稿，又不想让明文躺在公开仓库里被搜索引擎一抓一个准。&lt;/p&gt;
&lt;p&gt;折腾了一天，搞出一套「静态博客 + 边缘 Worker + GitHub 登录 + 浏览器内 AES 解密」的方案。它不算完美（浏览器内解密注定明文要进 DOM），但在「不托管私密后端」的前提下，已经是我能接受的最小暴露面。下面记一下全过程和踩的坑。&lt;/p&gt;
&lt;h2 id=&#34;设计思路是怎么敲定的&#34;&gt;设计思路是怎么敲定的&lt;/h2&gt;
&lt;p&gt;这东西不是一开始就长这样。最初的想法特朴素：博客发 gpg 加密文章，只有拿到私钥的人能看，最好还能在浏览器里直接解密预览、不下载文件。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;第一版：gpg + 浏览器内桥接。&lt;/strong&gt; 研究了一圈 openpgp.js，结论是「能跑但劝退」——每次阅读都得把私钥粘贴进页面，私钥在剪贴板里走一遭，泄露风险不友好；而且整条链路（桥接层 + 密钥管理）维护成本也高。Pass。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
