﻿<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://www.imsun.org/usr/plugins/Rss/rss-minimal.xsl"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>老孙博客</title>
        <link>https://www.imsun.org/</link>
        <atom:link href="https://www.imsun.org/feed" rel="self" type="application/rss+xml" />
        <description>资深网民孙先生</description>
        <language>zh-CN</language>
        <lastBuildDate>Fri, 19 Jun 26 08:01:14 +0000</lastBuildDate>
        <lastBuildDateFormatted>2026年06月19日 08:01</lastBuildDateFormatted>
        <generator>Typecho RSS Plugin</generator>
                <item>
            <title>搬家 &amp;amp; 测试</title>
            <link>https://www.imsun.org/archives/1786.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1786.html</guid>
            <pubDate>Fri, 12 Jun 26 08:41:00 +0000</pubDate>
            <pubDateFormatted>2026年06月12日08:41</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>七牛云的新加坡机房 线路差到了极点 </p><p>于是换到了 vipcloud 三网各自优化2c3g10M带宽,国内访问感觉好多了</p><h1>💻基本信息</h1><p><img src="https://img.imsun.org/2026/06/2944098834.png" alt="image.png" title="image.png"></p><h1>🎬IP质量</h1><p><img src="https://img.imsun.org/2026/06/3666936039.png" alt="image.png" title="image.png"></p><h1>🌐网络质量</h1><p><img src="https://img.imsun.org/2026/06/3514238461.png" alt="image.png" title="image.png"></p><h1>📍回程路由</h1><p><img src="https://img.imsun.org/2026/06/1599260706.png" alt="image.png" title="image.png"></p><p><a href="https://nodequality.com/r/AZwhuzWjbsBtQjerRi8KIBJmZ2GrqDg1">NodeQuality链接</a></p>]]></description>
            <content:encoded><![CDATA[<p>七牛云的新加坡机房 线路差到了极点 </p><p>于是换到了 vipcloud 三网各自优化2c3g10M带宽,国内访问感觉好多了</p><h1>💻基本信息</h1><p><img src="https://img.imsun.org/2026/06/2944098834.png" alt="image.png" title="image.png"></p><h1>🎬IP质量</h1><p><img src="https://img.imsun.org/2026/06/3666936039.png" alt="image.png" title="image.png"></p><h1>🌐网络质量</h1><p><img src="https://img.imsun.org/2026/06/3514238461.png" alt="image.png" title="image.png"></p><h1>📍回程路由</h1><p><img src="https://img.imsun.org/2026/06/1599260706.png" alt="image.png" title="image.png"></p><p><a href="https://nodequality.com/r/AZwhuzWjbsBtQjerRi8KIBJmZ2GrqDg1">NodeQuality链接</a></p>]]></content:encoded>
        </item>
                <item>
            <title>又一款Typecho主题 - Jaguar  </title>
            <link>https://www.imsun.org/archives/1784.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1784.html</guid>
            <pubDate>Tue, 26 May 26 01:01:17 +0000</pubDate>
            <pubDateFormatted>2026年05月26日01:01</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>前言</h2><p>依旧是从<code>bigfa</code>大佬的同名wordpress主题移植而来</p><p>保留大部分原汁原味的设置</p><h2>预览</h2><p>暂无</p><h2>演示站点</h2><p><a href="https://blog.sgcd.net">https://blog.sgcd.net</a></p><h2>下载地址</h2><p>[github=jkjoy/Typecho-Theme-Jaguar]</p><p>[info]喜欢就随手点个star 谢谢[/info]</p>]]></description>
            <content:encoded><![CDATA[<h2>前言</h2><p>依旧是从<code>bigfa</code>大佬的同名wordpress主题移植而来</p><p>保留大部分原汁原味的设置</p><h2>预览</h2><p>暂无</p><h2>演示站点</h2><p><a href="https://blog.sgcd.net">https://blog.sgcd.net</a></p><h2>下载地址</h2><p>[github=jkjoy/Typecho-Theme-Jaguar]</p><p>[info]喜欢就随手点个star 谢谢[/info]</p>]]></content:encoded>
        </item>
                <item>
            <title>又一款Typecho 主题Timellow</title>
            <link>https://www.imsun.org/archives/1783.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1783.html</guid>
            <pubDate>Mon, 27 Apr 26 10:13:00 +0000</pubDate>
            <pubDateFormatted>2026年04月27日10:13</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>简介</h2><p>老孙从刚开始研究主题到现在也移植了不少主题 <br>这次真的是自己慢慢手搓出来的主题 纯原创<br>主打的就是一个简洁无太多功能专注于写作本身(我本身不爱写作)</p><h2>预览</h2><p><img src="https://img.imsun.org/2026/04/4178034347.png" alt="image.png" title="image.png"></p><h2>开源地址</h2><p><a href="https://github.com/jkjoy/typecho-theme-timellow">https://github.com/jkjoy/typecho-theme-timellow</a><br>希望多多点点star,谢谢~</p><h2>演示地址</h2><p><a href="https://www.imsun.org/">https://www.imsun.org/</a></p>]]></description>
            <content:encoded><![CDATA[<h2>简介</h2><p>老孙从刚开始研究主题到现在也移植了不少主题 <br>这次真的是自己慢慢手搓出来的主题 纯原创<br>主打的就是一个简洁无太多功能专注于写作本身(我本身不爱写作)</p><h2>预览</h2><p><img src="https://img.imsun.org/2026/04/4178034347.png" alt="image.png" title="image.png"></p><h2>开源地址</h2><p><a href="https://github.com/jkjoy/typecho-theme-timellow">https://github.com/jkjoy/typecho-theme-timellow</a><br>希望多多点点star,谢谢~</p><h2>演示地址</h2><p><a href="https://www.imsun.org/">https://www.imsun.org/</a></p>]]></content:encoded>
        </item>
                <item>
            <title>又一款Typecho主题 Clarity </title>
            <link>https://www.imsun.org/archives/1780.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1780.html</guid>
            <pubDate>Tue, 03 Mar 26 01:55:00 +0000</pubDate>
            <pubDateFormatted>2026年03月03日01:55</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>简介</h2><p><img src="https://www.imsun.org/usr/themes/clarity/screenshot.png" alt="请输入图片描述" title="请输入图片描述"><br>从 <code>halo</code> 开源主题 Clarity 移植.. </p><p>保留大多数设置</p><h2>使用</h2><p>建议配合插件<code>Enhancement</code>一起使用过 效果更佳</p><p>[article id="1779"]</p><h2>预览</h2><p>本站</p><h2>下载地址</h2><p><a href="https://github.com/jkjoy/theme-clarity">https://github.com/jkjoy/theme-clarity</a></p><h2>配置文档</h2><p><a href="https://www.imsun.org/Clarity-theme-docs/">https://www.imsun.org/Clarity-theme-docs/</a></p>]]></description>
            <content:encoded><![CDATA[<h2>简介</h2><p><img src="https://www.imsun.org/usr/themes/clarity/screenshot.png" alt="请输入图片描述" title="请输入图片描述"><br>从 <code>halo</code> 开源主题 Clarity 移植.. </p><p>保留大多数设置</p><h2>使用</h2><p>建议配合插件<code>Enhancement</code>一起使用过 效果更佳</p><p>[article id="1779"]</p><h2>预览</h2><p>本站</p><h2>下载地址</h2><p><a href="https://github.com/jkjoy/theme-clarity">https://github.com/jkjoy/theme-clarity</a></p><h2>配置文档</h2><p><a href="https://www.imsun.org/Clarity-theme-docs/">https://www.imsun.org/Clarity-theme-docs/</a></p>]]></content:encoded>
        </item>
                <item>
            <title>Typecho 缝合怪插件Enhancement </title>
            <link>https://www.imsun.org/archives/1779.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1779.html</guid>
            <pubDate>Thu, 26 Feb 26 03:59:10 +0000</pubDate>
            <pubDateFormatted>2026年02月26日03:59</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>简介</h2><p>本插件进行了常用插件缝合,并针对主题进行了优化</p><h2>功能</h2><p>融合怪插件 —— 友链增强 + 瞬间 + 标签助手 + 站点地图 + 评论增强 + 外链跳转 + 视频链接解析 + QQ通知 + 邮件提醒 + 主题插件在线上传/删除等多功能于一体的 Typecho 插件。</p><ul><li>使用 typecho_links 数据表存储友链信息<br>输出方式：模板函数调用 + 文章内标签解析<br>三种输出模式：SHOW_TEXT / SHOW_IMG / SHOW_MIX，可在插件配置中自定义规则<br>管理面板：分类、拖拽排序、审核通过/驳回<br>游客提交：前台提交后默认待审核，仅通过审核的记录会输出</li><li>瞬间功能：新增 typecho_moments 表并提供 JSON API</li><li>评论同步：游客/登录用户评论时自动同步历史评论中的网址/昵称/邮箱</li><li>标签助手：后台写文章时显示标签快捷选择列表</li><li>站点地图：提供 /sitemap.xml</li><li>QQ评论通知：评论通过时通过 QQ 机器人推送</li><li>评论邮件提醒：支持 SMTP 推送，支持模板管理</li><li>可选Gravatar头像镜像加速</li><li>可选视频链接解析：自动将 YouTube / Bilibili / 优酷链接替换为播放器</li><li>可选音乐链接解析：自动将网易云音乐 / QQ音乐 / 酷狗音乐链接替换为 APlayer 播放器<br>禁用插件时可选择删除友情链接表/说说表/QQ通知队列表</li><li>可选外链新窗口打开：自动为 a 标签补充 target 与安全 rel</li><li>外链跳转提醒：文章/评论内外链及评论者网站地址统一走 /go/<base64> 中转提醒页</li><li>可选 Turnstile 人机验证：统一保护评论与友情链接提交<br>插件设置支持一键备份与一键恢复（数据库快照）</li><li>支持在线上传安装 ZIP 插件/主题，支持删除未启用插件和未启用主题</li></ul><h2>安装</h2><p>上传到 usr/plugins/Enhancement<br>后台启用插件</p><h2>项目地址</h2><p><a href="https://github.com/jkjoy/Enhancement">https://github.com/jkjoy/Enhancement</a></p>]]></description>
            <content:encoded><![CDATA[<h2>简介</h2><p>本插件进行了常用插件缝合,并针对主题进行了优化</p><h2>功能</h2><p>融合怪插件 —— 友链增强 + 瞬间 + 标签助手 + 站点地图 + 评论增强 + 外链跳转 + 视频链接解析 + QQ通知 + 邮件提醒 + 主题插件在线上传/删除等多功能于一体的 Typecho 插件。</p><ul><li>使用 typecho_links 数据表存储友链信息<br>输出方式：模板函数调用 + 文章内标签解析<br>三种输出模式：SHOW_TEXT / SHOW_IMG / SHOW_MIX，可在插件配置中自定义规则<br>管理面板：分类、拖拽排序、审核通过/驳回<br>游客提交：前台提交后默认待审核，仅通过审核的记录会输出</li><li>瞬间功能：新增 typecho_moments 表并提供 JSON API</li><li>评论同步：游客/登录用户评论时自动同步历史评论中的网址/昵称/邮箱</li><li>标签助手：后台写文章时显示标签快捷选择列表</li><li>站点地图：提供 /sitemap.xml</li><li>QQ评论通知：评论通过时通过 QQ 机器人推送</li><li>评论邮件提醒：支持 SMTP 推送，支持模板管理</li><li>可选Gravatar头像镜像加速</li><li>可选视频链接解析：自动将 YouTube / Bilibili / 优酷链接替换为播放器</li><li>可选音乐链接解析：自动将网易云音乐 / QQ音乐 / 酷狗音乐链接替换为 APlayer 播放器<br>禁用插件时可选择删除友情链接表/说说表/QQ通知队列表</li><li>可选外链新窗口打开：自动为 a 标签补充 target 与安全 rel</li><li>外链跳转提醒：文章/评论内外链及评论者网站地址统一走 /go/<base64> 中转提醒页</li><li>可选 Turnstile 人机验证：统一保护评论与友情链接提交<br>插件设置支持一键备份与一键恢复（数据库快照）</li><li>支持在线上传安装 ZIP 插件/主题，支持删除未启用插件和未启用主题</li></ul><h2>安装</h2><p>上传到 usr/plugins/Enhancement<br>后台启用插件</p><h2>项目地址</h2><p><a href="https://github.com/jkjoy/Enhancement">https://github.com/jkjoy/Enhancement</a></p>]]></content:encoded>
        </item>
                <item>
            <title>随手记 20260128</title>
            <link>https://www.imsun.org/archives/1767.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1767.html</guid>
            <pubDate>Sat, 24 Jan 26 09:03:00 +0000</pubDate>
            <pubDateFormatted>2026年01月24日09:03</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>近日<code>Typecho</code>突然诈尸更新了版本号 1.3.0<br>其实与之前的<code>beta</code>版本相差不大..</p><p>[info]但是更新需谨慎![/info]<br>部分插件或者主题 在1.3.0无法继续使用..</p><p><img src="https://img.imsun.org/2026/06/713830388.png" alt="fqDucQ.png" title="fqDucQ.png"></p><hr><p>在<code>1panel</code>使用<code>Typecho</code>的过程中还是会有一些问题 使用自带的伪静态规则大概率会出现 404 </p><p>需要修改伪静态为</p><pre><code>    location / {
        try_files $uri $uri/ /index.php?$args;
    }</code></pre><hr><p>因为高中时候最喜欢武侠小说,而武侠作家之中最喜欢古龙的作品,再加上古龙最喜欢借人物之口讲些人生道理.<br>所以我做了一个api 收集了一些古龙的语录.</p><pre><code>  &lt;div id=&quot;quote&quot;&gt;加载中&lt;/div&gt;
  &lt;script&gt;
    async function loadQuote() {
      try {
        const res = await fetch(&#039;https://api.zxd.im/api&#039;);
        const data = await res.json();
        document.getElementById(&#039;quote&#039;).textContent = data.text;
      } catch (e) {
        document.getElementById(&#039;quote&#039;).textContent = &#039;加载失败&#039;;
      }
    }
    loadQuote();
  &lt;/script&gt;</code></pre><p>来调用古龙语录.</p><p>此项目用 Cloudflare Workers + KV 部署, 自用还行</p>]]></description>
            <content:encoded><![CDATA[<p>近日<code>Typecho</code>突然诈尸更新了版本号 1.3.0<br>其实与之前的<code>beta</code>版本相差不大..</p><p>[info]但是更新需谨慎![/info]<br>部分插件或者主题 在1.3.0无法继续使用..</p><p><img src="https://img.imsun.org/2026/06/713830388.png" alt="fqDucQ.png" title="fqDucQ.png"></p><hr><p>在<code>1panel</code>使用<code>Typecho</code>的过程中还是会有一些问题 使用自带的伪静态规则大概率会出现 404 </p><p>需要修改伪静态为</p><pre><code>    location / {
        try_files $uri $uri/ /index.php?$args;
    }</code></pre><hr><p>因为高中时候最喜欢武侠小说,而武侠作家之中最喜欢古龙的作品,再加上古龙最喜欢借人物之口讲些人生道理.<br>所以我做了一个api 收集了一些古龙的语录.</p><pre><code>  &lt;div id=&quot;quote&quot;&gt;加载中&lt;/div&gt;
  &lt;script&gt;
    async function loadQuote() {
      try {
        const res = await fetch(&#039;https://api.zxd.im/api&#039;);
        const data = await res.json();
        document.getElementById(&#039;quote&#039;).textContent = data.text;
      } catch (e) {
        document.getElementById(&#039;quote&#039;).textContent = &#039;加载失败&#039;;
      }
    }
    loadQuote();
  &lt;/script&gt;</code></pre><p>来调用古龙语录.</p><p>此项目用 Cloudflare Workers + KV 部署, 自用还行</p>]]></content:encoded>
        </item>
                <item>
            <title>装机计划 and 环境部署</title>
            <link>https://www.imsun.org/archives/1764.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1764.html</guid>
            <pubDate>Sat, 20 Dec 25 11:57:00 +0000</pubDate>
            <pubDateFormatted>2025年12月20日11:57</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>起因</h2><p>最近由于内存涨价了, 我把x99平台的4条16G内存卖了, 回了一波血, 暂时不打算玩这个老旧的平台了</p><p>恰好手里头有张微星的Z590M 爆破弹, 准备换平台玩玩.</p><p>于是在拼夕夕斥巨资买了一颗i5 10600KF 花费 458..</p><p>内存就使用 几年前玩机 扔在抽屉里的 金百达 DDR4 2666MHZ 8G X2 开启XMP 可运行在3000MHZ.</p><p>硬盘还有两块铠侠 的 1T m.2 也是当年玩机买的 当时的价格貌似是599一块.</p><p>显卡使用百战老兵 AMD RX5600XT 6G 黑苹果免驱</p><p>网卡使用 BCM94360CD 黑苹果免驱 (15之前)</p><h2>配置</h2><table><thead><tr><th>名称</th><th>型号</th><th>价格</th><th>渠道</th></tr></thead><tbody><tr><td>主板</td><td>微星Z590M爆破弹</td><td>0</td><td>拆机</td></tr><tr><td>CPU</td><td>i5 10600KF</td><td>如今价格458</td><td>拼夕夕</td></tr><tr><td>内存</td><td>金百达 8g * 2</td><td>0</td><td>拼夕夕</td></tr><tr><td>硬盘</td><td>威刚 512G M2 SSD</td><td>0</td><td>淘宝</td></tr><tr><td>硬盘</td><td>三星 980 250G M2 SSD</td><td>0</td><td>拆机</td></tr><tr><td>网卡</td><td>BCM94360CD</td><td>0</td><td>淘宝</td></tr><tr><td>显卡</td><td>蓝宝石RX5600XT</td><td>0</td><td>拼夕夕</td></tr><tr><td>机箱</td><td>航嘉</td><td>0</td><td>淘宝</td></tr><tr><td>散热器</td><td>大水牛240水冷</td><td>0</td><td>京东</td></tr></tbody></table><ul><li>很多都是很多年前装机屯的 或者 用过的就不标注价格了</li></ul><h2>计划</h2><p>一块SSD安装WIN10 </p><p>另一块SSD安装macOS Monterey 双系统 Opencore引导.</p><h2>U盘启动盘</h2><p>装系统必备U盘,大约16G左右够用 32G为佳.</p><p>使用<code>Ventoy</code><br>下载地址 <a href="https://www.ventoy.net/en/download.html">https://www.ventoy.net/en/download.html</a><br>制作好的启动盘可以引导各种iso镜像</p><p>此时我们就需要<code>winPE</code>镜像,我比较推荐的是WEPE <a href="https://www.wepe.com.cn/download.html">https://www.wepe.com.cn/download.html</a><br>通过<code>微PE工具箱V2.3</code>生成<code>WePE_64_V2.3.iso</code><br><code>Windows</code>安装镜像 推荐官网下载 <a href="https://www.microsoft.com/zh-cn/software-download/windows11">https://www.microsoft.com/zh-cn/software-download/windows11</a><br>如果需要Linux也可以下载<code>Ubuntu</code> <code>Debian</code> 等 放入制作好的U盘中,盘符默认为<code>ventoy</code></p><h2>安装Windows</h2><p>把U盘启动项作为第一启动项 </p><p>进入<code>Ventoy</code>的引导界面,选择<code>WePE_64_V2.3.iso</code>,进入<code>winPE</code></p><p>使用<code>Diskgenius</code>删除整个硬盘的所有分区 保存 右键点击 该硬盘 转为GPT分区,如果已经是GPT分区跳过此步骤</p><p>新建<code>ESP</code>分区 大约 300MB 作为EFI引导</p><p>新建分区 大约256G 作为Windows安装分区</p><p>新建分区 剩余空间 作为软件安装分区 保存</p><p>使用<code>WINSETUP</code>来安装</p><p>镜像选择 下载好的官方镜像 ESP分区选择创建好的 ESP分区</p><p>C盘选择 创建的256G分区</p><p>点击安装 完成后重启 即完成安装部分</p><h2>激活WINDOWS</h2><p>我使用的是批量激活码KMS激活,大概半年需要激活一次,使用NAS搭建的KMS服务器<br>Docker镜像 使用<code>jkjoy/kms</code> 映射 1688 8080 端口</p><p>顺便激活<code>Office</code>全家桶,使用 <code>Office tool plus</code> <a href="https://otp.landian.vip/zh-cn/">https://otp.landian.vip/zh-cn/</a></p><p>主打一个不花钱</p><h2>引导</h2><p>使用开源项目 <a href="https://github.com/lzhoang2801/OpCore-Simplify">https://github.com/lzhoang2801/OpCore-Simplify</a></p><p>在<code>windows</code> 下 挂上代理 安装好<code>Python</code>环境</p><pre><code>git clone https://github.com/lzhoang2801/OpCore-Simplify
cd OpCore-Simplify
python OpCore-Simplify.py</code></pre><p>根据顺序选择 自动等待下载 并生成opencore引导的EFI文件</p><h2>安装macOS</h2><p>安装就十分简单了,选择下载镜像</p><p>网络上有很多制作好的原版镜像dmg格式</p><p>使用<a href="https://etcher.balena.io/">Balena etcher</a> 烧录U盘, <br>使用<code>Diskgenius</code>打开U盘的EFI分区把生成好的引导文件复制进去.</p><p>重启电脑选择 U盘为第一启动项</p><p>即可顺利进入安装界面.</p><p><img src="https://img.imsun.org/2025/12/1090031260.png" alt="截屏2025-12-27 23.56.22.png" title="截屏2025-12-27 23.56.22.png"></p><h2>补丁</h2><p>由于macOs 14 以后的系统已经不支持原本免驱的网卡,所以需要使用打补丁的方式来驱动无线网卡</p><p><a href="https://github.com/laobamac/OCLP-Mod">https://github.com/laobamac/OCLP-Mod</a></p><p>此项目也可以给集显驱动和声卡驱动打补丁<br><img src="https://img.imsun.org/2025/12/4107869926.png" alt="截屏2025-12-27 23.58.41.png" title="截屏2025-12-27 23.58.41.png"></p><h2>常用环境</h2><p>首先安装brew [article id="338"]</p><p>但是奇怪的是使用<code>brew</code>不能正常安装<code>nodejs</code>，一直报错</p><pre><code>Error: An exception occurred within a child process:
  FormulaUnavailableError: No available formula with the name &quot;formula.jws.json&quot;.</code></pre><p>所以使用<code>nvm</code>来安装</p><p>先安装<code>nvm</code></p><pre><code class="lang-bash">curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. &quot;$HOME/.nvm/nvm.sh&quot;</code></pre><p>安装<code>nodejs</code> 24.12</p><pre><code class="lang-bash">nvm install 24</code></pre>]]></description>
            <content:encoded><![CDATA[<h2>起因</h2><p>最近由于内存涨价了, 我把x99平台的4条16G内存卖了, 回了一波血, 暂时不打算玩这个老旧的平台了</p><p>恰好手里头有张微星的Z590M 爆破弹, 准备换平台玩玩.</p><p>于是在拼夕夕斥巨资买了一颗i5 10600KF 花费 458..</p><p>内存就使用 几年前玩机 扔在抽屉里的 金百达 DDR4 2666MHZ 8G X2 开启XMP 可运行在3000MHZ.</p><p>硬盘还有两块铠侠 的 1T m.2 也是当年玩机买的 当时的价格貌似是599一块.</p><p>显卡使用百战老兵 AMD RX5600XT 6G 黑苹果免驱</p><p>网卡使用 BCM94360CD 黑苹果免驱 (15之前)</p><h2>配置</h2><table><thead><tr><th>名称</th><th>型号</th><th>价格</th><th>渠道</th></tr></thead><tbody><tr><td>主板</td><td>微星Z590M爆破弹</td><td>0</td><td>拆机</td></tr><tr><td>CPU</td><td>i5 10600KF</td><td>如今价格458</td><td>拼夕夕</td></tr><tr><td>内存</td><td>金百达 8g * 2</td><td>0</td><td>拼夕夕</td></tr><tr><td>硬盘</td><td>威刚 512G M2 SSD</td><td>0</td><td>淘宝</td></tr><tr><td>硬盘</td><td>三星 980 250G M2 SSD</td><td>0</td><td>拆机</td></tr><tr><td>网卡</td><td>BCM94360CD</td><td>0</td><td>淘宝</td></tr><tr><td>显卡</td><td>蓝宝石RX5600XT</td><td>0</td><td>拼夕夕</td></tr><tr><td>机箱</td><td>航嘉</td><td>0</td><td>淘宝</td></tr><tr><td>散热器</td><td>大水牛240水冷</td><td>0</td><td>京东</td></tr></tbody></table><ul><li>很多都是很多年前装机屯的 或者 用过的就不标注价格了</li></ul><h2>计划</h2><p>一块SSD安装WIN10 </p><p>另一块SSD安装macOS Monterey 双系统 Opencore引导.</p><h2>U盘启动盘</h2><p>装系统必备U盘,大约16G左右够用 32G为佳.</p><p>使用<code>Ventoy</code><br>下载地址 <a href="https://www.ventoy.net/en/download.html">https://www.ventoy.net/en/download.html</a><br>制作好的启动盘可以引导各种iso镜像</p><p>此时我们就需要<code>winPE</code>镜像,我比较推荐的是WEPE <a href="https://www.wepe.com.cn/download.html">https://www.wepe.com.cn/download.html</a><br>通过<code>微PE工具箱V2.3</code>生成<code>WePE_64_V2.3.iso</code><br><code>Windows</code>安装镜像 推荐官网下载 <a href="https://www.microsoft.com/zh-cn/software-download/windows11">https://www.microsoft.com/zh-cn/software-download/windows11</a><br>如果需要Linux也可以下载<code>Ubuntu</code> <code>Debian</code> 等 放入制作好的U盘中,盘符默认为<code>ventoy</code></p><h2>安装Windows</h2><p>把U盘启动项作为第一启动项 </p><p>进入<code>Ventoy</code>的引导界面,选择<code>WePE_64_V2.3.iso</code>,进入<code>winPE</code></p><p>使用<code>Diskgenius</code>删除整个硬盘的所有分区 保存 右键点击 该硬盘 转为GPT分区,如果已经是GPT分区跳过此步骤</p><p>新建<code>ESP</code>分区 大约 300MB 作为EFI引导</p><p>新建分区 大约256G 作为Windows安装分区</p><p>新建分区 剩余空间 作为软件安装分区 保存</p><p>使用<code>WINSETUP</code>来安装</p><p>镜像选择 下载好的官方镜像 ESP分区选择创建好的 ESP分区</p><p>C盘选择 创建的256G分区</p><p>点击安装 完成后重启 即完成安装部分</p><h2>激活WINDOWS</h2><p>我使用的是批量激活码KMS激活,大概半年需要激活一次,使用NAS搭建的KMS服务器<br>Docker镜像 使用<code>jkjoy/kms</code> 映射 1688 8080 端口</p><p>顺便激活<code>Office</code>全家桶,使用 <code>Office tool plus</code> <a href="https://otp.landian.vip/zh-cn/">https://otp.landian.vip/zh-cn/</a></p><p>主打一个不花钱</p><h2>引导</h2><p>使用开源项目 <a href="https://github.com/lzhoang2801/OpCore-Simplify">https://github.com/lzhoang2801/OpCore-Simplify</a></p><p>在<code>windows</code> 下 挂上代理 安装好<code>Python</code>环境</p><pre><code>git clone https://github.com/lzhoang2801/OpCore-Simplify
cd OpCore-Simplify
python OpCore-Simplify.py</code></pre><p>根据顺序选择 自动等待下载 并生成opencore引导的EFI文件</p><h2>安装macOS</h2><p>安装就十分简单了,选择下载镜像</p><p>网络上有很多制作好的原版镜像dmg格式</p><p>使用<a href="https://etcher.balena.io/">Balena etcher</a> 烧录U盘, <br>使用<code>Diskgenius</code>打开U盘的EFI分区把生成好的引导文件复制进去.</p><p>重启电脑选择 U盘为第一启动项</p><p>即可顺利进入安装界面.</p><p><img src="https://img.imsun.org/2025/12/1090031260.png" alt="截屏2025-12-27 23.56.22.png" title="截屏2025-12-27 23.56.22.png"></p><h2>补丁</h2><p>由于macOs 14 以后的系统已经不支持原本免驱的网卡,所以需要使用打补丁的方式来驱动无线网卡</p><p><a href="https://github.com/laobamac/OCLP-Mod">https://github.com/laobamac/OCLP-Mod</a></p><p>此项目也可以给集显驱动和声卡驱动打补丁<br><img src="https://img.imsun.org/2025/12/4107869926.png" alt="截屏2025-12-27 23.58.41.png" title="截屏2025-12-27 23.58.41.png"></p><h2>常用环境</h2><p>首先安装brew [article id="338"]</p><p>但是奇怪的是使用<code>brew</code>不能正常安装<code>nodejs</code>，一直报错</p><pre><code>Error: An exception occurred within a child process:
  FormulaUnavailableError: No available formula with the name &quot;formula.jws.json&quot;.</code></pre><p>所以使用<code>nvm</code>来安装</p><p>先安装<code>nvm</code></p><pre><code class="lang-bash">curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. &quot;$HOME/.nvm/nvm.sh&quot;</code></pre><p>安装<code>nodejs</code> 24.12</p><pre><code class="lang-bash">nvm install 24</code></pre>]]></content:encoded>
        </item>
                <item>
            <title>一个基于AI的Typecho辅助生成插件 AIHelper</title>
            <link>https://www.imsun.org/archives/1763.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1763.html</guid>
            <pubDate>Wed, 03 Dec 25 03:50:00 +0000</pubDate>
            <pubDateFormatted>2025年12月03日03:50</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>功能</h2><p>基于AI实现 slug/摘要/标签提取/文章内容生成 等功能<br>插件设置可以自定义提示词,根据你的需要生成相关内容</p><h2>下载</h2><p>[download file='AIHelper_NnneT.tar.gz' size='16.5kb']<a href="https://file.imsun.org/upload/2025-12/AIHelper_NnneT.tar.gz">https://file.imsun.org/upload/2025-12/AIHelper_NnneT.tar.gz</a>[/download]</p><p>[download file='demo.zip' size='1024kb']<a href="https://file.imsun.org/demo.zip">https://file.imsun.org/demo.zip</a>[/download]</p>]]></description>
            <content:encoded><![CDATA[<h2>功能</h2><p>基于AI实现 slug/摘要/标签提取/文章内容生成 等功能<br>插件设置可以自定义提示词,根据你的需要生成相关内容</p><h2>下载</h2><p>[download file='AIHelper_NnneT.tar.gz' size='16.5kb']<a href="https://file.imsun.org/upload/2025-12/AIHelper_NnneT.tar.gz">https://file.imsun.org/upload/2025-12/AIHelper_NnneT.tar.gz</a>[/download]</p><p>[download file='demo.zip' size='1024kb']<a href="https://file.imsun.org/demo.zip">https://file.imsun.org/demo.zip</a>[/download]</p>]]></content:encoded>
        </item>
                <item>
            <title>修复Typecho UploadPlugin插件在1.3.0中的上传问题</title>
            <link>https://www.imsun.org/archives/1762.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1762.html</guid>
            <pubDate>Mon, 24 Nov 25 09:20:00 +0000</pubDate>
            <pubDateFormatted>2025年11月24日09:20</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>Typecho 1.2中正常使用的UploadPlugin插件在 1.3 beta中无法正常的上传主题和插件了 非常的不方便</p><p>于是修复了上传的问题</p><p>下载地址放在下面 自取</p><p>[download file='UploadPlugin.zip' size='7.5KB']<a href="https://file.imsun.org/upload/2025-11/UploadPlugin%20">https://file.imsun.org/upload/2025-11/UploadPlugin%20</a>(1).zip [/download]</p>]]></description>
            <content:encoded><![CDATA[<p>Typecho 1.2中正常使用的UploadPlugin插件在 1.3 beta中无法正常的上传主题和插件了 非常的不方便</p><p>于是修复了上传的问题</p><p>下载地址放在下面 自取</p><p>[download file='UploadPlugin.zip' size='7.5KB']<a href="https://file.imsun.org/upload/2025-11/UploadPlugin%20">https://file.imsun.org/upload/2025-11/UploadPlugin%20</a>(1).zip [/download]</p>]]></content:encoded>
        </item>
                <item>
            <title>规则</title>
            <link>https://www.imsun.org/archives/1761.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1761.html</guid>
            <pubDate>Fri, 14 Nov 25 07:14:00 +0000</pubDate>
            <pubDateFormatted>2025年11月14日07:14</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>这制订规则的人当真是有着高高在上的傲慢.</p><p>遵守规则的我反而陷入了困境之中.</p><p>不知道为何我这个域名现在被腾讯拉入了黑名单,连带着使用了腾讯安全数据的小米手机也会提示危险</p><p><img src="https://img.imsun.org/2025/11/3251615497.jpg" alt="Screenshot_2025-11-14-15-07-19-551_com.android.br.jpg" title="Screenshot_2025-11-14-15-07-19-551_com.android.br.jpg"></p><p>我不理解,我曾经申诉过几次,有时候好一段时间,然后就又红了.</p><p>在不明真相的人眼中 这无异于败坏了我的人品.</p><p>实在不行就换个域名重来过..</p>]]></description>
            <content:encoded><![CDATA[<p>这制订规则的人当真是有着高高在上的傲慢.</p><p>遵守规则的我反而陷入了困境之中.</p><p>不知道为何我这个域名现在被腾讯拉入了黑名单,连带着使用了腾讯安全数据的小米手机也会提示危险</p><p><img src="https://img.imsun.org/2025/11/3251615497.jpg" alt="Screenshot_2025-11-14-15-07-19-551_com.android.br.jpg" title="Screenshot_2025-11-14-15-07-19-551_com.android.br.jpg"></p><p>我不理解,我曾经申诉过几次,有时候好一段时间,然后就又红了.</p><p>在不明真相的人眼中 这无异于败坏了我的人品.</p><p>实在不行就换个域名重来过..</p>]]></content:encoded>
        </item>
                <item>
            <title>&amp;quot;套娃&amp;quot;</title>
            <link>https://www.imsun.org/archives/1759.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1759.html</guid>
            <pubDate>Sun, 09 Nov 25 06:58:58 +0000</pubDate>
            <pubDateFormatted>2025年11月09日06:58</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>因为想用Cloudflare的Workers 和 D1 部署一个完全仿照Wordpress Rest API 的博客后端</p><p>所以 用AI糊了一个项目 </p><p><a href="https://github.com/jkjoy/cfblog">https://github.com/jkjoy/cfblog</a></p><p>为了能使用这个后端 所以就又糊了一个基于vue3的前端 仿 Akina 风格</p><p><a href="https://github.com/jkjoy/cfblog-theme-akina">https://github.com/jkjoy/cfblog-theme-akina</a></p><p>同时又仿hugo主题paper 糊了一个Astro 的前端</p><p><a href="https://github.com/jkjoy/cfblog-theme-paper">https://github.com/jkjoy/cfblog-theme-paper</a></p><p>为了让这个主题能同时兼容wordpress 和 typecho</p><p>于是我又开了一个<br><a href="https://github.com/jkjoy/Typecho-RestAPI">https://github.com/jkjoy/Typecho-RestAPI</a></p><p>为了让wordpress 的API路由兼容更好</p><p>我又仿sunnylite主题 弄了个wordpress主题</p><p><a href="https://www.sgcd.net">https://www.sgcd.net</a></p>]]></description>
            <content:encoded><![CDATA[<p>因为想用Cloudflare的Workers 和 D1 部署一个完全仿照Wordpress Rest API 的博客后端</p><p>所以 用AI糊了一个项目 </p><p><a href="https://github.com/jkjoy/cfblog">https://github.com/jkjoy/cfblog</a></p><p>为了能使用这个后端 所以就又糊了一个基于vue3的前端 仿 Akina 风格</p><p><a href="https://github.com/jkjoy/cfblog-theme-akina">https://github.com/jkjoy/cfblog-theme-akina</a></p><p>同时又仿hugo主题paper 糊了一个Astro 的前端</p><p><a href="https://github.com/jkjoy/cfblog-theme-paper">https://github.com/jkjoy/cfblog-theme-paper</a></p><p>为了让这个主题能同时兼容wordpress 和 typecho</p><p>于是我又开了一个<br><a href="https://github.com/jkjoy/Typecho-RestAPI">https://github.com/jkjoy/Typecho-RestAPI</a></p><p>为了让wordpress 的API路由兼容更好</p><p>我又仿sunnylite主题 弄了个wordpress主题</p><p><a href="https://www.sgcd.net">https://www.sgcd.net</a></p>]]></content:encoded>
        </item>
                <item>
            <title>Typecho RSS 全文输出美化插件</title>
            <link>https://www.imsun.org/archives/1753.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1753.html</guid>
            <pubDate>Mon, 20 Oct 25 01:18:00 +0000</pubDate>
            <pubDateFormatted>2025年10月20日01:18</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>一个功能强大的 Typecho RSS 插件，支持全文输出和多种美化显示风格。</p><h2>功能特点</h2><ul><li><strong>全文输出</strong>: 支持输出文章全文或摘要</li><li><strong>多种主题</strong>: 提供 4 种精美样式主题供选择</li><li><strong>美化显示</strong>: 在浏览器中直接打开 RSS 链接时显示美观的界面</li><li><strong>灵活配置</strong>: 可自定义文章数量、输出内容、版权信息等</li><li><strong>响应式设计</strong>: 完美适配桌面和移动设备</li><li><strong>接管原生路由</strong>: 完全接管 Typecho 的 <code>/feed</code> 路由</li></ul><h2>安装方法</h2><ol><li><p>下载插件到 Typecho 插件目录：</p><pre><code>/usr/plugins/Rss/</code></pre></li><li><p>在 Typecho 后台启用插件：</p><ul><li>进入 <strong>控制台</strong> → <strong>插件</strong> → <strong>已安装插件</strong></li><li>找到 <strong>Rss</strong> 插件，点击 <strong>启用</strong></li></ul></li><li><p>配置插件（可选）：</p><ul><li>点击插件的 <strong>设置</strong> 按钮</li><li>根据需要调整配置选项</li></ul></li></ol><h2>配置选项</h2><h3>RSS 文章数量</h3><ul><li>设置 RSS 输出的文章数量</li><li>默认为 20 篇</li><li>设置为 0 则输出全部文章</li></ul><h3>RSS 内容输出</h3><ul><li><strong>输出全文</strong>: 在 RSS 中显示文章完整内容</li><li><strong>输出摘要</strong>: 仅显示文章摘要（前 200 字符）</li></ul><h3>RSS 样式美化</h3><ul><li><strong>启用</strong>: 在浏览器中访问时显示美化界面</li><li><strong>禁用</strong>: 输出纯 XML 格式</li></ul><h3>样式主题</h3><p>插件提供 4 种不同风格的主题供选择：</p><ol><li><p><strong>渐变风格 (gradient)</strong> - 默认主题</p><ul><li>紫色渐变背景</li><li>现代感强，视觉冲击力强</li><li>卡片式布局，悬停动画</li><li>适合个人博客、创意类网站</li></ul></li><li><p><strong>简洁风格 (minimal)</strong></p><ul><li>黑白配色，简约设计</li><li>清爽干净，专注内容</li><li>类似报纸排版</li><li>适合技术博客、文字类内容</li></ul></li><li><p><strong>现代风格 (modern)</strong></p><ul><li>蓝色系商务风格</li><li>专业大气，层次分明</li><li>卡片阴影，渐变头部</li><li>适合企业博客、专业网站</li></ul></li><li><p><strong>暗黑风格 (dark)</strong></p><ul><li>深色主题，护眼舒适</li><li>GitHub 风格配色</li><li>自定义滚动条美化</li><li>适合夜间阅读、开发者</li></ul></li></ol><h3>版权信息</h3><ul><li>在每篇文章末尾添加自定义版权信息</li><li>支持 HTML 标签</li><li><p>示例：</p><pre><code class="lang-html">&lt;p&gt;本文由 &lt;a href=&quot;https://example.com&quot;&gt;我的博客&lt;/a&gt; 原创发布&lt;/p&gt;
&lt;p&gt;转载请注明出处&lt;/p&gt;</code></pre></li></ul><h2>使用方法</h2><p>启用插件后，可以通过以下 URL 访问 RSS：</p><h3>主要访问地址</h3><pre><code>https://你的域名/feed</code></pre><p>插件会自动接管 Typecho 原生的 <code>/feed</code> 路由，使用美化后的 RSS 输出。</p><h3>在 RSS 阅读器中订阅</h3><p>将上述任一地址复制到您的 RSS 阅读器（如 Feedly、Inoreader 等）中即可订阅。</p><h3>在浏览器中访问</h3><p>直接在浏览器中打开上述地址，将看到美化后的 RSS 页面。根据你在插件设置中选择的主题，会显示不同风格：</p><ul><li><strong>渐变风格</strong>: 紫色渐变背景 + 白色卡片</li><li><strong>简洁风格</strong>: 纯白背景 + 黑白排版</li><li><strong>现代风格</strong>: 蓝色渐变头部 + 灰白背景</li><li><strong>暗黑风格</strong>: 深色背景 + 蓝色点缀</li></ul><h2>主题样式预览</h2><h3>渐变风格 (Gradient)</h3><ul><li>视觉特点: 紫色渐变背景，白色圆角卡片</li><li>配色方案: <code>#667eea</code> → <code>#764ba2</code></li><li>适用场景: 个人博客、创意网站</li><li>设计元素: 悬停动画、阴影效果、圆角设计</li></ul><h3>简洁风格 (Minimal)</h3><ul><li>视觉特点: 黑白配色，线条分割</li><li>配色方案: <code>#000</code> + <code>#fff</code> + <code>#666</code></li><li>适用场景: 技术博客、专业内容</li><li>设计元素: 极简排版、下划线链接、报纸式布局</li></ul><h3>现代风格 (Modern)</h3><ul><li>视觉特点: 蓝色系商务风格</li><li>配色方案: <code>#0066cc</code> → <code>#0052a3</code></li><li>适用场景: 企业网站、专业机构</li><li>设计元素: 卡片悬停效果、徽章标签、渐变头部</li></ul><h3>暗黑风格 (Dark)</h3><ul><li>视觉特点: GitHub 式深色主题</li><li>配色方案: <code>#0d1117</code> + <code>#58a6ff</code></li><li>适用场景: 开发者博客、夜间阅读</li><li>设计元素: 自定义滚动条、蓝色链接、暗色卡片</li></ul><h2>特色功能</h2><h3>1. 多样化的主题风格</h3><ul><li>提供 4 种精心设计的样式主题</li><li>每种主题都有独特的视觉风格</li><li>可在后台随时切换，无需修改代码</li><li>所有主题均支持响应式设计</li></ul><h3>2. 完整的内容支持</h3><ul><li>支持 Markdown 自动解析</li><li>保留文章中的图片和格式</li><li>可添加自定义版权信息</li></ul><h3>3. 响应式设计</h3><ul><li>完美适配各种设备屏幕</li><li>移动端优化显示</li></ul><h3>4. 标准兼容</h3><ul><li>符合 RSS 2.0 规范</li><li>支持常见的 RSS 命名空间（content、dc、atom）</li><li>兼容主流 RSS 阅读器</li></ul><h3>5. 路由接管</h3><ul><li>完全接管 Typecho 原生的 <code>/feed</code> 路由</li><li>禁用插件后自动恢复原生功能</li><li>无缝替换，不影响现有订阅</li></ul><h2>文件结构</h2><pre><code>Rss/
├── Plugin.php          # 插件主文件
├── Action.php          # RSS 生成逻辑
├── rss-gradient.xsl    # 渐变风格样式
├── rss-minimal.xsl     # 简洁风格样式
├── rss-modern.xsl      # 现代风格样式
├── rss-dark.xsl        # 暗黑风格样式
└── README.md           # 说明文档</code></pre><h2>技术说明</h2><h3>Plugin.php</h3><ul><li>插件主类，负责注册路由和配置项</li><li>定义插件激活/禁用逻辑</li><li>提供配置面板</li></ul><h3>Action.php</h3><ul><li>RSS 生成核心逻辑</li><li>从数据库查询文章</li><li>构建 RSS XML 输出</li><li>支持 Markdown 解析</li><li>根据配置动态加载样式文件</li></ul><h3>XSL 样式文件</h3><ul><li>4 个独立的 XSLT 样式表文件</li><li>将 XML 转换为美观的 HTML 页面</li><li>每个文件包含完整的 CSS 样式</li><li>互不干扰，易于定制和扩展</li></ul><h2>常见问题</h2><h3>Q: 启用插件后无法访问 RSS？</h3><p>A: 请检查您的 Typecho 是否开启了路由重写功能。</p><h3>Q: RSS 中图片无法显示？</h3><p>A: 请确保文章中的图片使用的是绝对路径。</p><h3>Q: 如何关闭样式美化？</h3><p>A: 在插件设置中将"RSS 样式美化"设置为"禁用"即可。</p><h3>Q: 可以自定义样式吗？</h3><p>A: 可以，直接修改 <code>rss.xsl</code> 文件中的 CSS 部分。</p><h2>版本历史</h2><h3>v1.0.0</h3><ul><li>初始版本发布</li><li>支持全文 RSS 输出</li><li>支持 XSL 样式美化</li><li>提供灵活的配置选项</li></ul><h2>许可证</h2><p>本插件遵循 MIT 许可证开源。</p><h2>反馈与支持</h2><p>如有问题或建议，欢迎通过以下方式反馈：</p><ul><li>提交 Issue</li><li>发送邮件</li><li>在博客留言</li></ul><h2>项目地址</h2><h2><a href="https://github.com/jkjoy/Typecho-Plugin-Rss">https://github.com/jkjoy/Typecho-Plugin-Rss</a></h2><p><strong>享受优雅的 RSS 订阅体验！</strong></p>]]></description>
            <content:encoded><![CDATA[<p>一个功能强大的 Typecho RSS 插件，支持全文输出和多种美化显示风格。</p><h2>功能特点</h2><ul><li><strong>全文输出</strong>: 支持输出文章全文或摘要</li><li><strong>多种主题</strong>: 提供 4 种精美样式主题供选择</li><li><strong>美化显示</strong>: 在浏览器中直接打开 RSS 链接时显示美观的界面</li><li><strong>灵活配置</strong>: 可自定义文章数量、输出内容、版权信息等</li><li><strong>响应式设计</strong>: 完美适配桌面和移动设备</li><li><strong>接管原生路由</strong>: 完全接管 Typecho 的 <code>/feed</code> 路由</li></ul><h2>安装方法</h2><ol><li><p>下载插件到 Typecho 插件目录：</p><pre><code>/usr/plugins/Rss/</code></pre></li><li><p>在 Typecho 后台启用插件：</p><ul><li>进入 <strong>控制台</strong> → <strong>插件</strong> → <strong>已安装插件</strong></li><li>找到 <strong>Rss</strong> 插件，点击 <strong>启用</strong></li></ul></li><li><p>配置插件（可选）：</p><ul><li>点击插件的 <strong>设置</strong> 按钮</li><li>根据需要调整配置选项</li></ul></li></ol><h2>配置选项</h2><h3>RSS 文章数量</h3><ul><li>设置 RSS 输出的文章数量</li><li>默认为 20 篇</li><li>设置为 0 则输出全部文章</li></ul><h3>RSS 内容输出</h3><ul><li><strong>输出全文</strong>: 在 RSS 中显示文章完整内容</li><li><strong>输出摘要</strong>: 仅显示文章摘要（前 200 字符）</li></ul><h3>RSS 样式美化</h3><ul><li><strong>启用</strong>: 在浏览器中访问时显示美化界面</li><li><strong>禁用</strong>: 输出纯 XML 格式</li></ul><h3>样式主题</h3><p>插件提供 4 种不同风格的主题供选择：</p><ol><li><p><strong>渐变风格 (gradient)</strong> - 默认主题</p><ul><li>紫色渐变背景</li><li>现代感强，视觉冲击力强</li><li>卡片式布局，悬停动画</li><li>适合个人博客、创意类网站</li></ul></li><li><p><strong>简洁风格 (minimal)</strong></p><ul><li>黑白配色，简约设计</li><li>清爽干净，专注内容</li><li>类似报纸排版</li><li>适合技术博客、文字类内容</li></ul></li><li><p><strong>现代风格 (modern)</strong></p><ul><li>蓝色系商务风格</li><li>专业大气，层次分明</li><li>卡片阴影，渐变头部</li><li>适合企业博客、专业网站</li></ul></li><li><p><strong>暗黑风格 (dark)</strong></p><ul><li>深色主题，护眼舒适</li><li>GitHub 风格配色</li><li>自定义滚动条美化</li><li>适合夜间阅读、开发者</li></ul></li></ol><h3>版权信息</h3><ul><li>在每篇文章末尾添加自定义版权信息</li><li>支持 HTML 标签</li><li><p>示例：</p><pre><code class="lang-html">&lt;p&gt;本文由 &lt;a href=&quot;https://example.com&quot;&gt;我的博客&lt;/a&gt; 原创发布&lt;/p&gt;
&lt;p&gt;转载请注明出处&lt;/p&gt;</code></pre></li></ul><h2>使用方法</h2><p>启用插件后，可以通过以下 URL 访问 RSS：</p><h3>主要访问地址</h3><pre><code>https://你的域名/feed</code></pre><p>插件会自动接管 Typecho 原生的 <code>/feed</code> 路由，使用美化后的 RSS 输出。</p><h3>在 RSS 阅读器中订阅</h3><p>将上述任一地址复制到您的 RSS 阅读器（如 Feedly、Inoreader 等）中即可订阅。</p><h3>在浏览器中访问</h3><p>直接在浏览器中打开上述地址，将看到美化后的 RSS 页面。根据你在插件设置中选择的主题，会显示不同风格：</p><ul><li><strong>渐变风格</strong>: 紫色渐变背景 + 白色卡片</li><li><strong>简洁风格</strong>: 纯白背景 + 黑白排版</li><li><strong>现代风格</strong>: 蓝色渐变头部 + 灰白背景</li><li><strong>暗黑风格</strong>: 深色背景 + 蓝色点缀</li></ul><h2>主题样式预览</h2><h3>渐变风格 (Gradient)</h3><ul><li>视觉特点: 紫色渐变背景，白色圆角卡片</li><li>配色方案: <code>#667eea</code> → <code>#764ba2</code></li><li>适用场景: 个人博客、创意网站</li><li>设计元素: 悬停动画、阴影效果、圆角设计</li></ul><h3>简洁风格 (Minimal)</h3><ul><li>视觉特点: 黑白配色，线条分割</li><li>配色方案: <code>#000</code> + <code>#fff</code> + <code>#666</code></li><li>适用场景: 技术博客、专业内容</li><li>设计元素: 极简排版、下划线链接、报纸式布局</li></ul><h3>现代风格 (Modern)</h3><ul><li>视觉特点: 蓝色系商务风格</li><li>配色方案: <code>#0066cc</code> → <code>#0052a3</code></li><li>适用场景: 企业网站、专业机构</li><li>设计元素: 卡片悬停效果、徽章标签、渐变头部</li></ul><h3>暗黑风格 (Dark)</h3><ul><li>视觉特点: GitHub 式深色主题</li><li>配色方案: <code>#0d1117</code> + <code>#58a6ff</code></li><li>适用场景: 开发者博客、夜间阅读</li><li>设计元素: 自定义滚动条、蓝色链接、暗色卡片</li></ul><h2>特色功能</h2><h3>1. 多样化的主题风格</h3><ul><li>提供 4 种精心设计的样式主题</li><li>每种主题都有独特的视觉风格</li><li>可在后台随时切换，无需修改代码</li><li>所有主题均支持响应式设计</li></ul><h3>2. 完整的内容支持</h3><ul><li>支持 Markdown 自动解析</li><li>保留文章中的图片和格式</li><li>可添加自定义版权信息</li></ul><h3>3. 响应式设计</h3><ul><li>完美适配各种设备屏幕</li><li>移动端优化显示</li></ul><h3>4. 标准兼容</h3><ul><li>符合 RSS 2.0 规范</li><li>支持常见的 RSS 命名空间（content、dc、atom）</li><li>兼容主流 RSS 阅读器</li></ul><h3>5. 路由接管</h3><ul><li>完全接管 Typecho 原生的 <code>/feed</code> 路由</li><li>禁用插件后自动恢复原生功能</li><li>无缝替换，不影响现有订阅</li></ul><h2>文件结构</h2><pre><code>Rss/
├── Plugin.php          # 插件主文件
├── Action.php          # RSS 生成逻辑
├── rss-gradient.xsl    # 渐变风格样式
├── rss-minimal.xsl     # 简洁风格样式
├── rss-modern.xsl      # 现代风格样式
├── rss-dark.xsl        # 暗黑风格样式
└── README.md           # 说明文档</code></pre><h2>技术说明</h2><h3>Plugin.php</h3><ul><li>插件主类，负责注册路由和配置项</li><li>定义插件激活/禁用逻辑</li><li>提供配置面板</li></ul><h3>Action.php</h3><ul><li>RSS 生成核心逻辑</li><li>从数据库查询文章</li><li>构建 RSS XML 输出</li><li>支持 Markdown 解析</li><li>根据配置动态加载样式文件</li></ul><h3>XSL 样式文件</h3><ul><li>4 个独立的 XSLT 样式表文件</li><li>将 XML 转换为美观的 HTML 页面</li><li>每个文件包含完整的 CSS 样式</li><li>互不干扰，易于定制和扩展</li></ul><h2>常见问题</h2><h3>Q: 启用插件后无法访问 RSS？</h3><p>A: 请检查您的 Typecho 是否开启了路由重写功能。</p><h3>Q: RSS 中图片无法显示？</h3><p>A: 请确保文章中的图片使用的是绝对路径。</p><h3>Q: 如何关闭样式美化？</h3><p>A: 在插件设置中将"RSS 样式美化"设置为"禁用"即可。</p><h3>Q: 可以自定义样式吗？</h3><p>A: 可以，直接修改 <code>rss.xsl</code> 文件中的 CSS 部分。</p><h2>版本历史</h2><h3>v1.0.0</h3><ul><li>初始版本发布</li><li>支持全文 RSS 输出</li><li>支持 XSL 样式美化</li><li>提供灵活的配置选项</li></ul><h2>许可证</h2><p>本插件遵循 MIT 许可证开源。</p><h2>反馈与支持</h2><p>如有问题或建议，欢迎通过以下方式反馈：</p><ul><li>提交 Issue</li><li>发送邮件</li><li>在博客留言</li></ul><h2>项目地址</h2><h2><a href="https://github.com/jkjoy/Typecho-Plugin-Rss">https://github.com/jkjoy/Typecho-Plugin-Rss</a></h2><p><strong>享受优雅的 RSS 订阅体验！</strong></p>]]></content:encoded>
        </item>
                <item>
            <title>Puock - 又一款Typecho主题</title>
            <link>https://www.imsun.org/archives/1752.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1752.html</guid>
            <pubDate>Thu, 16 Oct 25 05:36:00 +0000</pubDate>
            <pubDateFormatted>2025年10月16日05:36</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>说明</h2><p>本主题移植自开源项目<br><a href="https://github.com/Licoy/wordpress-theme-puock">https://github.com/Licoy/wordpress-theme-puock</a><br>原项目为<code>WordPress</code>主题.</p><p>我觉得很酷 所以移植到了<code>Typecho</code> 平台.</p><h2>预览</h2><p>本站<br><img src="https://www.imsun.org/usr/themes/Puock/screenshot.png" alt="预览" title="预览"></p><h2>使用指南</h2><p>适用于<code>Typecho</code> 1.2.0 以上版本</p><p>[danger]注意事项[/danger] </p><p>部分功能需要使用插件<code>Puock</code>来实现<br>插件地址 <a href="https://github.com/jkjoy/typecho-plugin-puock">Puock</a></p><h2>项目地址</h2><p><a href="https://github.com/jkjoy/Typecho-Theme-Puock">https://github.com/jkjoy/Typecho-Theme-Puock</a></p>]]></description>
            <content:encoded><![CDATA[<h2>说明</h2><p>本主题移植自开源项目<br><a href="https://github.com/Licoy/wordpress-theme-puock">https://github.com/Licoy/wordpress-theme-puock</a><br>原项目为<code>WordPress</code>主题.</p><p>我觉得很酷 所以移植到了<code>Typecho</code> 平台.</p><h2>预览</h2><p>本站<br><img src="https://www.imsun.org/usr/themes/Puock/screenshot.png" alt="预览" title="预览"></p><h2>使用指南</h2><p>适用于<code>Typecho</code> 1.2.0 以上版本</p><p>[danger]注意事项[/danger] </p><p>部分功能需要使用插件<code>Puock</code>来实现<br>插件地址 <a href="https://github.com/jkjoy/typecho-plugin-puock">Puock</a></p><h2>项目地址</h2><p><a href="https://github.com/jkjoy/Typecho-Theme-Puock">https://github.com/jkjoy/Typecho-Theme-Puock</a></p>]]></content:encoded>
        </item>
                <item>
            <title>解决部分云服务器内存爆满但SWAP占用为0的问题</title>
            <link>https://www.imsun.org/archives/1751.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1751.html</guid>
            <pubDate>Sat, 09 Aug 25 09:27:00 +0000</pubDate>
            <pubDateFormatted>2025年08月09日09:27</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>问题</h2><p>在内存爆满几乎100%的情况下,开启了swap分区却占用一直为0,这种情况发生在阿里云 和 华为云 比较多.</p><h2>排查</h2><p>查看系统的 Swap 使用倾向（swappiness）,执行</p><pre><code class="lang-bash">cat /proc/sys/vm/swappiness</code></pre><p>最小为0最大为100 数字越小代表使用倾向越低.</p><p>我的华为云服务器查询到的数值竟然为0. 这意味着云服务商根本就不打算让人使用swap.</p><h2>解决</h2><p>编辑配置</p><pre><code class="lang-bash">sudo nano /etc/sysctl.conf</code></pre><p>找到</p><pre><code>vm.swappiness=</code></pre><p>把后面的数字改为<code>90</code><br>如果没有找到,也没关系,直接在最后添加</p><pre><code>vm.swappiness=90</code></pre><p>然后执行</p><pre><code class="lang-bash">sudo sysctl -p</code></pre><p>可以生效了</p>]]></description>
            <content:encoded><![CDATA[<h2>问题</h2><p>在内存爆满几乎100%的情况下,开启了swap分区却占用一直为0,这种情况发生在阿里云 和 华为云 比较多.</p><h2>排查</h2><p>查看系统的 Swap 使用倾向（swappiness）,执行</p><pre><code class="lang-bash">cat /proc/sys/vm/swappiness</code></pre><p>最小为0最大为100 数字越小代表使用倾向越低.</p><p>我的华为云服务器查询到的数值竟然为0. 这意味着云服务商根本就不打算让人使用swap.</p><h2>解决</h2><p>编辑配置</p><pre><code class="lang-bash">sudo nano /etc/sysctl.conf</code></pre><p>找到</p><pre><code>vm.swappiness=</code></pre><p>把后面的数字改为<code>90</code><br>如果没有找到,也没关系,直接在最后添加</p><pre><code>vm.swappiness=90</code></pre><p>然后执行</p><pre><code class="lang-bash">sudo sysctl -p</code></pre><p>可以生效了</p>]]></content:encoded>
        </item>
                <item>
            <title>又年长一岁</title>
            <link>https://www.imsun.org/archives/1750.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1750.html</guid>
            <pubDate>Wed, 09 Jul 25 07:09:28 +0000</pubDate>
            <pubDateFormatted>2025年07月09日07:09</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>昨天是我妈生日,今天是我的生日.</p><p>本来我都已经忘记了,但是在那个相亲相爱一家人的群里总有人会记得大家的生日.</p><p>小时候是很爱过生日的,总会在生日当天叫上自己的小伙伴来自家玩耍.</p><p>少年时候也是喜欢过生日的,无非是找个由头和自己喜欢的女孩子在一起玩耍.</p><p>如今却是不喜欢的,无疑是告诉自己又年长一岁.又老了一些.</p><hr><p>总是会有些负面的情绪是因为太过于繁琐和无奈.</p><p>社会总是会磨平年少的棱角.</p><p>也会产生更多的怨气.</p><hr><p>人生有七苦,生、老、病、死、怨憎会、爱别离、求不得.<br>终一世无法超脱.</p><p>Ring的父亲由于癌细胞恶化现在在医院里等待最后的时光.她在医院衣不解带伺候了好几日.<br>我无法安慰.<br>这就是人生之中难言必经的阵痛.</p><hr><p>有时候会思考生活的意义.</p><p>最后觉得有人说的其实很对,无非就是生下来,活下去.</p><p>活着其实没有任何的意义,这一辈子不过是追求欲望的过程.</p><p>也是与自己不停和解的过程.</p><p>我想只要是人,都无法超脱.</p><hr><p>想说的很多,不足为外人道哉.</p><hr><p>祝自己生日快乐吧</p>]]></description>
            <content:encoded><![CDATA[<p>昨天是我妈生日,今天是我的生日.</p><p>本来我都已经忘记了,但是在那个相亲相爱一家人的群里总有人会记得大家的生日.</p><p>小时候是很爱过生日的,总会在生日当天叫上自己的小伙伴来自家玩耍.</p><p>少年时候也是喜欢过生日的,无非是找个由头和自己喜欢的女孩子在一起玩耍.</p><p>如今却是不喜欢的,无疑是告诉自己又年长一岁.又老了一些.</p><hr><p>总是会有些负面的情绪是因为太过于繁琐和无奈.</p><p>社会总是会磨平年少的棱角.</p><p>也会产生更多的怨气.</p><hr><p>人生有七苦,生、老、病、死、怨憎会、爱别离、求不得.<br>终一世无法超脱.</p><p>Ring的父亲由于癌细胞恶化现在在医院里等待最后的时光.她在医院衣不解带伺候了好几日.<br>我无法安慰.<br>这就是人生之中难言必经的阵痛.</p><hr><p>有时候会思考生活的意义.</p><p>最后觉得有人说的其实很对,无非就是生下来,活下去.</p><p>活着其实没有任何的意义,这一辈子不过是追求欲望的过程.</p><p>也是与自己不停和解的过程.</p><p>我想只要是人,都无法超脱.</p><hr><p>想说的很多,不足为外人道哉.</p><hr><p>祝自己生日快乐吧</p>]]></content:encoded>
        </item>
                <item>
            <title>Typecho常用插件集合</title>
            <link>https://www.imsun.org/archives/1749.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1749.html</guid>
            <pubDate>Tue, 17 Jun 25 07:14:00 +0000</pubDate>
            <pubDateFormatted>2025年06月17日07:14</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>写在前面</h2><p>众所周知<code>Typecho</code>的插件多且杂.各种版本分支满天飞.<br>这里收集一些我自用的插件.</p><p>供同样使用<code>Typecho</code>的博友们下载使用</p><h2>插件</h2><h3>Links</h3><p>很多主题<code>友情链接</code>页面都是基于此插件来实现,当然也有很多主题不使用此插件.<br>或者没有友情链接页面的主题亦可以使用此插件来实现</p><p><a href="https://file.imsun.org/upload/2025-06/Links-1.2.7.zip">点此下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Testore</h3><p>一个非官方的插件商店,里面的插件万年没更新...<br>ps.我准备等1.3.0正式版发布维护一个插件列表..</p><p><a href="https://file.imsun.org/upload/2025-06/TeStore.zip">点此下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Tagshelper</h3><p>由<code>泽泽社长</code>开发的插件,在编辑文章的页面展示所有的标签,点击即可添加</p><p><a href="https://file.imsun.org/upload/2025-06/tagshelper.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>CommentNotifier</h3><p>同样是由<code>泽泽社长</code>开发的插件,在有新的评论或回复时会通知到对方邮箱</p><p><a href="https://file.imsun.org/upload/2025-06/CommentNotifier-1.8.3.zip">下载地址</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Sitemap</h3><p>网站地图 插件,这个自不必多说了.方便搜索引擎的收录.</p><p>这里收录的是 Google Sitemap 生成器 【TF社区维护版】</p><p><a href="https://file.imsun.org/upload/2025-06/Sitemap.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>AISummary</h3><p>一款使用AI生成文章摘要的插件.<br>使用AI的优点在于SEO<br><a href="https://file.imsun.org/upload/2025-06/AISummary (1).zip" target="_blank">下载地址</a><br>兼容性测试: 兼容1.3.0</p><h3>S3Upload</h3><p>使用s3兼容的存储服务.支持腾讯云,阿里云,缤纷云,R2,B2 等<br><a href="https://file.imsun.org/upload/2025-03/S3UploadForTypecho-1.1.0.zip">下载地址</a></p><h3>FediverseSync</h3><p>同步博客标题 摘要 链接 到联邦宇宙.支持 Mastodon / Pleroma / Gotosocial / Misskey 等实例..</p><p><a href="https://file.imsun.org/upload/2025-06/FediverseSync.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>CommentsByQQ</h3><p>评论QQ通知</p><p>通过基于nonebot 协议的QQ机器人,在有新评论时通知到指定QQ.<br>QQ与QQ机器人必须为好友.</p><p><a href="https://file.imsun.org/upload/2025-06/CommentsByQQ.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>RobotPush</h3><p>Typecho机器人提醒插件，支持登录提醒，支持评论提醒，支持钉钉、飞书、企微机器人。</p><p><a href="https://file.imsun.org/upload/2025-06/Robotpush.zip">点此下载</a></p>]]></description>
            <content:encoded><![CDATA[<h2>写在前面</h2><p>众所周知<code>Typecho</code>的插件多且杂.各种版本分支满天飞.<br>这里收集一些我自用的插件.</p><p>供同样使用<code>Typecho</code>的博友们下载使用</p><h2>插件</h2><h3>Links</h3><p>很多主题<code>友情链接</code>页面都是基于此插件来实现,当然也有很多主题不使用此插件.<br>或者没有友情链接页面的主题亦可以使用此插件来实现</p><p><a href="https://file.imsun.org/upload/2025-06/Links-1.2.7.zip">点此下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Testore</h3><p>一个非官方的插件商店,里面的插件万年没更新...<br>ps.我准备等1.3.0正式版发布维护一个插件列表..</p><p><a href="https://file.imsun.org/upload/2025-06/TeStore.zip">点此下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Tagshelper</h3><p>由<code>泽泽社长</code>开发的插件,在编辑文章的页面展示所有的标签,点击即可添加</p><p><a href="https://file.imsun.org/upload/2025-06/tagshelper.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>CommentNotifier</h3><p>同样是由<code>泽泽社长</code>开发的插件,在有新的评论或回复时会通知到对方邮箱</p><p><a href="https://file.imsun.org/upload/2025-06/CommentNotifier-1.8.3.zip">下载地址</a></p><p>兼容性测试: 兼容1.3.0</p><h3>Sitemap</h3><p>网站地图 插件,这个自不必多说了.方便搜索引擎的收录.</p><p>这里收录的是 Google Sitemap 生成器 【TF社区维护版】</p><p><a href="https://file.imsun.org/upload/2025-06/Sitemap.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>AISummary</h3><p>一款使用AI生成文章摘要的插件.<br>使用AI的优点在于SEO<br><a href="https://file.imsun.org/upload/2025-06/AISummary (1).zip" target="_blank">下载地址</a><br>兼容性测试: 兼容1.3.0</p><h3>S3Upload</h3><p>使用s3兼容的存储服务.支持腾讯云,阿里云,缤纷云,R2,B2 等<br><a href="https://file.imsun.org/upload/2025-03/S3UploadForTypecho-1.1.0.zip">下载地址</a></p><h3>FediverseSync</h3><p>同步博客标题 摘要 链接 到联邦宇宙.支持 Mastodon / Pleroma / Gotosocial / Misskey 等实例..</p><p><a href="https://file.imsun.org/upload/2025-06/FediverseSync.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>CommentsByQQ</h3><p>评论QQ通知</p><p>通过基于nonebot 协议的QQ机器人,在有新评论时通知到指定QQ.<br>QQ与QQ机器人必须为好友.</p><p><a href="https://file.imsun.org/upload/2025-06/CommentsByQQ.zip">下载</a></p><p>兼容性测试: 兼容1.3.0</p><h3>RobotPush</h3><p>Typecho机器人提醒插件，支持登录提醒，支持评论提醒，支持钉钉、飞书、企微机器人。</p><p><a href="https://file.imsun.org/upload/2025-06/Robotpush.zip">点此下载</a></p>]]></content:encoded>
        </item>
                <item>
            <title>2025年06月第2周记</title>
            <link>https://www.imsun.org/archives/1748.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1748.html</guid>
            <pubDate>Mon, 16 Jun 25 01:30:00 +0000</pubDate>
            <pubDateFormatted>2025年06月16日01:30</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>随便记录</p><hr><p>由于Typecho更新了1.3.0 RC 于是我跟着更新了最新的版本</p><p>顺便把数据库从mysql换为sqlite,降低服务器使用资源.</p><p>容器依旧使用的是Docker镜像 <code>jkjoy/php83</code></p><p>有很多插件失效或者报错,把报错信息告诉Deepseek他会告诉你是哪里出了问题,改了改就还能用.</p><hr><p>对于父亲节亦或者母亲节不过是些无关紧要的名头.<br>我们不需要.<br>但是有些人需要.</p><hr><p>父母和外公打算这个周末回老家.</p><p>小姨夫因为学校暑假,刚好也回老家住两个月.</p><p>小姨觉得一个人在天津也没事,遂决定回家看看.</p><p>二姨由于没有买到票不能跟外公一起回去.作罢.</p><p>我也已经有五六年没有回去了.</p><p>本来担心老爸的身体在家会有所不便,现在看来有这么多人在家照应,也放心不少.</p><hr><p>养猫真的麻烦,怎么会有随地大小便的家伙!</p><p>但是养都养了能怎么办呢</p>]]></description>
            <content:encoded><![CDATA[<p>随便记录</p><hr><p>由于Typecho更新了1.3.0 RC 于是我跟着更新了最新的版本</p><p>顺便把数据库从mysql换为sqlite,降低服务器使用资源.</p><p>容器依旧使用的是Docker镜像 <code>jkjoy/php83</code></p><p>有很多插件失效或者报错,把报错信息告诉Deepseek他会告诉你是哪里出了问题,改了改就还能用.</p><hr><p>对于父亲节亦或者母亲节不过是些无关紧要的名头.<br>我们不需要.<br>但是有些人需要.</p><hr><p>父母和外公打算这个周末回老家.</p><p>小姨夫因为学校暑假,刚好也回老家住两个月.</p><p>小姨觉得一个人在天津也没事,遂决定回家看看.</p><p>二姨由于没有买到票不能跟外公一起回去.作罢.</p><p>我也已经有五六年没有回去了.</p><p>本来担心老爸的身体在家会有所不便,现在看来有这么多人在家照应,也放心不少.</p><hr><p>养猫真的麻烦,怎么会有随地大小便的家伙!</p><p>但是养都养了能怎么办呢</p>]]></content:encoded>
        </item>
                <item>
            <title>优化Typecho的思路</title>
            <link>https://www.imsun.org/archives/1746.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1746.html</guid>
            <pubDate>Fri, 30 May 25 11:08:00 +0000</pubDate>
            <pubDateFormatted>2025年05月30日11:08</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>服务器端</h2><p>使用<code>Nginx</code>作为web服务端可以使用以下开启</p><pre><code># 启用 gzip 压缩
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types
  application/javascript
  application/json
  application/xml
  text/css
  text/plain
  text/xml;

# 浏览器缓存控制
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
    expires 30d;
    add_header Cache-Control &quot;public, no-transform&quot;;
}</code></pre><h2>图片优化</h2><p>使用原生js实现懒加载</p><pre><code class="lang-js">document.addEventListener(&#039;DOMContentLoaded&#039;, function() {
    // 获取所有图片（如果主题默认输出 src，可以动态替换为 data-src）
    const images = document.querySelectorAll(&#039;img[src]:not([data-src])&#039;);
    
    // 防止重复处理
    images.forEach(img =&gt; {
        if (!img.getAttribute(&#039;data-src&#039;)) {
            img.setAttribute(&#039;data-src&#039;, img.src); // 把 src 存到 data-src
            img.removeAttribute(&#039;src&#039;); // 移除 src，避免立即加载
        }
    });

    // 懒加载逻辑
    const lazyLoad = (targets) =&gt; {
        if (&#039;IntersectionObserver&#039; in window) {
            const observer = new IntersectionObserver((entries) =&gt; {
                entries.forEach(entry =&gt; {
                    if (entry.isIntersecting) {
                        const img = entry.target;
                        img.src = img.dataset.src;
                        observer.unobserve(img); // 加载后停止观察
                    }
                });
            });
            targets.forEach(img =&gt; observer.observe(img));
        } else {
            // 兼容旧浏览器（滚动监听）
            const checkImages = () =&gt; {
                targets.forEach(img =&gt; {
                    const rect = img.getBoundingClientRect();
                    if (rect.top &lt; window.innerHeight + 100) { // 提前 100px 加载
                        img.src = img.dataset.src;
                    }
                });
            };
            window.addEventListener(&#039;scroll&#039;, checkImages);
            checkImages(); // 初始检查
        }
    };

    // 对所有 data-src 图片应用懒加载
    lazyLoad(document.querySelectorAll(&#039;img[data-src]&#039;));
});</code></pre><h2>资源合并与压缩</h2><p>压缩HTML输出</p><pre><code class="lang-php">// 在主题的 functions.php 中
function compress_html($html) {
    $placeholders = [];
    $i = 0;

    // 匹配 &lt;pre&gt; 和 &lt;code&gt; 区块，替换为唯一占位符
    $html = preg_replace_callback(
        &#039;/&lt;(pre|code)[^&gt;]*&gt;.*?&lt;\/\1&gt;/is&#039;,
        function ($matches) use (&amp;$placeholders, &amp;$i) {
            $key = &quot;###HTML_COMPRESS_IGNORE_&quot; . $i . &quot;###&quot;;
            $placeholders[$key] = $matches[0];
            $i++;
            return $key;
        },
        $html
    );

    // 正常压缩
    $search = array(
        &#039;/\&gt;[^\S ]+/s&#039;,
        &#039;/[^\S ]+\&lt;/s&#039;,
        &#039;/(\s)+/s&#039;
    );
    $replace = array(
        &#039;&gt;&#039;,
        &#039;&lt;&#039;,
        &#039;\\1&#039;
    );
    $html = preg_replace($search, $replace, $html);

    // 恢复占位符
    if (!empty($placeholders)) {
        $html = str_replace(array_keys($placeholders), array_values($placeholders), $html);
    }

    return $html;
}</code></pre><pre><code class="lang-php">//在head.php中开启
&lt;?php ob_start(&quot;compress_html&quot;); ?&gt;</code></pre><pre><code class="lang-php">//在footer.php中结束
&lt;?php ob_end_flush(); ?&gt;</code></pre><h2>缓存策略</h2><h3>浏览器缓存</h3><pre><code class="lang-html">&lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;max-age=86400&quot; /&gt;</code></pre><p>在<code>header.php</code>中加入</p><h3>页面缓存</h3><p>在主题的 <code>functions.php</code> 中添加简单的页面缓存</p><pre><code class="lang-php">function page_cache() {
    // 不缓存后台、登录页和提交操作
    if (defined(&#039;__TYPECHO_ADMIN__&#039;) || $_SERVER[&#039;REQUEST_METHOD&#039;] != &#039;GET&#039;) {
        return;
    }
    
    $cache_dir = __TYPECHO_ROOT_DIR__ . &#039;/cache&#039;;
    if (!is_dir($cache_dir)) {
        mkdir($cache_dir, 0755, true);
    }
    
    $url_hash = md5($_SERVER[&#039;REQUEST_URI&#039;]);
    $cache_file = $cache_dir . &#039;/&#039; . $url_hash . &#039;.html&#039;;
    
    // 缓存过期时间（秒）
    $cache_time = 3600; // 1小时
    
    // 如果缓存文件存在且未过期，则直接输出
    if (file_exists($cache_file) &amp;&amp; (time() - filemtime($cache_file) &lt; $cache_time)) {
        echo file_get_contents($cache_file);
        exit;
    }
    
    // 否则开始输出缓冲
    ob_start();
}

function save_cache() {
    // 同样跳过后台等页面
    if (defined(&#039;__TYPECHO_ADMIN__&#039;) || $_SERVER[&#039;REQUEST_METHOD&#039;] != &#039;GET&#039;) {
        return;
    }
    
    $cache_dir = __TYPECHO_ROOT_DIR__ . &#039;/cache&#039;;
    $url_hash = md5($_SERVER[&#039;REQUEST_URI&#039;]);
    $cache_file = $cache_dir . &#039;/&#039; . $url_hash . &#039;.html&#039;;
    
    // 保存缓冲内容到文件
    $content = ob_get_contents();
    file_put_contents($cache_file, $content);
}</code></pre><pre><code class="lang-php">// 在页面开始处调用
page_cache();</code></pre><pre><code class="lang-php">// 在页面结束前调用
register_shutdown_function(&#039;save_cache&#039;);</code></pre><p>Impact-Site-Verification: 52b4ec5d-e5be-481e-ad19-28bba5ed5c58</p>]]></description>
            <content:encoded><![CDATA[<h2>服务器端</h2><p>使用<code>Nginx</code>作为web服务端可以使用以下开启</p><pre><code># 启用 gzip 压缩
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types
  application/javascript
  application/json
  application/xml
  text/css
  text/plain
  text/xml;

# 浏览器缓存控制
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
    expires 30d;
    add_header Cache-Control &quot;public, no-transform&quot;;
}</code></pre><h2>图片优化</h2><p>使用原生js实现懒加载</p><pre><code class="lang-js">document.addEventListener(&#039;DOMContentLoaded&#039;, function() {
    // 获取所有图片（如果主题默认输出 src，可以动态替换为 data-src）
    const images = document.querySelectorAll(&#039;img[src]:not([data-src])&#039;);
    
    // 防止重复处理
    images.forEach(img =&gt; {
        if (!img.getAttribute(&#039;data-src&#039;)) {
            img.setAttribute(&#039;data-src&#039;, img.src); // 把 src 存到 data-src
            img.removeAttribute(&#039;src&#039;); // 移除 src，避免立即加载
        }
    });

    // 懒加载逻辑
    const lazyLoad = (targets) =&gt; {
        if (&#039;IntersectionObserver&#039; in window) {
            const observer = new IntersectionObserver((entries) =&gt; {
                entries.forEach(entry =&gt; {
                    if (entry.isIntersecting) {
                        const img = entry.target;
                        img.src = img.dataset.src;
                        observer.unobserve(img); // 加载后停止观察
                    }
                });
            });
            targets.forEach(img =&gt; observer.observe(img));
        } else {
            // 兼容旧浏览器（滚动监听）
            const checkImages = () =&gt; {
                targets.forEach(img =&gt; {
                    const rect = img.getBoundingClientRect();
                    if (rect.top &lt; window.innerHeight + 100) { // 提前 100px 加载
                        img.src = img.dataset.src;
                    }
                });
            };
            window.addEventListener(&#039;scroll&#039;, checkImages);
            checkImages(); // 初始检查
        }
    };

    // 对所有 data-src 图片应用懒加载
    lazyLoad(document.querySelectorAll(&#039;img[data-src]&#039;));
});</code></pre><h2>资源合并与压缩</h2><p>压缩HTML输出</p><pre><code class="lang-php">// 在主题的 functions.php 中
function compress_html($html) {
    $placeholders = [];
    $i = 0;

    // 匹配 &lt;pre&gt; 和 &lt;code&gt; 区块，替换为唯一占位符
    $html = preg_replace_callback(
        &#039;/&lt;(pre|code)[^&gt;]*&gt;.*?&lt;\/\1&gt;/is&#039;,
        function ($matches) use (&amp;$placeholders, &amp;$i) {
            $key = &quot;###HTML_COMPRESS_IGNORE_&quot; . $i . &quot;###&quot;;
            $placeholders[$key] = $matches[0];
            $i++;
            return $key;
        },
        $html
    );

    // 正常压缩
    $search = array(
        &#039;/\&gt;[^\S ]+/s&#039;,
        &#039;/[^\S ]+\&lt;/s&#039;,
        &#039;/(\s)+/s&#039;
    );
    $replace = array(
        &#039;&gt;&#039;,
        &#039;&lt;&#039;,
        &#039;\\1&#039;
    );
    $html = preg_replace($search, $replace, $html);

    // 恢复占位符
    if (!empty($placeholders)) {
        $html = str_replace(array_keys($placeholders), array_values($placeholders), $html);
    }

    return $html;
}</code></pre><pre><code class="lang-php">//在head.php中开启
&lt;?php ob_start(&quot;compress_html&quot;); ?&gt;</code></pre><pre><code class="lang-php">//在footer.php中结束
&lt;?php ob_end_flush(); ?&gt;</code></pre><h2>缓存策略</h2><h3>浏览器缓存</h3><pre><code class="lang-html">&lt;meta http-equiv=&quot;Cache-Control&quot; content=&quot;max-age=86400&quot; /&gt;</code></pre><p>在<code>header.php</code>中加入</p><h3>页面缓存</h3><p>在主题的 <code>functions.php</code> 中添加简单的页面缓存</p><pre><code class="lang-php">function page_cache() {
    // 不缓存后台、登录页和提交操作
    if (defined(&#039;__TYPECHO_ADMIN__&#039;) || $_SERVER[&#039;REQUEST_METHOD&#039;] != &#039;GET&#039;) {
        return;
    }
    
    $cache_dir = __TYPECHO_ROOT_DIR__ . &#039;/cache&#039;;
    if (!is_dir($cache_dir)) {
        mkdir($cache_dir, 0755, true);
    }
    
    $url_hash = md5($_SERVER[&#039;REQUEST_URI&#039;]);
    $cache_file = $cache_dir . &#039;/&#039; . $url_hash . &#039;.html&#039;;
    
    // 缓存过期时间（秒）
    $cache_time = 3600; // 1小时
    
    // 如果缓存文件存在且未过期，则直接输出
    if (file_exists($cache_file) &amp;&amp; (time() - filemtime($cache_file) &lt; $cache_time)) {
        echo file_get_contents($cache_file);
        exit;
    }
    
    // 否则开始输出缓冲
    ob_start();
}

function save_cache() {
    // 同样跳过后台等页面
    if (defined(&#039;__TYPECHO_ADMIN__&#039;) || $_SERVER[&#039;REQUEST_METHOD&#039;] != &#039;GET&#039;) {
        return;
    }
    
    $cache_dir = __TYPECHO_ROOT_DIR__ . &#039;/cache&#039;;
    $url_hash = md5($_SERVER[&#039;REQUEST_URI&#039;]);
    $cache_file = $cache_dir . &#039;/&#039; . $url_hash . &#039;.html&#039;;
    
    // 保存缓冲内容到文件
    $content = ob_get_contents();
    file_put_contents($cache_file, $content);
}</code></pre><pre><code class="lang-php">// 在页面开始处调用
page_cache();</code></pre><pre><code class="lang-php">// 在页面结束前调用
register_shutdown_function(&#039;save_cache&#039;);</code></pre><p>Impact-Site-Verification: 52b4ec5d-e5be-481e-ad19-28bba5ed5c58</p>]]></content:encoded>
        </item>
                <item>
            <title>Typecho文章置顶(非插件)</title>
            <link>https://www.imsun.org/archives/1745.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1745.html</guid>
            <pubDate>Mon, 26 May 25 02:12:00 +0000</pubDate>
            <pubDateFormatted>2025年05月26日02:12</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<h2>置顶</h2><p>最近才发现原来用的文章置顶还是有些问题的,置顶N篇文章,翻页时文章列表中文章还是维持原有的翻页逻辑,那么列表中文章的总数中就会减少N篇文章.</p><h2>实现</h2><p>正常逻辑应该是从文章列表中查找需要置顶的文章展示在首页列表,把原有的文章列表向后压.翻页时会筛选已经置顶的文章.不再重复显示.</p><h2>步骤</h2><ol><li><p>在<code>index.php</code>中插入代码</p><pre><code class="lang-PHP">&lt;?php  
$sticky = $this-&gt;options-&gt;sticky;
$db = Typecho_Db::get();
$pageSize = $this-&gt;options-&gt;pageSize;
if ($sticky &amp;&amp; !empty(trim($sticky))) {
 $sticky_cids = array_filter(explode(&#039;|&#039;, $sticky));
 if (!empty($sticky_cids)) {
     $sticky_html = &quot; &lt;span class=&#039;sticky--post&#039;&gt;&lt;svg xmlns=&#039;http://www.w3.org/2000/svg&#039; width=&#039;16px&#039; height=&#039;16px&#039; fill=&#039;none&#039; viewBox=&#039;0 0 24 24&#039; class=&#039;bk&#039;&gt;
&lt;path fill=&#039;#242424&#039; fill-rule=&#039;evenodd&#039; d=&#039;M12.333 16.993a7.4 7.4 0 0 1-1.686-.12 7.25 7.25 0 1 1 8.047-4.334v.001a7.2 7.2 0 0 1-.632 1.188 7.26 7.26 0 0 1-4.708 3.146l-.07.013q-.466.083-.951.105m.356.979a8.4 8.4 0 0 1-1.377 0l-2.075 5.7a.375.375 0 0 1-.625.13l-2.465-2.604-3.563.41a.375.375 0 0 1-.395-.501l2.645-7.267a8.25 8.25 0 1 1 14.333 0l2.645 7.267a.375.375 0 0 1-.396.5l-3.562-.41-2.465 2.604a.375.375 0 0 1-.625-.13zm5.786-3.109a8.25 8.25 0 0 1-4.775 2.962l1.658 4.554 1.77-1.87.344-.362.496.057 2.558.294zm-12.95 0L3.476 20.5l2.557-.295.497-.057.344.363 1.77 1.87 1.658-4.555a8.25 8.25 0 0 1-4.775-2.961&#039; clip-rule=&#039;evenodd&#039;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt; &quot;;
     
     // 保存原始对象状态
     $originalRows = $this-&gt;row;
     $originalStack = $this-&gt;stack;
     $originalLength = $this-&gt;length;
     $totalOriginal = $this-&gt;getTotal();
     
     // 重置当前对象状态
     $this-&gt;row = [];
     $this-&gt;stack = [];
     $this-&gt;length = 0;
     
     if (isset($this-&gt;currentPage) &amp;&amp; $this-&gt;currentPage == 1) {
         // 查询置顶文章
         $selectSticky = $this-&gt;select()-&gt;where(&#039;type = ?&#039;, &#039;post&#039;);
         foreach ($sticky_cids as $i =&gt; $cid) {
             if ($i == 0) 
                 $selectSticky-&gt;where(&#039;cid = ?&#039;, $cid);
             else 
                 $selectSticky-&gt;orWhere(&#039;cid = ?&#039;, $cid);
         }
         $stickyPosts = $db-&gt;fetchAll($selectSticky);
         
         // 添加置顶文章到结果集
         foreach ($stickyPosts as &amp;$stickyPost) {
             $stickyPost[&#039;isSticky&#039;] = true;
             $stickyPost[&#039;stickyHtml&#039;] = $sticky_html;
             $this-&gt;push($stickyPost);
         }
         
         // 计算当前页应显示的普通文章数量
         $standardPageSize = $pageSize - count($stickyPosts);
         
         // 确保第一页不会显示太多文章
         if ($standardPageSize &lt;= 0) {
             $standardPageSize = 0; // 如果置顶文章已经填满或超过一页，则不显示普通文章
         }
     } else {
         // 非第一页显示正常数量的文章
         $standardPageSize = $pageSize;
     }
     
     // 查询普通文章
     if ($this-&gt;currentPage == 1) {
         // 第一页需要排除置顶文章并限制数量
         $selectNormal = $this-&gt;select()
             -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
             -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
             -&gt;where(&#039;created &lt; ?&#039;, time());
             
         // 排除所有置顶文章
         foreach ($sticky_cids as $cid) {
             $selectNormal-&gt;where(&#039;table.contents.cid != ?&#039;, $cid);
         }
         
         $selectNormal-&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
             -&gt;limit($standardPageSize)
             -&gt;offset(0);
     } else {
         // 非第一页的查询
         // 计算正确的偏移量：(当前页码-1) * 每页数量 - 置顶文章数
         // 这样可以确保不会漏掉文章
         $offset = ($this-&gt;currentPage - 1) * $pageSize - count($sticky_cids);
         $offset = max($offset, 0); // 确保偏移量不为负
         
         $selectNormal = $this-&gt;select()
             -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
             -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
             -&gt;where(&#039;created &lt; ?&#039;, time());
             
         // 排除所有置顶文章
         foreach ($sticky_cids as $cid) {
             $selectNormal-&gt;where(&#039;table.contents.cid != ?&#039;, $cid);
         }
         
         $selectNormal-&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
             -&gt;limit($pageSize)
             -&gt;offset($offset);
     }
 } else {
     // 没有有效的置顶文章ID，正常查询
     $selectNormal = $this-&gt;select()
         -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
         -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
         -&gt;where(&#039;created &lt; ?&#039;, time())
         -&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
         -&gt;page(isset($this-&gt;currentPage) ? $this-&gt;currentPage : 1, $pageSize);
 }
} else {
 // 没有设置置顶文章，正常查询
 $selectNormal = $this-&gt;select()
     -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
     -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
     -&gt;where(&#039;created &lt; ?&#039;, time())
     -&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
     -&gt;page(isset($this-&gt;currentPage) ? $this-&gt;currentPage : 1, $pageSize);
}

// 添加私有文章查询条件
if ($this-&gt;user-&gt;hasLogin()) {
 $uid = $this-&gt;user-&gt;uid;
 if ($uid) {
     $selectNormal-&gt;orWhere(&#039;authorId = ? AND status = ?&#039;, $uid, &#039;private&#039;);
 }
}

// 获取普通文章
$normalPosts = $db-&gt;fetchAll($selectNormal);

// 如果没有置顶文章或在前面的代码中没有重置对象状态，则在这里重置
if (empty($sticky) || empty(trim($sticky)) || empty($sticky_cids)) {
 $this-&gt;row = [];
 $this-&gt;stack = [];
 $this-&gt;length = 0;
}

// 将普通文章添加到结果集
foreach ($normalPosts as $normalPost) {
 $this-&gt;push($normalPost);
}
?&gt;</code></pre></li><li><p>在主题的<code>functions.php</code>文件中查找</p><pre><code class="lang-php">function themeConfig($form) {</code></pre><p>之后插入代码,会增加一个主题设置项</p><pre><code class="lang-php"> $sticky = new Typecho_Widget_Helper_Form_Element_Text(&#039;sticky&#039;, NULL, NULL, _t(&#039;置顶文章cid&#039;), _t(&#039;多篇文章以`|`符号隔开&#039;), _t(&#039;展示需要置顶的文章。&#039;));
 $form-&gt;addInput($sticky);</code></pre></li><li><p>在文章列表中合适的地方插入</p><pre><code class="lang-php">&lt;?php if (isset($this-&gt;isSticky) &amp;&amp; $this-&gt;isSticky): ?&gt;
&lt;?php echo $this-&gt;stickyHtml; ?&gt;
&lt;?php endif; ?&gt;</code></pre></li></ol>]]></description>
            <content:encoded><![CDATA[<h2>置顶</h2><p>最近才发现原来用的文章置顶还是有些问题的,置顶N篇文章,翻页时文章列表中文章还是维持原有的翻页逻辑,那么列表中文章的总数中就会减少N篇文章.</p><h2>实现</h2><p>正常逻辑应该是从文章列表中查找需要置顶的文章展示在首页列表,把原有的文章列表向后压.翻页时会筛选已经置顶的文章.不再重复显示.</p><h2>步骤</h2><ol><li><p>在<code>index.php</code>中插入代码</p><pre><code class="lang-PHP">&lt;?php  
$sticky = $this-&gt;options-&gt;sticky;
$db = Typecho_Db::get();
$pageSize = $this-&gt;options-&gt;pageSize;
if ($sticky &amp;&amp; !empty(trim($sticky))) {
 $sticky_cids = array_filter(explode(&#039;|&#039;, $sticky));
 if (!empty($sticky_cids)) {
     $sticky_html = &quot; &lt;span class=&#039;sticky--post&#039;&gt;&lt;svg xmlns=&#039;http://www.w3.org/2000/svg&#039; width=&#039;16px&#039; height=&#039;16px&#039; fill=&#039;none&#039; viewBox=&#039;0 0 24 24&#039; class=&#039;bk&#039;&gt;
&lt;path fill=&#039;#242424&#039; fill-rule=&#039;evenodd&#039; d=&#039;M12.333 16.993a7.4 7.4 0 0 1-1.686-.12 7.25 7.25 0 1 1 8.047-4.334v.001a7.2 7.2 0 0 1-.632 1.188 7.26 7.26 0 0 1-4.708 3.146l-.07.013q-.466.083-.951.105m.356.979a8.4 8.4 0 0 1-1.377 0l-2.075 5.7a.375.375 0 0 1-.625.13l-2.465-2.604-3.563.41a.375.375 0 0 1-.395-.501l2.645-7.267a8.25 8.25 0 1 1 14.333 0l2.645 7.267a.375.375 0 0 1-.396.5l-3.562-.41-2.465 2.604a.375.375 0 0 1-.625-.13zm5.786-3.109a8.25 8.25 0 0 1-4.775 2.962l1.658 4.554 1.77-1.87.344-.362.496.057 2.558.294zm-12.95 0L3.476 20.5l2.557-.295.497-.057.344.363 1.77 1.87 1.658-4.555a8.25 8.25 0 0 1-4.775-2.961&#039; clip-rule=&#039;evenodd&#039;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/span&gt; &quot;;
     
     // 保存原始对象状态
     $originalRows = $this-&gt;row;
     $originalStack = $this-&gt;stack;
     $originalLength = $this-&gt;length;
     $totalOriginal = $this-&gt;getTotal();
     
     // 重置当前对象状态
     $this-&gt;row = [];
     $this-&gt;stack = [];
     $this-&gt;length = 0;
     
     if (isset($this-&gt;currentPage) &amp;&amp; $this-&gt;currentPage == 1) {
         // 查询置顶文章
         $selectSticky = $this-&gt;select()-&gt;where(&#039;type = ?&#039;, &#039;post&#039;);
         foreach ($sticky_cids as $i =&gt; $cid) {
             if ($i == 0) 
                 $selectSticky-&gt;where(&#039;cid = ?&#039;, $cid);
             else 
                 $selectSticky-&gt;orWhere(&#039;cid = ?&#039;, $cid);
         }
         $stickyPosts = $db-&gt;fetchAll($selectSticky);
         
         // 添加置顶文章到结果集
         foreach ($stickyPosts as &amp;$stickyPost) {
             $stickyPost[&#039;isSticky&#039;] = true;
             $stickyPost[&#039;stickyHtml&#039;] = $sticky_html;
             $this-&gt;push($stickyPost);
         }
         
         // 计算当前页应显示的普通文章数量
         $standardPageSize = $pageSize - count($stickyPosts);
         
         // 确保第一页不会显示太多文章
         if ($standardPageSize &lt;= 0) {
             $standardPageSize = 0; // 如果置顶文章已经填满或超过一页，则不显示普通文章
         }
     } else {
         // 非第一页显示正常数量的文章
         $standardPageSize = $pageSize;
     }
     
     // 查询普通文章
     if ($this-&gt;currentPage == 1) {
         // 第一页需要排除置顶文章并限制数量
         $selectNormal = $this-&gt;select()
             -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
             -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
             -&gt;where(&#039;created &lt; ?&#039;, time());
             
         // 排除所有置顶文章
         foreach ($sticky_cids as $cid) {
             $selectNormal-&gt;where(&#039;table.contents.cid != ?&#039;, $cid);
         }
         
         $selectNormal-&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
             -&gt;limit($standardPageSize)
             -&gt;offset(0);
     } else {
         // 非第一页的查询
         // 计算正确的偏移量：(当前页码-1) * 每页数量 - 置顶文章数
         // 这样可以确保不会漏掉文章
         $offset = ($this-&gt;currentPage - 1) * $pageSize - count($sticky_cids);
         $offset = max($offset, 0); // 确保偏移量不为负
         
         $selectNormal = $this-&gt;select()
             -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
             -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
             -&gt;where(&#039;created &lt; ?&#039;, time());
             
         // 排除所有置顶文章
         foreach ($sticky_cids as $cid) {
             $selectNormal-&gt;where(&#039;table.contents.cid != ?&#039;, $cid);
         }
         
         $selectNormal-&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
             -&gt;limit($pageSize)
             -&gt;offset($offset);
     }
 } else {
     // 没有有效的置顶文章ID，正常查询
     $selectNormal = $this-&gt;select()
         -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
         -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
         -&gt;where(&#039;created &lt; ?&#039;, time())
         -&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
         -&gt;page(isset($this-&gt;currentPage) ? $this-&gt;currentPage : 1, $pageSize);
 }
} else {
 // 没有设置置顶文章，正常查询
 $selectNormal = $this-&gt;select()
     -&gt;where(&#039;type = ?&#039;, &#039;post&#039;)
     -&gt;where(&#039;status = ?&#039;, &#039;publish&#039;)
     -&gt;where(&#039;created &lt; ?&#039;, time())
     -&gt;order(&#039;created&#039;, Typecho_Db::SORT_DESC)
     -&gt;page(isset($this-&gt;currentPage) ? $this-&gt;currentPage : 1, $pageSize);
}

// 添加私有文章查询条件
if ($this-&gt;user-&gt;hasLogin()) {
 $uid = $this-&gt;user-&gt;uid;
 if ($uid) {
     $selectNormal-&gt;orWhere(&#039;authorId = ? AND status = ?&#039;, $uid, &#039;private&#039;);
 }
}

// 获取普通文章
$normalPosts = $db-&gt;fetchAll($selectNormal);

// 如果没有置顶文章或在前面的代码中没有重置对象状态，则在这里重置
if (empty($sticky) || empty(trim($sticky)) || empty($sticky_cids)) {
 $this-&gt;row = [];
 $this-&gt;stack = [];
 $this-&gt;length = 0;
}

// 将普通文章添加到结果集
foreach ($normalPosts as $normalPost) {
 $this-&gt;push($normalPost);
}
?&gt;</code></pre></li><li><p>在主题的<code>functions.php</code>文件中查找</p><pre><code class="lang-php">function themeConfig($form) {</code></pre><p>之后插入代码,会增加一个主题设置项</p><pre><code class="lang-php"> $sticky = new Typecho_Widget_Helper_Form_Element_Text(&#039;sticky&#039;, NULL, NULL, _t(&#039;置顶文章cid&#039;), _t(&#039;多篇文章以`|`符号隔开&#039;), _t(&#039;展示需要置顶的文章。&#039;));
 $form-&gt;addInput($sticky);</code></pre></li><li><p>在文章列表中合适的地方插入</p><pre><code class="lang-php">&lt;?php if (isset($this-&gt;isSticky) &amp;&amp; $this-&gt;isSticky): ?&gt;
&lt;?php echo $this-&gt;stickyHtml; ?&gt;
&lt;?php endif; ?&gt;</code></pre></li></ol>]]></content:encoded>
        </item>
                <item>
            <title>Typecho根据slug添加icon</title>
            <link>https://www.imsun.org/archives/1743.html</link>
            <guid isPermaLink="true">https://www.imsun.org/archives/1743.html</guid>
            <pubDate>Mon, 05 May 25 02:50:00 +0000</pubDate>
            <pubDateFormatted>2025年05月05日02:50</pubDateFormatted>
            <dc:creator>老孙博客</dc:creator>
            <description><![CDATA[<p>使用穷举的方式来匹配自定义icon </p><p>根据分类的slug来匹配</p><pre><code class="lang-php">                            &lt;?php 
                            switch($categories-&gt;slug) {
                                case &#039;images&#039;: echo &#039;&lt;i class=&quot;bi bi-images me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;share&#039;: echo &#039;&lt;i class=&quot;bi bi-share-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;NULL&#039;: echo &#039;&lt;i class=&quot;bi bi-speaker-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;memos&#039;: echo &#039;&lt;i class=&quot;bi bi-chat me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;codes&#039;: echo &#039;&lt;i class=&quot;bi bi-code me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;logs&#039;: echo &#039;&lt;i class=&quot;bi bi-person-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;test&#039;: echo &#039;&lt;i class=&quot;bi bi-calendar-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;tools&#039;: echo &#039;&lt;i class=&quot;bi bi-tools me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;music&#039;: echo &#039;&lt;i class=&quot;bi bi-music-note me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;links&#039;: echo &#039;&lt;i class=&quot;bi bi-link me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;video&#039;: echo &#039;&lt;i class=&quot;bi bi-camera-video me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;life&#039;: echo &#039;&lt;i class=&quot;bi bi-heart-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;study&#039;: echo &#039;&lt;i class=&quot;bi bi-book-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;news&#039;: echo &#039;&lt;i class=&quot;bi bi-newspaper me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;themes&#039;: echo &#039;&lt;i class=&quot;bi bi-palette me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;plugins&#039;: echo &#039;&lt;i class=&quot;bi bi-gear-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;photo&#039;: echo &#039;&lt;i class=&quot;bi bi-images me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                default: echo &#039;&lt;i class=&quot;bi bi-folder-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            } ?&gt;
</code></pre><p>同样也可以根据自定义页面的slug匹配</p><pre><code class="lang-php">&lt;?php $pages = Typecho_Widget::widget(&#039;Widget_Contents_Page_List&#039;); ?&gt;
&lt;?php while($pages-&gt;next()): ?&gt;
&lt;li&gt;
    &lt;a href=&quot;&lt;?php $pages-&gt;permalink(); ?&gt;&quot;&gt;
    &lt;?php 
    switch($pages-&gt;slug) {
        case &#039;about&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-user&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;circle cx=&quot;12&quot; cy=&quot;7&quot; r=&quot;4&quot; /&gt;&lt;path d=&quot;M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2&quot; /&gt;&lt;/svg&gt; &#039;; // 关于页面
        break;
        case &#039;links&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-link&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;path d=&quot;M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5&quot; /&gt;&lt;path d=&quot;M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5&quot; /&gt;&lt;/svg&gt;&#039;; // 链接页面
        break;
        case &#039;archives&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-archive&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;rect x=&quot;3&quot; y=&quot;4&quot; width=&quot;18&quot; height=&quot;4&quot; rx=&quot;2&quot; /&gt;&lt;path d=&quot;M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10&quot; /&gt;&lt;line x1=&quot;10&quot; y1=&quot;12&quot; x2=&quot;14&quot; y2=&quot;12&quot; /&gt;&lt;/svg&gt;&#039;; // 归档页面
        break;
        case &#039;gbook&#039;: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-article&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-article&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z&quot; /&gt;&lt;path d=&quot;M7 8h10&quot; /&gt;&lt;path d=&quot;M7 12h10&quot; /&gt;&lt;path d=&quot;M7 16h10&quot; /&gt;&lt;/svg&gt;&#039;; // 博客页面
        break;
        case &#039;messages&#039;: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-messages&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-messages&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10&quot; /&gt;&lt;path d=&quot;M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2&quot; /&gt;&lt;/svg&gt;&#039;; // 留言页面
        break;
        default: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-file&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-file&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M14 3v4a1 1 0 0 0 1 1h4&quot; /&gt;&lt;path d=&quot;M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z&quot; /&gt;&lt;/svg&gt;&#039;; // 默认图标
    } ?&gt;
    &lt;span&gt;&lt;?php $pages-&gt;title(); ?&gt;&lt;/span&gt;
    &lt;/a&gt;
&lt;/li&gt;
&lt;?php endwhile; ?&gt;</code></pre>]]></description>
            <content:encoded><![CDATA[<p>使用穷举的方式来匹配自定义icon </p><p>根据分类的slug来匹配</p><pre><code class="lang-php">                            &lt;?php 
                            switch($categories-&gt;slug) {
                                case &#039;images&#039;: echo &#039;&lt;i class=&quot;bi bi-images me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;share&#039;: echo &#039;&lt;i class=&quot;bi bi-share-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;NULL&#039;: echo &#039;&lt;i class=&quot;bi bi-speaker-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;memos&#039;: echo &#039;&lt;i class=&quot;bi bi-chat me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;codes&#039;: echo &#039;&lt;i class=&quot;bi bi-code me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;logs&#039;: echo &#039;&lt;i class=&quot;bi bi-person-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;test&#039;: echo &#039;&lt;i class=&quot;bi bi-calendar-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;tools&#039;: echo &#039;&lt;i class=&quot;bi bi-tools me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;music&#039;: echo &#039;&lt;i class=&quot;bi bi-music-note me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;links&#039;: echo &#039;&lt;i class=&quot;bi bi-link me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;video&#039;: echo &#039;&lt;i class=&quot;bi bi-camera-video me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;life&#039;: echo &#039;&lt;i class=&quot;bi bi-heart-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;study&#039;: echo &#039;&lt;i class=&quot;bi bi-book-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;news&#039;: echo &#039;&lt;i class=&quot;bi bi-newspaper me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;themes&#039;: echo &#039;&lt;i class=&quot;bi bi-palette me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;plugins&#039;: echo &#039;&lt;i class=&quot;bi bi-gear-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                case &#039;photo&#039;: echo &#039;&lt;i class=&quot;bi bi-images me-1&quot;&gt;&lt;/i&gt;&#039;;
                            break;
                                default: echo &#039;&lt;i class=&quot;bi bi-folder-fill me-1&quot;&gt;&lt;/i&gt;&#039;;
                            } ?&gt;
</code></pre><p>同样也可以根据自定义页面的slug匹配</p><pre><code class="lang-php">&lt;?php $pages = Typecho_Widget::widget(&#039;Widget_Contents_Page_List&#039;); ?&gt;
&lt;?php while($pages-&gt;next()): ?&gt;
&lt;li&gt;
    &lt;a href=&quot;&lt;?php $pages-&gt;permalink(); ?&gt;&quot;&gt;
    &lt;?php 
    switch($pages-&gt;slug) {
        case &#039;about&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-user&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;circle cx=&quot;12&quot; cy=&quot;7&quot; r=&quot;4&quot; /&gt;&lt;path d=&quot;M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2&quot; /&gt;&lt;/svg&gt; &#039;; // 关于页面
        break;
        case &#039;links&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-link&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;path d=&quot;M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5&quot; /&gt;&lt;path d=&quot;M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5&quot; /&gt;&lt;/svg&gt;&#039;; // 链接页面
        break;
        case &#039;archives&#039;: echo &#039;&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;icon icon-tabler icon-tabler-archive&quot; width=&quot;24&quot; height=&quot;24&quot; viewBox=&quot;0 0 24 24&quot; stroke-width=&quot;2&quot; stroke=&quot;currentColor&quot; fill=&quot;none&quot; stroke-linecap=&quot;round&quot; stroke-linejoin=&quot;round&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot;/&gt;&lt;rect x=&quot;3&quot; y=&quot;4&quot; width=&quot;18&quot; height=&quot;4&quot; rx=&quot;2&quot; /&gt;&lt;path d=&quot;M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10&quot; /&gt;&lt;line x1=&quot;10&quot; y1=&quot;12&quot; x2=&quot;14&quot; y2=&quot;12&quot; /&gt;&lt;/svg&gt;&#039;; // 归档页面
        break;
        case &#039;gbook&#039;: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-article&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-article&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M3 4m0 2a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2z&quot; /&gt;&lt;path d=&quot;M7 8h10&quot; /&gt;&lt;path d=&quot;M7 12h10&quot; /&gt;&lt;path d=&quot;M7 16h10&quot; /&gt;&lt;/svg&gt;&#039;; // 博客页面
        break;
        case &#039;messages&#039;: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-messages&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-messages&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M21 14l-3 -3h-7a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1h9a1 1 0 0 1 1 1v10&quot; /&gt;&lt;path d=&quot;M14 15v2a1 1 0 0 1 -1 1h-7l-3 3v-10a1 1 0 0 1 1 -1h2&quot; /&gt;&lt;/svg&gt;&#039;; // 留言页面
        break;
        default: echo &#039;&lt;svg  xmlns=&quot;http://www.w3.org/2000/svg&quot;  class=&quot;icon icon-tabler icon-tabler-file&quot; width=&quot;24&quot;  height=&quot;24&quot;  viewBox=&quot;0 0 24 24&quot;  fill=&quot;none&quot;  stroke=&quot;currentColor&quot;  stroke-width=&quot;2&quot;  stroke-linecap=&quot;round&quot;  stroke-linejoin=&quot;round&quot;  class=&quot;icon icon-tabler icons-tabler-outline icon-tabler-file&quot;&gt;&lt;path stroke=&quot;none&quot; d=&quot;M0 0h24v24H0z&quot; fill=&quot;none&quot;/&gt;&lt;path d=&quot;M14 3v4a1 1 0 0 0 1 1h4&quot; /&gt;&lt;path d=&quot;M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z&quot; /&gt;&lt;/svg&gt;&#039;; // 默认图标
    } ?&gt;
    &lt;span&gt;&lt;?php $pages-&gt;title(); ?&gt;&lt;/span&gt;
    &lt;/a&gt;
&lt;/li&gt;
&lt;?php endwhile; ?&gt;</code></pre>]]></content:encoded>
        </item>
            </channel>
</rss>
        