<?xml version="1.0" encoding="UTF-8"?><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" xmlns:version="2.0"><channel><title>ZSXの小站</title><description>钟神秀的博客，我在这里记录我的生活日常、踩坑记录和资源分享。 feedId:172229198194932736+userId:166528077360436224</description><link>https://boke.zsx815.top/</link><language>zh</language><item><title>为博客添加外链安全跳转中转页</title><link>https://boke.zsx815.top/post/go-safe/</link><guid isPermaLink="true">https://boke.zsx815.top/post/go-safe/</guid><description>参考hexo-safego项目，为博客添加外链安全跳转功能，提高用户体验和安全性。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/go-safe/&quot;&gt;https://boke.zsx815.top/post/go-safe/&lt;/a&gt;&lt;/blockquote&gt; &lt;p&gt;import Info from &amp;quot;@/components/mdx/Info.astro&amp;quot;;&lt;/p&gt;
&lt;p&gt;&lt;Info&gt;下列文章来自AI&lt;/Info&gt;&lt;/p&gt;
&lt;h2&gt;外链安全跳转中转页的实现&lt;/h2&gt;
&lt;p&gt;　　在浏览博客时，经常会点击到外部链接。为了提高用户体验和安全性，我决定为博客添加一个外链安全跳转中转页。这个功能参考了&lt;a href=&quot;https://github.com/willow-god/hexo-safego&quot;&gt;hexo-safego&lt;/a&gt;项目，但进行了适当的适配以符合我的博客风格。&lt;/p&gt;
&lt;h3&gt;功能设计&lt;/h3&gt;
&lt;p&gt;外链安全跳转功能的主要需求：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;中转提示&lt;/strong&gt;：当用户点击外部链接时，显示一个友好的中转页面，告知用户即将离开当前网站&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;目标URL展示&lt;/strong&gt;：清晰显示用户即将访问的URL，方便用户确认&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;操作选择&lt;/strong&gt;：提供&amp;quot;继续访问&amp;quot;和&amp;quot;返回上页&amp;quot;两个选项&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;自动跳转&lt;/strong&gt;：添加5秒倒计时自动跳转功能&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;白名单机制&lt;/strong&gt;：对常用服务（如GitHub等）不触发中转，直接跳转&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;实现步骤&lt;/h3&gt;
&lt;h4&gt;1. 创建中转页面&lt;/h4&gt;
&lt;p&gt;首先创建&lt;code&gt;/src/pages/go.astro&lt;/code&gt;文件作为中转页面：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
import BaseLayout from &amp;quot;@/layouts/BaseLayout.astro&amp;quot;;
import { Icon } from &amp;quot;astro-icon/components&amp;quot;;

// 安全地获取目标链接
let targetUrl = &amp;#39;/&amp;#39;;
try {
  const url = Astro.url;
  if (url &amp;amp;&amp;amp; url.searchParams) {
    targetUrl = url.searchParams.get(&amp;#39;url&amp;#39;) || &amp;#39;/&amp;#39;;
  }
} catch (e) {
  console.error(&amp;#39;获取URL参数失败:&amp;#39;, e);
}

// 定义可信任的域名白名单
const trustedDomains = [
  &amp;#39;boke.zsx815.top&amp;#39;,
  &amp;#39;mcyzsx.top&amp;#39;,
  &amp;#39;github.com&amp;#39;,
  &amp;#39;gitee.com&amp;#39;,
  &amp;#39;cdn.jsdelivr.net&amp;#39;,
  &amp;#39;unpkg.com&amp;#39;
];

// 检查URL是否在白名单中
function isTrustedDomain(url: string): boolean {
  try {
    const urlObj = new URL(url);
    return trustedDomains.some(domain =&amp;gt; urlObj.hostname.includes(domain));
  } catch (e) {
    return false;
  }
}

// 直接跳转到白名单域名
if (targetUrl !== &amp;#39;/&amp;#39; &amp;amp;&amp;amp; isTrustedDomain(targetUrl)) {
  try {
    return Astro.redirect(targetUrl);
  } catch (e) {
    console.error(&amp;#39;重定向失败:&amp;#39;, e);
  }
}
---

&amp;lt;BaseLayout title=&amp;quot;外链跳转提示&amp;quot;&amp;gt;
  &amp;lt;div class=&amp;quot;container mx-auto px-4 py-16 max-w-2xl&amp;quot;&amp;gt;
    &amp;lt;div class=&amp;quot;bg-base-100 rounded-xl shadow-lg p-8 text-center&amp;quot;&amp;gt;
      &amp;lt;div class=&amp;quot;mb-6&amp;quot;&amp;gt;
        &amp;lt;Icon name=&amp;quot;lucide:external-link&amp;quot; class=&amp;quot;w-16 h-16 mx-auto text-warning&amp;quot; /&amp;gt;
      &amp;lt;/div&amp;gt;
      
      &amp;lt;h1 class=&amp;quot;text-3xl font-bold mb-4&amp;quot;&amp;gt;即将离开本站&amp;lt;/h1&amp;gt;
      
      &amp;lt;p class=&amp;quot;text-lg mb-6 text-base-content/80&amp;quot;&amp;gt;
        您即将访问外部网站，本站不对该网站内容负责。
      &amp;lt;/p&amp;gt;
      
      &amp;lt;div class=&amp;quot;bg-base-200 rounded-lg p-4 mb-8 text-left break-all&amp;quot;&amp;gt;
        &amp;lt;p class=&amp;quot;text-sm text-base-content/60 mb-2&amp;quot;&amp;gt;目标网址:&amp;lt;/p&amp;gt;
        &amp;lt;p class=&amp;quot;text-base-content font-medium&amp;quot;&amp;gt;{targetUrl}&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      
      &amp;lt;!-- 倒计时提示 --&amp;gt;
      &amp;lt;div class=&amp;quot;flex justify-center mb-4&amp;quot;&amp;gt;
        &amp;lt;p id=&amp;quot;countdownText&amp;quot; class=&amp;quot;text-sm text-base-content/60&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      
      &amp;lt;div class=&amp;quot;flex flex-col sm:flex-row gap-4 justify-center&amp;quot;&amp;gt;
        &amp;lt;button id=&amp;quot;continueButton&amp;quot; class=&amp;quot;btn btn-primary&amp;quot;&amp;gt;
          &amp;lt;Icon name=&amp;quot;lucide:external-link&amp;quot; class=&amp;quot;w-4 h-4 mr-2&amp;quot; /&amp;gt;
          继续访问
        &amp;lt;/button&amp;gt;
        
        &amp;lt;button onclick=&amp;quot;history.back()&amp;quot; class=&amp;quot;btn btn-outline&amp;quot;&amp;gt;
          &amp;lt;Icon name=&amp;quot;lucide:arrow-left&amp;quot; class=&amp;quot;w-4 h-4 mr-2&amp;quot; /&amp;gt;
          返回上页
        &amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
      
      &amp;lt;div class=&amp;quot;mt-8 pt-6 border-t border-base-300&amp;quot;&amp;gt;
        &amp;lt;p class=&amp;quot;text-sm text-base-content/60&amp;quot;&amp;gt;
          &amp;lt;Icon name=&amp;quot;lucide:info&amp;quot; class=&amp;quot;w-4 h-4 inline mr-1&amp;quot; /&amp;gt;
          为了您的上网安全，请注意辨别网站真伪，保护个人信息。
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;

  &amp;lt;script is:inline&amp;gt;
    // 添加5秒后自动跳转选项
    let countdown = 5;
    let countdownInterval;
    
    document.addEventListener(&amp;#39;DOMContentLoaded&amp;#39;, () =&amp;gt; {
      // 安全地获取URL参数
      let targetUrl = &amp;#39;/&amp;#39;;
      try {
        const urlParams = new URLSearchParams(window.location.search);
        targetUrl = urlParams.get(&amp;#39;url&amp;#39;) || &amp;#39;/&amp;#39;;
      } catch (e) {
        console.error(&amp;#39;获取URL参数失败:&amp;#39;, e);
      }
      
      // 直接获取倒计时元素
      const countdownElement = document.getElementById(&amp;#39;countdownText&amp;#39;);
      if (!countdownElement) {
        console.error(&amp;#39;找不到倒计时元素&amp;#39;);
        return;
      }
      
      // 跳转到目标URL的函数
      function redirectToTarget() {
        clearInterval(countdownInterval);
        // 使用window.location.href代替window.open，确保跳转成功
        window.location.href = targetUrl;
      }
      
      function updateCountdown() {
        if (countdown &amp;gt; 0) {
          countdownElement.textContent = `${countdown} 秒后自动跳转...`;
          countdown--;
        } else {
          redirectToTarget();
        }
      }
      
      // 为继续访问按钮添加点击事件
      const continueButton = document.getElementById(&amp;#39;continueButton&amp;#39;);
      if (continueButton) {
        continueButton.addEventListener(&amp;#39;click&amp;#39;, redirectToTarget);
      }
      
      // 如果用户点击了返回按钮，停止倒计时
      const backButton = document.querySelector(&amp;#39;button[onclick=&amp;quot;history.back()&amp;quot;]&amp;#39;);
      if (backButton) {
        backButton.addEventListener(&amp;#39;click&amp;#39;, () =&amp;gt; {
          clearInterval(countdownInterval);
        });
      }
      
      updateCountdown();
      countdownInterval = setInterval(updateCountdown, 1000);
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/BaseLayout&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;2. 创建外链处理脚本&lt;/h4&gt;
&lt;p&gt;在&lt;code&gt;/src/layouts/BaseLayout.astro&lt;/code&gt;中添加外链处理脚本：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&amp;lt;script is:inline&amp;gt;
// @ts-nocheck
/**
 * 外链安全跳转脚本
 * 将所有外部链接重定向到中转页面
 */

// 可信任的域名白名单
const trustedDomains = [
  &amp;#39;boke.zsx815.top&amp;#39;,
  &amp;#39;mcyzsx.top&amp;#39;,
  &amp;#39;localhost&amp;#39;,
  &amp;#39;127.0.0.1&amp;#39;,
  &amp;#39;github.com&amp;#39;,
  &amp;#39;gitee.com&amp;#39;,
  &amp;#39;cdn.jsdelivr.net&amp;#39;,
  &amp;#39;unpkg.com&amp;#39;
];

// 检查URL是否在白名单中
function isTrustedDomain(url) {
  try {
    const urlObj = new URL(url);
    // 检查是否是同域名或白名单域名
    if (window.location.hostname === urlObj.hostname) {
      return true;
    }
    return trustedDomains.some(domain =&amp;gt; urlObj.hostname.includes(domain));
  } catch (e) {
    return false;
  }
}

// 处理链接点击
function handleLinkClick(event) {
  const link = event.target.closest(&amp;#39;a&amp;#39;);
  if (!link) return;
  
  const href = link.getAttribute(&amp;#39;href&amp;#39;);
  if (!href) return;
  
  // 跳过特殊链接
  if (
    href.startsWith(&amp;#39;#&amp;#39;) ||           // 锚点
    href.startsWith(&amp;#39;javascript:&amp;#39;) ||  // JavaScript
    href.startsWith(&amp;#39;mailto:&amp;#39;) ||      // 邮件
    href.startsWith(&amp;#39;tel:&amp;#39;) ||         // 电话
    href.startsWith(&amp;#39;data:&amp;#39;)           // Data URI
  ) {
    return;
  }
  
  try {
    const urlObj = new URL(href, window.location.href);
    // 如果是外部链接且不在白名单中
    if (urlObj.hostname !== window.location.hostname &amp;amp;&amp;amp; !isTrustedDomain(urlObj.href)) {
      event.preventDefault();
      // 跳转到中转页
      window.location.href = `/go?url=${encodeURIComponent(urlObj.href)}`;
    }
  } catch (e) {
    console.error(&amp;#39;Safego: 处理链接时出错&amp;#39;, e);
  }
}

// 初始化函数
function initSafeGo() {
  // 监听整个文档的点击事件
  document.addEventListener(&amp;#39;click&amp;#39;, handleLinkClick);
  
  // 处理已经存在的链接
  document.querySelectorAll(&amp;#39;a[href]&amp;#39;).forEach(link =&amp;gt; {
    const href = link.getAttribute(&amp;#39;href&amp;#39;);
    if (!href) return;
    
    try {
      const urlObj = new URL(href, window.location.href);
      // 如果是外部链接且不在白名单中，不做额外标记
      if (urlObj.hostname !== window.location.hostname &amp;amp;&amp;amp; !isTrustedDomain(urlObj.href)) {
        // 外部链接不添加图标，保持简洁
      }
    } catch (e) {
      // URL解析失败，可能是相对路径，忽略
    }
  });
}

// 当DOM加载完成后初始化
if (document.readyState === &amp;#39;loading&amp;#39;) {
  document.addEventListener(&amp;#39;DOMContentLoaded&amp;#39;, initSafeGo);
} else {
  initSafeGo();
}

// 添加到全局作用域，方便调试
window.SafeGo = {
  isTrustedDomain,
  handleLinkClick,
  init: initSafeGo
};

// 确保在页面导航后重新初始化
document.addEventListener(&amp;#39;astro:page-load&amp;#39;, initSafeGo);
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;3. 中转页面UI设计&lt;/h4&gt;
&lt;p&gt;中转页面的UI设计要点：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;清晰提示&lt;/strong&gt;：显示&amp;quot;即将离开本站&amp;quot;的提示&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;URL展示&lt;/strong&gt;：以醒目方式显示目标URL&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;操作按钮&lt;/strong&gt;：提供&amp;quot;继续访问&amp;quot;和&amp;quot;返回上页&amp;quot;两个选项&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;倒计时&lt;/strong&gt;：在按钮上方显示倒计时，5秒后自动跳转&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;div class=&amp;quot;bg-base-100 rounded-xl shadow-lg p-8 text-center&amp;quot;&amp;gt;
  &amp;lt;div class=&amp;quot;mb-6&amp;quot;&amp;gt;
    &amp;lt;Icon name=&amp;quot;lucide:external-link&amp;quot; class=&amp;quot;w-16 h-16 mx-auto text-warning&amp;quot; /&amp;gt;
  &amp;lt;/div&amp;gt;
  
  &amp;lt;h1 class=&amp;quot;text-3xl font-bold mb-4&amp;quot;&amp;gt;即将离开本站&amp;lt;/h1&amp;gt;
  
  &amp;lt;p class=&amp;quot;text-lg mb-6 text-base-content/80&amp;quot;&amp;gt;
    您即将访问外部网站，本站不对该网站内容负责。
  &amp;lt;/p&amp;gt;
  
  &amp;lt;div class=&amp;quot;bg-base-200 rounded-lg p-4 mb-8 text-left break-all&amp;quot;&amp;gt;
    &amp;lt;p class=&amp;quot;text-sm text-base-content/60 mb-2&amp;quot;&amp;gt;目标网址:&amp;lt;/p&amp;gt;
    &amp;lt;p class=&amp;quot;text-base-content font-medium&amp;quot;&amp;gt;{targetUrl}&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
  
  &amp;lt;!-- 倒计时提示 --&amp;gt;
  &amp;lt;div class=&amp;quot;flex justify-center mb-4&amp;quot;&amp;gt;
    &amp;lt;p id=&amp;quot;countdownText&amp;quot; class=&amp;quot;text-sm text-base-content/60&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
  
  &amp;lt;div class=&amp;quot;flex flex-col sm:flex-row gap-4 justify-center&amp;quot;&amp;gt;
    &amp;lt;button id=&amp;quot;continueButton&amp;quot; class=&amp;quot;btn btn-primary&amp;quot;&amp;gt;
      &amp;lt;Icon name=&amp;quot;lucide:external-link&amp;quot; class=&amp;quot;w-4 h-4 mr-2&amp;quot; /&amp;gt;
      继续访问
    &amp;lt;/button&amp;gt;
    
    &amp;lt;button onclick=&amp;quot;history.back()&amp;quot; class=&amp;quot;btn btn-outline&amp;quot;&amp;gt;
      &amp;lt;Icon name=&amp;quot;lucide:arrow-left&amp;quot; class=&amp;quot;w-4 h-4 mr-2&amp;quot; /&amp;gt;
      返回上页
    &amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;4. 倒计时脚本&lt;/h4&gt;
&lt;p&gt;添加倒计时功能，在用户不操作时自动跳转：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&amp;lt;script is:inline&amp;gt;
  // @ts-nocheck
  // 添加5秒后自动跳转选项
  let countdown = 5;
  let countdownInterval;
  
  document.addEventListener(&amp;#39;DOMContentLoaded&amp;#39;, () =&amp;gt; {
    // 安全地获取URL参数
    let targetUrl = &amp;#39;/&amp;#39;;
    try {
      const urlParams = new URLSearchParams(window.location.search);
      targetUrl = urlParams.get(&amp;#39;url&amp;#39;) || &amp;#39;/&amp;#39;;
    } catch (e) {
      console.error(&amp;#39;获取URL参数失败:&amp;#39;, e);
    }
    
    // 直接获取倒计时元素
    const countdownElement = document.getElementById(&amp;#39;countdownText&amp;#39;);
    if (!countdownElement) {
      console.error(&amp;#39;找不到倒计时元素&amp;#39;);
      return;
    }
    
    // 跳转到目标URL的函数
    function redirectToTarget() {
      clearInterval(countdownInterval);
      // 使用window.location.href代替window.open，确保跳转成功
      window.location.href = targetUrl;
    }
    
    function updateCountdown() {
      if (countdown &amp;gt; 0) {
        countdownElement.textContent = `${countdown} 秒后自动跳转...`;
        countdown--;
      } else {
        redirectToTarget();
      }
    }
    
    // 为继续访问按钮添加点击事件
    const continueButton = document.getElementById(&amp;#39;continueButton&amp;#39;);
    if (continueButton) {
      continueButton.addEventListener(&amp;#39;click&amp;#39;, redirectToTarget);
    }
    
    // 如果用户点击了返回按钮，停止倒计时
    const backButton = document.querySelector(&amp;#39;button[onclick=&amp;quot;history.back()&amp;quot;]&amp;#39;);
    if (backButton) {
      backButton.addEventListener(&amp;#39;click&amp;#39;, () =&amp;gt; {
        clearInterval(countdownInterval);
      });
    }
    
    updateCountdown();
    countdownInterval = setInterval(updateCountdown, 1000);
  });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;遇到的问题及解决方案&lt;/h3&gt;
&lt;h4&gt;1. Astro.url 未定义错误&lt;/h4&gt;
&lt;p&gt;在实现初期，遇到了&amp;quot;Cannot read properties of undefined (reading &amp;#39;searchParams&amp;#39;)&amp;quot;错误，这是因为&lt;code&gt;Astro.url&lt;/code&gt;在某些情况下可能是未定义的。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;let targetUrl = &amp;#39;/&amp;#39;;
try {
  const url = Astro.url;
  if (url &amp;amp;&amp;amp; url.searchParams) {
    targetUrl = url.searchParams.get(&amp;#39;url&amp;#39;) || &amp;#39;/&amp;#39;;
  }
} catch (e) {
  console.error(&amp;#39;获取URL参数失败:&amp;#39;, e);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;2. &amp;quot;继续访问&amp;quot;按钮跳转失败&lt;/h4&gt;
&lt;p&gt;用户点击&amp;quot;继续访问&amp;quot;按钮时，只刷新了页面而没有跳转到目标网站。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;将链接从&lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;标签改为&lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt;标签&lt;/li&gt;
&lt;li&gt;使用&lt;code&gt;window.location.href&lt;/code&gt;代替&lt;code&gt;window.open()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;创建统一的&lt;code&gt;redirectToTarget()&lt;/code&gt;函数处理跳转&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;function redirectToTarget() {
  clearInterval(countdownInterval);
  window.location.href = targetUrl;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;3. 倒计时位置和样式调整&lt;/h4&gt;
&lt;p&gt;最初倒计时显示在按钮下方，用户希望它显示在按钮上方并居中。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;!-- 倒计时提示 --&amp;gt;
&amp;lt;div class=&amp;quot;flex justify-center mb-4&amp;quot;&amp;gt;
  &amp;lt;p id=&amp;quot;countdownText&amp;quot; class=&amp;quot;text-sm text-base-content/60&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;4. 脚本类型和 Astro 脚本处理问题&lt;/h4&gt;
&lt;p&gt;在 Astro 组件中使用脚本时，需要注意脚本标签的类型和处理方式。Astro 默认将脚本标签视为普通 JavaScript，而不是 TypeScript，这会导致类型注解错误。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;对于需要在客户端执行的脚本，使用 &lt;code&gt;is:inline&lt;/code&gt; 指令&lt;/li&gt;
&lt;li&gt;移除 TypeScript 类型注解，改用纯 JavaScript 语法&lt;/li&gt;
&lt;li&gt;如果仍然需要避免 TypeScript 检查，可以添加 &lt;code&gt;// @ts-nocheck&lt;/code&gt; 注释&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;&amp;lt;!-- 正确的方式 --&amp;gt;
&amp;lt;script is:inline&amp;gt;
  // @ts-nocheck
  (window).__openQR = function(src) {
    // JavaScript 代码，不含类型注解
  };
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;5. MDX代码块格式问题&lt;/h4&gt;
&lt;p&gt;在MDX中，所有代码块必须正确地标记为代码，否则MDX解析器会尝试执行它们作为JavaScript。&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;确保所有代码块使用正确的语法高亮标识符（astro、js）&lt;/li&gt;
&lt;li&gt;确保代码块使用三个反引号包裹&lt;/li&gt;
&lt;li&gt;避免在MDX中直接使用非导入/导出的JavaScript语句&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;效果展示&lt;/h3&gt;
&lt;p&gt;最终实现的外链安全跳转功能具有以下特点：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;安全性&lt;/strong&gt;：提醒用户即将离开当前网站，提高安全意识&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;透明度&lt;/strong&gt;：清晰显示目标URL，避免钓鱼网站风险&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;用户体验&lt;/strong&gt;：提供多种操作选择，包括自动跳转和手动控制&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;兼容性&lt;/strong&gt;：对白名单域名直接跳转，不影响正常使用体验&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;视觉一致性&lt;/strong&gt;：中转页面设计与博客整体风格保持一致&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;总结&lt;/h3&gt;
&lt;p&gt;通过这次实现，我为博客添加了外链安全跳转功能，提高了用户的外链访问体验和安全性。这个功能借鉴了hexo-safego项目的设计思路，但根据Astro框架的特点和我的博客风格进行了适配和优化。&lt;/p&gt;
&lt;p&gt;实现过程中遇到的一些问题，如Astro.url未定义、跳转失败、MDX格式问题等，都通过适当的错误处理和代码调整得到了解决。最终的实现既满足了功能需求，又保持了良好的用户体验。&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Sun, 14 Dec 2025 00:00:00 GMT</pubDate></item><item><title>关于github-issues当做动态的想法</title><link>https://boke.zsx815.top/post/github-issues-moment/</link><guid isPermaLink="true">https://boke.zsx815.top/post/github-issues-moment/</guid><description>起源于在不同博客游览间，看到了一篇文章，感觉很有搞头，然后到了博主的GitHub仓库，然后有了些感受。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/github-issues-moment/&quot;&gt;https://boke.zsx815.top/post/github-issues-moment/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;起源于在不同博客游览间，看到了一篇&lt;a href=&quot;https://lawtee.com/article/add-live-talking-page-for-static-blog/&quot;&gt;文章&lt;/a&gt;，感觉很有搞头，然后到了博主的&lt;a href=&quot;https://github.com/h2dcc/moments&quot;&gt;GitHub仓库&lt;/a&gt;，然后有了些感受。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;优点&lt;/h2&gt;
&lt;p&gt;有不少的博客基于github-issues，包括&lt;a href=&quot;https://github.com/wallleap/ethereal&quot;&gt;etheral&lt;/a&gt;、&lt;a href=&quot;https://github.com/Meekdai/Gmeek&quot;&gt;Gmeek&lt;/a&gt;等等，当然，除了当博客，你也可以使用其来搞博客。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt; 很好的一种博客写作方式，理论上GitHub不倒，这个方式可以一直使用。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;手机上有GitHub的APP，你可以比较简单地在手机上发布动态。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;这种方式可以被用来在各种博客里使用，包括Hugo、astro等等。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;大致的工作流如下:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;// .github/workflows/issue.yml

name: Trigger Empty Commit on Issue Update

on:
  issue_comment:
    types: [created, edited]
  workflow_dispatch:  # 手动触发入口

jobs:
  trigger-empty-commit:
    runs-on: ubuntu-latest
    steps:
      - name: Check trigger type and prepare commit message
        id: check-trigger
        run: |
          # 处理手动触发
          if [[ &amp;quot;${{ github.event_name }}&amp;quot; == &amp;quot;workflow_dispatch&amp;quot; ]]; then
            echo &amp;quot;should_trigger=true&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
            echo &amp;quot;commit_msg=&amp;#39;[Manual] Trigger update from moments/issues/1&amp;#39;&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
          # 处理issue评论事件
          elif [ &amp;quot;${{ github.event.issue.number }}&amp;quot; -eq 1 ]; then
            echo &amp;quot;should_trigger=true&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
            echo &amp;quot;commit_msg=&amp;#39;Trigger update from moments/issues/1&amp;#39;&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
          else
            echo &amp;quot;should_trigger=false&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
            echo &amp;quot;commit_msg=&amp;#39;&amp;#39;&amp;quot; &amp;gt;&amp;gt; $GITHUB_OUTPUT
          fi

      - name: Trigger empty commit in lawtee.github.io
        if: steps.check-trigger.outputs.should_trigger == &amp;#39;true&amp;#39;
        uses: actions/github-script@v6
        env:
          PAT: ${{ secrets.PAT }}
        with:
          script: |
            const { execSync } = require(&amp;#39;child_process&amp;#39;);
            const repo = &amp;#39;h2dcc/lawtee.github.io&amp;#39;;
            const token = process.env.PAT;
      
            // 从步骤输出获取提交信息
            const commitMsg = `${{ steps.check-trigger.outputs.commit_msg }}`;

            try {
              const repoUrl = `https://x-access-token:${token}@github.com/${repo}.git`;
              execSync(`git clone ${repoUrl}`, { stdio: &amp;#39;inherit&amp;#39; });
              process.chdir(&amp;#39;lawtee.github.io&amp;#39;);

              execSync(&amp;#39;git config user.name &amp;quot;github-actions[bot]&amp;quot;&amp;#39;, { stdio: &amp;#39;inherit&amp;#39; });
              execSync(&amp;#39;git config user.email &amp;quot;41898282+github-actions[bot]@users.noreply.github.com&amp;quot;&amp;#39;, { stdio: &amp;#39;inherit&amp;#39; });

              // 安全执行空提交
              execSync(`git commit --allow-empty -m &amp;quot;${commitMsg.replace(/&amp;quot;/g, &amp;#39;\\&amp;quot;&amp;#39;)}&amp;quot;`, { stdio: &amp;#39;inherit&amp;#39; });
              execSync(`git push ${repoUrl} master`, { stdio: &amp;#39;inherit&amp;#39; });
              console.log(&amp;#39;✅ Empty commit pushed successfully!&amp;#39;);
            } catch (error) {
              console.error(&amp;#39;❌ Error:&amp;#39;, error.message);
              process.exit(1);
            }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;你需要的，是搞个公开的仓库(私有仓库不能使用非远程图片)，然后准备上述的工作流，然后&lt;strong&gt;在 Github 账号设置 &lt;code&gt;Personal access tokens&lt;/code&gt; 中添加一个 token , 勾选 &lt;code&gt;repo&lt;/code&gt; 权限，复制到说说仓库 &lt;code&gt;secrets and variables - action&lt;/code&gt; 中，名称为 &lt;code&gt;PAT&lt;/code&gt;&lt;/strong&gt; 。&lt;/p&gt;
&lt;h2&gt;发布说说&lt;/h2&gt;
&lt;p&gt;这一步需要的是开启一个issue，然后在这个issue里面不断发布评论来当做&lt;strong&gt;动态&lt;/strong&gt;，然后就是把这个issue的链接如&lt;a href=&quot;https://github.com/h2dcc/moments/issues/1%E2%80%B8&quot;&gt;https://github.com/h2dcc/moments/issues/1&lt;/a&gt;，改为类似&lt;a href=&quot;https://api.github.com/repos/microsoft/vscode/issues/519/comments%E2%80%B8&quot;&gt;https://api.github.com/repos/microsoft/vscode/issues/519/comments&lt;/a&gt;，如果你要在前端展示，你需要一个密钥，要有&lt;code&gt;repo&lt;/code&gt;权限，你才能正常使用，否则会有较大的限制。关于这个，我觉得要在cloudflare里搞个worker然后再worker的环境变量里添加上面的密钥，大致worker代码如下：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// CF Worker 入口
export default {
  async fetch(req, env) {
    return await handle(req, env);
  }
};

async function handle(req, env) {
  const url = new URL(req.url);

  // 只代理 /api/comments
  if (url.pathname !== &amp;#39;/api/comments&amp;#39;) {
    return new Response(&amp;#39;Not Found&amp;#39;, { status: 404 });
  }

  const upstream = &amp;#39;https://api.github.com/repos/microsoft/vscode/issues/519/comments&amp;#39;;

  const res = await fetch(upstream, {
    headers: {
      &amp;#39;Authorization&amp;#39;: &amp;#39;token &amp;#39; + env.GH_TOKEN, // ✅ 正确读取环境变量
      &amp;#39;User-Agent&amp;#39;: &amp;#39;CF-Worker-Giscus-Proxy&amp;#39;
    }
  });

  const headers = new Headers(res.headers);
  headers.set(&amp;#39;Access-Control-Allow-Origin&amp;#39;, &amp;#39;*&amp;#39;);

  return new Response(res.body, {
    status: res.status,
    statusText: res.statusText,
    headers
  });
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后再搞个自定义域名，然后在后面加后缀&lt;code&gt;/api/comments&lt;/code&gt;，你就能比较不受限制的观看动态了，&lt;/p&gt;
&lt;h2&gt;前端&lt;/h2&gt;
&lt;p&gt;接下来就是我自己搞的一个html的简单&lt;a href=&quot;https://github.com/zsxjun/github-issues-moments&quot;&gt;前端&lt;/a&gt;，靠着AI完善了一下，可以参考参考: &lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang=&amp;quot;zh-CN&amp;quot;&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;link rel=&amp;quot;icon&amp;quot; type=&amp;quot;image/png&amp;quot;
    href=&amp;quot;https://img.314926.xyz/images/2025/09/20/zsx-avatar.webp &amp;quot; 
    sizes=&amp;quot;32x32&amp;quot;&amp;gt;
    &amp;lt;meta charset=&amp;quot;UTF-8&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;钟神秀的瞬间&amp;lt;/title&amp;gt;
    &amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width, initial-scale=1&amp;quot;&amp;gt;
    &amp;lt;style&amp;gt;
        :root {
            --bg: #f5f5f5;
            --fg: #333333;
            --card: #ffffff;
            --link: #576b95;
            --border: #e1e1e1;
            --avatar-border: #f0f0f0;
            --time-color: #888888;
            --like-color: #ff2442;
            --comment-bg: #f7f7f7;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            --active-page-bg: #576b95;
            --active-page-fg: #ffffff;
            --action-btn-color: #7d7d7d;
            --divider-color: #f0f0f0;
            --header-image-height: 180px;
            --content-max-width: 600px;
        }
        [data-theme=&amp;quot;dark&amp;quot;] {
            --bg: #1a1a1a;
            --fg: #e6e6e6;
            --card: #242424;
            --link: #7d9fd3;
            --border: #3a3a3a;
            --avatar-border: #3a3a3a;
            --time-color: #a0a0a0;
            --like-color: #ff5c7a;
            --comment-bg: #2d2d2d;
            --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
            --active-page-bg: #7d9fd3;
            --active-page-fg: #ffffff;
            --action-btn-color: #a0a0a0;
            --divider-color: #3a3a3a;
            --header-image-height: 200px;
        }
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif;
            background: var(--bg);
            color: var(--fg);
            line-height: 1.6;
            transition: background .3s, color .3s;
            padding-bottom: 40px;
        }
        a {
            color: var(--link);
            text-decoration: none;
        }
        a:hover {
            text-decoration: underline;
        }
        nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: var(--card);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow);
        }
        .nav-left {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 18px;
        }
        .icon {
            width: 24px;
            height: 24px;
            fill: currentColor;
        }
        #theme-toggle {
            cursor: pointer;
            background: transparent;
            border: 1px solid var(--border);
            color: var(--fg);
            padding: 6px 12px;
            border-radius: 16px;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .header-image {
            width: 100%;
            max-width: var(--content-max-width);
            height: var(--header-image-height);
            background: linear-gradient(135deg, #6e8efb, #a777e3);
            position: relative;
            overflow: hidden;
            margin: 0 auto 15px;
            border-radius: 12px;
            border: 1px solid var(--border);
        }
        .header-image::before {
            content: &amp;quot;&amp;quot;;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url(&amp;#39;https://img.314926.xyz/images/2025/09/22/20250922193025414.webp &amp;#39;) center/cover;
            opacity: 0.9;
        }
        .header-title {
            position: absolute;
            left: 20px;
            bottom: 20px;
            color: white;
            font-size: 24px;
            font-weight: bold;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
            z-index: 2;
        }
        .header-info {
            position: absolute;
            right: 20px;
            bottom: 20px;
            color: white;
            z-index: 2;
            cursor: pointer;
            font-size: 20px;
        }
        @media (max-width: 640px) {
            .header-image {
                border-radius: 0;
                margin-bottom: 10px;
            }
            :root {
                --header-image-height: 160px;
            }
            [data-theme=&amp;quot;dark&amp;quot;] {
                --header-image-height: 180px;
            }
        }
        .info-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }
        .info-content {
            background: var(--card);
            padding: 20px;
            border-radius: 12px;
            max-width: 80%;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            position: relative;
        }
        .close-modal {
            position: absolute;
            top: 10px;
            right: 15px;
            font-size: 24px;
            cursor: pointer;
        }
        main {
            max-width: var(--content-max-width);
            margin: 0 auto;
            padding: 0 10px;
            width: 100%;
        }
        .moment-article {
            background: var(--card);
            border-radius: 12px;
            padding: 0;
            margin-bottom: 15px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border);
            overflow: hidden;
        }
        .article-header {
            display: flex;
            align-items: center;
            padding: 12px 15px;
        }
        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 12px;
            border: 2px solid var(--avatar-border);
            object-fit: cover;
        }
        .user-info {
            flex: 1;
        }
        .user-name {
            font-weight: 500;
            font-size: 16px;
            margin-bottom: 2px;
        }
        .post-time {
            font-size: 12px;
            color: var(--time-color);
        }
        .moment-content {
            padding: 0 15px 15px 15px;
            margin-left: 52px;
            margin-top: -10px;
            font-size: 15px;
            line-height: 1.5;
        }
        .moment-content p {
            margin-bottom: 10px;
        }
        .moment-content pre {
            background: var(--bg);
            padding: 12px;
            border-radius: 6px;
            overflow: auto;
            font-size: 14px;
            margin: 10px 0;
        }
        .moment-content blockquote {
            border-left: 3px solid var(--border);
            padding-left: 12px;
            margin: 10px 0;
            color: var(--fg);
            opacity: .8;
            font-size: 14px;
            background: var(--comment-bg);
            border-radius: 0 6px 6px 0;
            padding: 8px 12px;
        }
        .moment-content code {
            background-color: var(--bg);
            padding: 2px 4px;
            border-radius: 3px;
            font-size: 14px;
        }
        .moment-content img {
            max-width: 100%;
            border-radius: 6px;
            margin: 8px 0;
        }
        .error, .no-content {
            text-align: center;
            margin-top: 40px;
            font-size: 16px;
            color: var(--time-color);
        }
        .pagination {
            display: flex;
            justify-content: center;
            margin: 20px 0;
            gap: 8px;
        }
        .page-btn {
            padding: 6px 12px;
            border: 1px solid var(--border);
            background: var(--card);
            color: var(--fg);
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }
        .page-btn:hover {
            background: var(--bg);
        }
        .page-btn.active {
            background: var(--active-page-bg);
            color: var(--active-page-fg);
            border-color: var(--active-page-bg);
        }
        .page-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .giscus-container {
            max-width: var(--content-max-width);
            margin: 30px auto 0 auto;
            padding: 0 10px;
        }
        .loading {
            display: flex;
            justify-content: center;
            padding: 20px;
        }
        .loading-spinner {
            width: 24px;
            height: 24px;
            border: 3px solid var(--border);
            border-top-color: var(--link);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        /* 右下角编辑按钮 */
        .edit-btn {
            position: fixed;
            right: 20px;
            bottom: 20px;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--card);
            color: var(--fg);
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            cursor: pointer;
            transition: all .3s;
            z-index: 999;
        }
        .edit-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(0,0,0,.15);
        }
        /* 手机端缩小一点 */
        @media (max-width: 640px) {
            .edit-btn {
                width: 44px;
                height: 44px;
                font-size: 18px;
                right: 16px;
                bottom: 16px;
            }
        }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;nav&amp;gt;
        &amp;lt;div class=&amp;quot;nav-left&amp;quot;&amp;gt;
            &amp;lt;svg class=&amp;quot;icon&amp;quot; viewBox=&amp;quot;0 0 16 16&amp;quot;&amp;gt;
                &amp;lt;path d=&amp;quot;M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38
                         0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01
                         1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95
                         0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0
                         1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0
                         3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z&amp;quot;/&amp;gt;
            &amp;lt;/svg&amp;gt;
            &amp;lt;span&amp;gt;钟神秀的瞬间&amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;button id=&amp;quot;theme-toggle&amp;quot; aria-label=&amp;quot;切换主题&amp;quot;&amp;gt;
            &amp;lt;span id=&amp;quot;theme-icon&amp;quot;&amp;gt;🌙&amp;lt;/span&amp;gt;
            &amp;lt;span&amp;gt;切换主题&amp;lt;/span&amp;gt;
        &amp;lt;/button&amp;gt;
    &amp;lt;/nav&amp;gt;

    &amp;lt;div class=&amp;quot;header-image&amp;quot;&amp;gt;
        &amp;lt;div class=&amp;quot;header-title&amp;quot;&amp;gt;即刻短文&amp;lt;/div&amp;gt;
        &amp;lt;div class=&amp;quot;header-info&amp;quot; id=&amp;quot;info-button&amp;quot;&amp;gt;❗&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;div class=&amp;quot;info-modal&amp;quot; id=&amp;quot;info-modal&amp;quot;&amp;gt;
        &amp;lt;div class=&amp;quot;info-content&amp;quot;&amp;gt;
            &amp;lt;div class=&amp;quot;close-modal&amp;quot; id=&amp;quot;close-modal&amp;quot;&amp;gt;×&amp;lt;/div&amp;gt;
            &amp;lt;h3&amp;gt;钟神秀的瞬间记录&amp;lt;/h3&amp;gt;
            &amp;lt;p&amp;gt;这里收录了我的生活随笔、技术思考和灵感闪现。每一段文字都是时光的切片，记录当下的真实感受。&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

    &amp;lt;main id=&amp;quot;main-container&amp;quot;&amp;gt;
        &amp;lt;div class=&amp;quot;loading&amp;quot;&amp;gt;
            &amp;lt;div class=&amp;quot;loading-spinner&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/main&amp;gt;

    &amp;lt;div id=&amp;quot;pagination-container&amp;quot; style=&amp;quot;display: none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;

    &amp;lt;div class=&amp;quot;giscus-container&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;

    &amp;lt;a href=&amp;quot;https://github.com/zsxjun/github-issues-moments/issues/1&amp;quot; target=&amp;quot;_blank&amp;quot; class=&amp;quot;edit-btn&amp;quot; title=&amp;quot;添加/编辑说说&amp;quot;&amp;gt;✏️&amp;lt;/a&amp;gt;

    &amp;lt;script src=&amp;quot;https://cdn.jsdelivr.net/npm/marked/marked.min.js &amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script&amp;gt;
        /* ---------- 主题切换 + Giscus 重载 ---------- */
        const toggle = document.getElementById(&amp;#39;theme-toggle&amp;#39;);
        const themeIcon = document.getElementById(&amp;#39;theme-icon&amp;#39;);
        const html = document.documentElement;

        function loadGiscus(theme) {
            const container = document.querySelector(&amp;#39;.giscus-container&amp;#39;);
            container.innerHTML = &amp;#39;&amp;#39;;
            const script = document.createElement(&amp;#39;script&amp;#39;);
            script.src = &amp;#39;https://giscus.app/client.js &amp;#39;;
            script.async = true;
            script.setAttribute(&amp;#39;crossorigin&amp;#39;, &amp;#39;anonymous&amp;#39;);
            script.setAttribute(&amp;#39;data-repo&amp;#39;, &amp;#39;zsxjun/github-issues-moments&amp;#39;);
            script.setAttribute(&amp;#39;data-repo-id&amp;#39;, &amp;#39;R_kgDOP0jWOA&amp;#39;);
            script.setAttribute(&amp;#39;data-category&amp;#39;, &amp;#39;Announcements&amp;#39;);
            script.setAttribute(&amp;#39;data-category-id&amp;#39;, &amp;#39;DIC_kwDOP0jWOM4Cvv6S&amp;#39;);
            script.setAttribute(&amp;#39;data-mapping&amp;#39;, &amp;#39;pathname&amp;#39;);
            script.setAttribute(&amp;#39;data-strict&amp;#39;, &amp;#39;0&amp;#39;);
            script.setAttribute(&amp;#39;data-reactions-enabled&amp;#39;, &amp;#39;1&amp;#39;);
            script.setAttribute(&amp;#39;data-emit-metadata&amp;#39;, &amp;#39;0&amp;#39;);
            script.setAttribute(&amp;#39;data-input-position&amp;#39;, &amp;#39;top&amp;#39;);
            script.setAttribute(&amp;#39;data-lang&amp;#39;, &amp;#39;zh-CN&amp;#39;);
            script.setAttribute(&amp;#39;data-theme&amp;#39;, theme);
            container.appendChild(script);
        }

        (function initTheme() {
            const saved = localStorage.getItem(&amp;#39;theme&amp;#39;);
            const preferDark = window.matchMedia(&amp;#39;(prefers-color-scheme: dark)&amp;#39;).matches;
            const initialTheme = (saved === &amp;#39;dark&amp;#39; || (!saved &amp;amp;&amp;amp; preferDark)) ? &amp;#39;dark&amp;#39; : &amp;#39;light&amp;#39;;
            html.setAttribute(&amp;#39;data-theme&amp;#39;, initialTheme);
            themeIcon.textContent = initialTheme === &amp;#39;dark&amp;#39; ? &amp;#39;☀️&amp;#39; : &amp;#39;🌙&amp;#39;;
            loadGiscus(initialTheme);
        })();

        toggle.addEventListener(&amp;#39;click&amp;#39;, () =&amp;gt; {
            const current = html.getAttribute(&amp;#39;data-theme&amp;#39;);
            const next = current === &amp;#39;dark&amp;#39; ? &amp;#39;light&amp;#39; : &amp;#39;dark&amp;#39;;
            html.setAttribute(&amp;#39;data-theme&amp;#39;, next);
            localStorage.setItem(&amp;#39;theme&amp;#39;, next);
            themeIcon.textContent = next === &amp;#39;dark&amp;#39; ? &amp;#39;☀️&amp;#39; : &amp;#39;🌙&amp;#39;;
            loadGiscus(next);
        });

        /* ---------- 信息模态框 ---------- */
        const infoButton = document.getElementById(&amp;#39;info-button&amp;#39;);
        const infoModal = document.getElementById(&amp;#39;info-modal&amp;#39;);
        const closeModal = document.getElementById(&amp;#39;close-modal&amp;#39;);
        infoButton.addEventListener(&amp;#39;click&amp;#39;, () =&amp;gt; infoModal.style.display = &amp;#39;flex&amp;#39;);
        closeModal.addEventListener(&amp;#39;click&amp;#39;, () =&amp;gt; infoModal.style.display = &amp;#39;none&amp;#39;);
        infoModal.addEventListener(&amp;#39;click&amp;#39;, e =&amp;gt; {
            if (e.target === infoModal) infoModal.style.display = &amp;#39;none&amp;#39;;
        });

        /* ---------- 数据加载 &amp;amp; 分页 ---------- */
        const container = document.getElementById(&amp;#39;main-container&amp;#39;);
        const paginationContainer = document.getElementById(&amp;#39;pagination-container&amp;#39;);
        const url = &amp;#39;https://example.com/api/comments &amp;#39;; /* 替换为你的 API URL */
        let allComments = [];
        let currentPage = 1;
        const itemsPerPage = 10;

        const headers = new Headers();
        headers.append(&amp;#39;Accept&amp;#39;, &amp;#39;application/vnd.github.v3+json&amp;#39;);
        headers.append(&amp;#39;User-Agent&amp;#39;, &amp;#39;Hugo Static Site Generator&amp;#39;);

        fetch(url, { headers })
            .then(r =&amp;gt; {
                if (!r.ok) throw new Error(&amp;#39;网络错误 &amp;#39; + r.status);
                return r.json();
            })
            .then(list =&amp;gt; {
                if (!Array.isArray(list) || list.length === 0) {
                    container.innerHTML = &amp;#39;&amp;lt;p class=&amp;quot;no-content&amp;quot;&amp;gt;暂无动态&amp;lt;/p&amp;gt;&amp;#39;;
                    return;
                }
                allComments = list.reverse();
                initPagination(allComments.length);
                displayPage(1);
            })
            .catch(err =&amp;gt; {
                container.innerHTML = `&amp;lt;p class=&amp;quot;error&amp;quot;&amp;gt;⚠️ 无法获取动态：${err.message}&amp;lt;/p&amp;gt;`;
            });

        function initPagination(totalItems) {
            const totalPages = Math.ceil(totalItems / itemsPerPage);
            if (totalPages &amp;lt;= 1) {
                paginationContainer.style.display = &amp;#39;none&amp;#39;;
                return;
            }
            let html = `
                &amp;lt;div class=&amp;quot;pagination&amp;quot;&amp;gt;
                    &amp;lt;button class=&amp;quot;page-btn prev-btn&amp;quot; onclick=&amp;quot;changePage(${currentPage - 1})&amp;quot; ${currentPage === 1 ? &amp;#39;disabled&amp;#39; : &amp;#39;&amp;#39;}&amp;gt;上一页&amp;lt;/button&amp;gt;
            `;
            const max = 5, half = Math.floor(max / 2);
            let start, end;
            if (totalPages &amp;lt;= max) { start = 1; end = totalPages; }
            else if (currentPage &amp;lt;= half + 1) { start = 1; end = max; }
            else if (currentPage &amp;gt;= totalPages - half) { start = totalPages - max + 1; end = totalPages; }
            else { start = currentPage - half; end = currentPage + half; }
            for (let i = start; i &amp;lt;= end; i++) {
                html += `&amp;lt;button class=&amp;quot;page-btn ${i === currentPage ? &amp;#39;active&amp;#39; : &amp;#39;&amp;#39;}&amp;quot; onclick=&amp;quot;changePage(${i})&amp;quot;&amp;gt;${i}&amp;lt;/button&amp;gt;`;
            }
            html += `&amp;lt;button class=&amp;quot;page-btn next-btn&amp;quot; onclick=&amp;quot;changePage(${currentPage + 1})&amp;quot; ${currentPage === totalPages ? &amp;#39;disabled&amp;#39; : &amp;#39;&amp;#39;}&amp;gt;下一页&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;`;
            paginationContainer.innerHTML = html;
            paginationContainer.style.display = &amp;#39;block&amp;#39;;
        }

        function displayPage(page) {
            const start = (page - 1) * itemsPerPage, end = Math.min(start + itemsPerPage, allComments.length);
            const html = allComments.slice(start, end).map(c =&amp;gt; `
                &amp;lt;article class=&amp;quot;moment-article&amp;quot;&amp;gt;
                    &amp;lt;header class=&amp;quot;article-header&amp;quot;&amp;gt;
                        &amp;lt;img class=&amp;quot;avatar&amp;quot; src=&amp;quot;${c.user.avatar_url}&amp;quot; alt=&amp;quot;${c.user.login}&amp;quot; onerror=&amp;quot;this.src=&amp;#39;https://avatars.githubusercontent.com/u/0?s=80&amp;amp;v=4 &amp;#39;&amp;quot;&amp;gt;
                        &amp;lt;div class=&amp;quot;user-info&amp;quot;&amp;gt;
                            &amp;lt;div class=&amp;quot;user-name&amp;quot;&amp;gt;钟神秀@zsxjun&amp;lt;/div&amp;gt;
                            &amp;lt;div class=&amp;quot;post-time&amp;quot;&amp;gt;${formatTime(c.created_at)}&amp;lt;/div&amp;gt;
                        &amp;lt;/div&amp;gt;
                    &amp;lt;/header&amp;gt;
                    &amp;lt;section class=&amp;quot;moment-content&amp;quot;&amp;gt;${marked.parse(c.body)}&amp;lt;/section&amp;gt;
                &amp;lt;/article&amp;gt;
            `).join(&amp;#39;&amp;#39;);
            container.innerHTML = `&amp;lt;div class=&amp;quot;moments-feed&amp;quot;&amp;gt;${html}&amp;lt;/div&amp;gt;`;
            window.scrollTo({ top: 0, behavior: &amp;#39;smooth&amp;#39; });
        }

        window.changePage = function (page) {
            const total = Math.ceil(allComments.length / itemsPerPage);
            if (page &amp;lt; 1 || page &amp;gt; total || page === currentPage) return;
            currentPage = page;
            displayPage(page);
            initPagination(allComments.length);
        };

        function formatTime(dateStr) {
            const date = new Date(dateStr), now = new Date(), diff = (now - date) / 1000;
            if (diff &amp;lt; 60) return &amp;#39;刚刚&amp;#39;;
            if (diff &amp;lt; 3600) return `${Math.floor(diff / 60)}分钟前`;
            if (diff &amp;lt; 86400) return `${Math.floor(diff / 3600)}小时前`;
            if (diff &amp;lt; 2592000) return `${Math.floor(diff / 86400)}天前`;
            return date.toLocaleString(&amp;#39;zh-CN&amp;#39;, { year: &amp;#39;numeric&amp;#39;, month: &amp;#39;2-digit&amp;#39;, day: &amp;#39;2-digit&amp;#39;, hour: &amp;#39;2-digit&amp;#39;, minute: &amp;#39;2-digit&amp;#39;, hour12: false });
        }
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;大致就是这样了，以上就是我肤浅的理解，希望能帮到你~&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Wed, 24 Sep 2025 00:00:00 GMT</pubDate></item><item><title>Hexo备忘</title><link>https://boke.zsx815.top/post/hexo-beiwang/</link><guid isPermaLink="true">https://boke.zsx815.top/post/hexo-beiwang/</guid><description>Hexo 使用过程中的一些备忘事项和技巧</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/hexo-beiwang/&quot;&gt;https://boke.zsx815.top/post/hexo-beiwang/&lt;/a&gt;&lt;/blockquote&gt; &lt;h1&gt;Hexo 备忘&lt;/h1&gt;
&lt;h2&gt;我的配置&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Hexo 版本&lt;/strong&gt;: hexo-cli: 4.3.2, hexo: 7.3.0(当前最新)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Node.js 版本&lt;/strong&gt;: 22.16.0&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Git 版本&lt;/strong&gt;: 2.47.0.sindows.2&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PNPM 版本&lt;/strong&gt;: 10.12.4&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Windows 版本&lt;/strong&gt;: 11&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;安装 Node.js&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;在 &lt;a href=&quot;https://nodejs.org/en/download/&quot;&gt;官网&lt;/a&gt; 安装 LTS 版本，电脑一般来说内存足够直接在 C 盘即可，当然，换路径也可以，我反正正常下载换路径，没什么问题。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;安装完成后，检查是否安装成功。在键盘按下 &lt;kbd&gt; win &lt;/kbd&gt; + &lt;kbd&gt; R &lt;/kbd&gt; 键，输入 &lt;code&gt;CMD&lt;/code&gt;，然后回车，打开 CMD 窗口，执行 &lt;code&gt;node -v&lt;/code&gt; 命令，看到版本信息，则说明安装成功。&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;安装 Git&lt;/h2&gt;
&lt;p&gt;在 &lt;a href=&quot;https://git-scm.com/download/win&quot;&gt;官网&lt;/a&gt; 安装最新版本的 &lt;code&gt;64-bit Git for Windows Setup&lt;/code&gt; 安装包。  &lt;/p&gt;
&lt;p&gt;安装完成后，在命令行输入 &lt;code&gt;git --version&lt;/code&gt;，如果显示版本号，则说明安装成功。&lt;/p&gt;
&lt;h3&gt;常用命令&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git config -l  //查看所有配置
git config --system --list //查看系统配置
git config --global --list //查看用户（全局）配置
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;配置 Git 用户名和邮箱&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git config --global user.name &amp;quot;你的用户名&amp;quot;
git config --global user.email &amp;quot;你的邮箱&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;安装 包管理器&lt;/h2&gt;
&lt;p&gt;安装 npm 为一切的基石，一般来说，你安装了 node，也相当于你安装了 npm，通过一下命令来验证：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm -v
node -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;修改 npm 源&lt;/strong&gt;。npm 下载各种模块，默认是从国外服务器下载，速度较慢，建议配置成淘宝镜像。打开 CMD 窗口，运行如下命令:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm config set registry https://registry.npm.taobao.org
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;安装 pnpm&lt;/h3&gt;
&lt;p&gt;pnpm 是一个快速、节省磁盘空间的包管理器，类似于 npm 和 yarn。安装 pnpm 可以通过以下命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -g pnpm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;为什么选择 pnpm？因为它的安装速度快，依赖管理更高效，且相对于 npm，我使用 npm 容易失败且慢，pnpm 给我的体验更好。&lt;/p&gt;
&lt;h2&gt;安装 Hexo&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;在 Git BASH 输入如下命令安装 Hexo：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm install -g hexo-cli
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;安装完后输入 &lt;code&gt;hexo -v&lt;/code&gt; 验证是否安装成功。&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;a id=&quot;github-config&quot;&gt;&lt;/a&gt;Github配置&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;上述操作是前提，接下来是配置 Github。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;注册 github 就不说了，很基础的东西，连我个代码小白都懂就不多说了。&lt;/p&gt;
&lt;h3&gt;创建仓库&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;登录 GitHub，点击右上角的 &lt;code&gt;+&lt;/code&gt; 号，选择 &lt;code&gt;New repository&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;填写仓库名称，建议使用 &lt;code&gt;&amp;lt;username&amp;gt;.github.io&lt;/code&gt; 格式（例如：&lt;code&gt;yourusername.github.io&lt;/code&gt;），这样可以直接作为个人主页。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;这里我不准备直接使用常规的 &lt;code&gt;hexo deploy&lt;/code&gt; 命令来部署到 GitHub Pages，因为当你的文章一多，生成时间就会繁琐，这里的建议是使用 &lt;code&gt;Github Actions&lt;/code&gt; 来自动部署。&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;这一部分的教程是源于 &lt;a href=&quot;https://akilar.top/posts/f752c86d/&quot;&gt;店长的文章&lt;/a&gt;，但是有点老旧了，于是我做了点更改（这里的图片来源于 &lt;a href=&quot;https://blog.anheyu.com/posts/asdx.html&quot;&gt;安知鱼&lt;/a&gt;）：&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol&gt;
&lt;li&gt;首先要创建一个放置源码的私有仓库，以下称之为 &lt;code&gt;hexo-source&lt;/code&gt;，&lt;/li&gt;
&lt;li&gt;然后要生成一个 Github 密钥：&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;访问 Github-&amp;gt; 头像（右上角）-&amp;gt; Settings-&amp;gt; Developer Settings-&amp;gt; Personal access tokens-&amp;gt; generate new token, 创建的 Token 名称随意，但必须勾选 repo 项 和 workflows 项。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;点击 &lt;a href=&quot;https://github.com/settings/tokens&quot;&gt;链接&lt;/a&gt; 前往生成&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.314926.xyz/images/2025/08/17/jiaoxue1.webp&quot; alt=&quot;&quot;&gt;
&lt;img src=&quot;https://img.314926.xyz/images/2025/08/17/jiaoxue2.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]&lt;/p&gt;
&lt;p&gt;!!! token 只会显示这一次，之后将无法查看，所以务必保证你已经记录下了 Token。之后如果忘记了就只能重新生成重新配置了。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;在 &lt;code&gt;hexo-source&lt;/code&gt; 仓库中的设置里点击设置 -&amp;gt; action -&amp;gt; General -&amp;gt; 工作流程权限&lt;ul&gt;
&lt;li&gt;勾选 &lt;code&gt;Read and write permissions&lt;/code&gt;，并且勾选 &lt;code&gt;Allow &amp;lt;span style=&amp;quot;background:#FF0000;&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;all actions and reusable workflows&lt;/code&gt;。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;在设置里 -&amp;gt; Secrets and variables -&amp;gt; Actions -&amp;gt; New repository secret 添加&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GITHUBTOKEN&lt;/code&gt;：放置你刚才生成的 Token。&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;上述是前置条件，接下来要先部署 hexo，你才好继续下一步。&lt;/h2&gt;
&lt;h2&gt;初始化 Hexo&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;在本地新建一个文件夹，例如 &lt;code&gt;hexo-solitude&lt;/code&gt;。&lt;/li&gt;
&lt;li&gt;这里我是用的是 vscode 打开该文件夹，然后在终端输入以下命令来初始化 Hexo：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;hexo init (项目名称)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我一般都不填，直接在文件下下就可以开始，如果你添加了项目名称，那么下一步就是：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cd (项目名称)
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;安装依赖包：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后就是选择你想要的主题，这里我使用的是&lt;a href=&quot;https://solitude.js.org/cn/getting-started/installation&quot;&gt;Solitude&lt;/a&gt;，具体的配置不细讲，我只讲一部分：&lt;/p&gt;
&lt;p&gt;首先就是基本的安装，这里还是选择&lt;code&gt;git clone&lt;/code&gt;没有别的原因，主要还是会改点源码，不想改的直接pnpm下载即可：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// git安装
git clone -b dev https://github.com/everfu/hexo-theme-solitude.git themes/solitude

// pnpm 安装
pnpm i hexo-theme-solitude
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后在&lt;code&gt;_config.yml&lt;/code&gt;里修改成：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;theme: solitude
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;配置&lt;/h2&gt;
&lt;p&gt;下列代码是我的备忘：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 喵落阁
subtitle: &amp;#39;克喵的博客&amp;#39;
description: &amp;#39;愿你看清一切真相后，依旧热爱你的家人和朋友。&amp;#39;
keywords: 克喵,kemiao,博客
author: 克喵爱吃卤面
language: zh-CN
timezone: &amp;#39;Asia/Shanghai&amp;#39;

# URL
## Set your site url here. For example, if you use GitHub Page, set url as &amp;#39;https://username.github.io/project&amp;#39;
url: # 填网站地址
permalink: posts/:abbrlink.html
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing &amp;#39;index.html&amp;#39; from permalinks
  trailing_html: true # Set to false to remove trailing &amp;#39;.html&amp;#39; from permalinks

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: &amp;#39;&amp;#39;
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
syntax_highlighter: highlight.js
highlight:
  line_number: false
  auto_detect: false
  tab_replace: &amp;#39;&amp;#39;
  wrap: true
  hljs: false
prismjs:
  preprocess: true
  line_number: true
  tab_replace: &amp;#39;&amp;#39;

# Home page setting
# path: Root path for your blogs index page. (default = &amp;#39;&amp;#39;)
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: &amp;#39;&amp;#39;
  per_page: 10
  order_by: -date

# Category &amp;amp; Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports &amp;#39;mtime&amp;#39;, &amp;#39;date&amp;#39;, &amp;#39;empty&amp;#39;
updated_option: &amp;#39;mtime&amp;#39;

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the &amp;#39;source/&amp;#39; folder
include: []
exclude: []
ignore: []

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: solitude

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: git@github.com-xx:kemiaofxjun/kemiaofxjun.github.io.git
  branch: main

# RSS Feed 配置
feed:
  type: atom          # 生成 atom.xml
  path: atom.xml      # 输出文件名
  limit: 20           # 最多显示文章数 (0=全部)
  hub:                # PubSubHubbub 中心 (可选)
  content: true       # 是否包含全文内容 (true=是, false=仅摘要)
  content_limit: 140  # 摘要长度（当 content=false 时生效）
  content_limit_delim: &amp;#39; &amp;#39;  # 截断分隔符
  order_by: -date     # 按日期倒序排列
  autodiscovery: true # 在 HTML 头部添加自动发现标签

# 数学公式渲染配置
markdown:
  preset: &amp;#39;default&amp;#39; # 使用的 MD 语法，默认使用的 GFM
  render:
    html: true # 渲染 html
    xhtmlOut: false
    langPrefix: &amp;#39;language-&amp;#39; # 在代码块的类名中添加前缀（指定语言时）。
    breaks: true
    linkify: true # 如果你写了一个链接而不是 [name](link) 方式，会自动识别为链接并渲染。
    typographer: true # 将替换常见的印刷元素。
    quotes: &amp;#39;“”‘’&amp;#39; # 替换文章张的 &amp;quot;&amp;quot; &amp;#39;&amp;#39; 号
  enable_rules:
  disable_rules:
  plugins: # 使用插件
  anchors:
    level: 2 # 渲染标题的级别（h1,h2,h3）
    collisionSuffix: &amp;#39;&amp;#39;
    permalink: true
    permalinkClass: &amp;#39;headerlink&amp;#39;
    permalinkSide: &amp;#39;left&amp;#39;
    permalinkSymbol: &amp;#39;&amp;#39;
    case: 0
    separator: &amp;#39;-&amp;#39;
  images: # 图片的一些编译
    lazyload: true # 是否需要渲染 lazyload
    prepend_root: false
    post_asset: false
  inline: false

swpp:
  # 是否启用插件
  enable: true
  # 是否在发布前自动执行脚本
  auto_exec: true
  gen_dom: true

# 文章链接转数字或字母：https://github.com/rozbo/hexo-abbrlink
abbrlink:
    alg: crc16   #算法： crc16(default) and crc32
    rep: hex     #进制： dec(default) and hex: dec #输出进制：十进制和十六进制，默认为10进制。丨dec为十进制，hex

# https://github.com/hexojs/hexo-generator-sitemap
sitemap:
  path: sitemap.xml
  rel: false
  tags: true
  categories: true

algolia:
  appId: &amp;quot;&amp;quot;
  apiKey: &amp;quot;&amp;quot;
  adminApiKey: &amp;quot;&amp;quot;
  chunkSize: 5000
  indexName: &amp;quot;index-name&amp;quot;
  fields:
    - content:strip:truncate,0,500
    - excerpt:strip
    - gallery
    - permalink
    - photos
    - slug
    - tags
    - title

# hexo-safego安全跳转插件
# see https://blog.liushen.fun/posts/1dfd1f41/
hexo_safego:
  # 基本功能设置
  general:
    enable: true                # 启用插件
    enable_base64_encode: true  # 使用 Base64 编码
    enable_target_blank: true   # 从新窗口打开跳转页面

  # 安全设置
  security:
    url_param_name: &amp;#39;u&amp;#39;         # URL 参数名
    html_file_name: &amp;#39;go.html&amp;#39;   # 重定向页面的文件名
    ignore_attrs:               # 忽略处理的 HTML 结构
      - &amp;#39;data-fancybox&amp;#39;

  # 容器与页面设置
  scope:
    apply_containers:           # 应用的容器选择器
      - &amp;#39;#article-container&amp;#39;
    apply_pages:                # 应用的页面路径
      - &amp;quot;/posts/&amp;quot;
      - &amp;quot;/devices/&amp;quot;
    exclude_pages:              # 排除的页面路径

  # 域名白名单
  whitelist:
    domain_whitelist:           # 允许的白名单域名，通过字符串匹配实现
      - &amp;quot;kemeow.top&amp;quot;
      - &amp;quot;kemiaosw.top&amp;quot;
      - &amp;quot;050815.xyz&amp;quot;
      - &amp;quot;314926.xyz&amp;quot;
      - &amp;quot;051531.xyz&amp;quot;

  # 页面外观设置
  appearance:
    avatar: https://img.314926.xyz/images/2025/08/13/no-background-kemiaofxjun.webp   # 跳转页面头像路径
    title: &amp;quot;喵洛阁&amp;quot;            # 跳转页面标题
    subtitle: &amp;quot;安全中心&amp;quot;         # 跳转页面副标题
    darkmode: auto              # 是否启用深色模式
    countdowntime: 4            # 跳转页面倒计时秒数，如果设置为负数则为不自动跳转

  # 调试设置
  debug:
    enable: false               # 启用调试模式

# 追番插件
# https://github.com/HCLonely/hexo-bilibili-bangumi
bangumi: # 追番设置
  enable: true
  source: bili
  path: 
  vmid: 3546643173477234
  title: &amp;quot;追番列表&amp;quot;
  quote: &amp;quot;生命不息，追番不止！&amp;quot;
  show: 1
  lazyload: false
  loading:
  showMyComment: true
  pagination: false
  extra_options:
    top_img: false
    lazyload:
      enable: false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;博客的其他修改基本就是来自教程和一些博主的网站。&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;插件&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;基础依赖&lt;/strong&gt; &lt;code&gt;hexo-renderer-pug&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-renderer-pug
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;&lt;strong&gt;字数统计&lt;/strong&gt; &lt;code&gt;hexo-wordcount&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-wordcount
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;配置里修改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# --------------------------- start ---------------------------
# Word count
# 字数统计
# warning: Please install the hexo-wordcount plugin first.
# 警告: 请先安装 hexo-wordcount 插件。
wordcount: false
# --------------------------- end ---------------------------
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;&lt;strong&gt;数学公式&lt;/strong&gt; 卸载 &lt;code&gt;hexo-render-marked&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm un hexo-renderer-marked
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;安装 &lt;code&gt;hexo-renderer-markdown-it&lt;/code&gt; &lt;code&gt;katex&lt;/code&gt; &lt;code&gt;@renbaoshuo/markdown-it-katex&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-renderer-markdown-it katex @renbaoshuo/markdown-it-katex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;配置里修改&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# --------------------------- start ---------------------------
# Katex
# Latex formula support
# Latex 公式支持
katex:
  enable: false
  # Whether to load on each page
  # 是否在每个页面加载
  per_page: false
  # Whether to enable copy formula
  # 是否启用复制公式
  copytex: false
# --------------------------- end ---------------------------
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加以下内容到 &lt;code&gt;_config.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;markdown:
  preset: &amp;#39;default&amp;#39;
  render:
    html: true
    xhtmlOut: false
    langPrefix: &amp;#39;language-&amp;#39;
    breaks: true
    linkify: true
    typographer: true
    quotes: &amp;#39;“”‘’&amp;#39;
  enable_rules:
  disable_rules:
  plugins:
    - &amp;#39;@renbaoshuo/markdown-it-katex&amp;#39;
  anchors:
    level: 2
    collisionSuffix: &amp;#39;&amp;#39;
    permalink: false
    permalinkClass: &amp;#39;header-anchor&amp;#39;
    permalinkSide: &amp;#39;left&amp;#39;
    permalinkSymbol: &amp;#39;¶&amp;#39;
    case: 0
    separator: &amp;#39;-&amp;#39;
  images:
    lazyload: false
    prepend_root: false
    post_asset: false
  inline: false  # https://markdown-it.github.io/markdown-it/#MarkdownIt.renderInline
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;开启配置项&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# --------------------------- start ---------------------------
# Katex
# Latex formula support
# Latex 公式支持
katex:
  enable: true
  # Whether to load on each page
  # 是否在每个页面加载
  per_page: true
  # Whether to enable copy formula
  # 是否启用复制公式
  copytex: false
# --------------------------- end ---------------------------
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;4&quot;&gt;
&lt;li&gt;&lt;strong&gt;PWA&lt;/strong&gt; 安装 hexo-swpp 和 swpp-backends 插件&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;在博客根目录执行&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-swpp 

pnpm i swpp-backends
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;开启配置&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# 大约在773行
# --------------------------- start ---------------------------
# PWA
# Progressive Web App
pwa:
  enable: true
  manifest: /manifest.json # manifest.json
  theme_color: &amp;quot;#006a73&amp;quot; # Theme color
  mask_icon: /img/pwa/favicon.png # Mask icon
  apple_touch_icon: /img/pwa/favicon.png # Apple touch icon
  bookmark_icon: /img/pwa/favicon.png # Bookmark icon
  favicon_32_32: /img/pwa/favicon_32.png # 32x32 icon
  favicon_16_16: /img/pwa/favicon_16.png # 16x16 icon
# --------------------------- end ---------------------------
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在&lt;code&gt;_config.yml&lt;/code&gt;里添加swpp配置&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;swpp:
  # 是否启用插件
  enable: true
  # 是否在发布前自动执行脚本
  auto_exec: true
  gen_dom: true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在 &lt;code&gt;source&lt;/code&gt; 目录中创建 &lt;code&gt;manifest.json&lt;/code&gt; 文件&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
    &amp;quot;name&amp;quot;: &amp;quot;网站名称&amp;quot;,
    &amp;quot;short_name&amp;quot;: &amp;quot;网站名称缩写&amp;quot;,
    &amp;quot;theme_color&amp;quot;: &amp;quot;#006a73&amp;quot;,
    &amp;quot;background_color&amp;quot;: &amp;quot;#006a73&amp;quot;,
    &amp;quot;display&amp;quot;: &amp;quot;fullscreen&amp;quot;,
    &amp;quot;scope&amp;quot;: &amp;quot;/&amp;quot;,
    &amp;quot;start_url&amp;quot;: &amp;quot;/&amp;quot;,
    &amp;quot;id&amp;quot;: &amp;quot;/&amp;quot;,
    &amp;quot;icons&amp;quot;: [
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon_16.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;16x16&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;any&amp;quot;
      },
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon_16.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;16x16&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;maskable&amp;quot;
      },
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon_32.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;32x32&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;any&amp;quot;
      },
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon_32.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;32x32&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;maskable&amp;quot;
      },
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;180x180&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;any&amp;quot;
      },
      {
        &amp;quot;src&amp;quot;: &amp;quot;/img/pwa/favicon.png&amp;quot;,
        &amp;quot;sizes&amp;quot;: &amp;quot;180x180&amp;quot;,
        &amp;quot;type&amp;quot;: &amp;quot;image/png&amp;quot;,
        &amp;quot;purpose&amp;quot;: &amp;quot;maskable&amp;quot;
      }
    ],
    &amp;quot;splash_pages&amp;quot;: null
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在博客根目录创建一个 &lt;code&gt;sw-rules.js&lt;/code&gt; 文件&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;module.exports.config = {
  /** @type {?ServiceWorkerConfig|boolean} */
  serviceWorker: {
    escape: 1,
    cacheName: &amp;#39;SolitudeCache&amp;#39;,
    debug: false,
  },
  register: {
    onsuccess: undefined,
    onerror: () =&amp;gt;
      console.error(
        &amp;#39;Service Worker 注册失败！可能是由于您的浏览器不支持该功能！&amp;#39;
      ),
    builder: (root, framework, pluginConfig) =&amp;gt; {
      const { onerror, onsuccess } = pluginConfig.register;
      return `
            &amp;lt;script&amp;gt;
                (() =&amp;gt; {
                    const sw = navigator.serviceWorker;
                    const error = ${onerror &amp;amp;&amp;amp; onerror.toString()};
                    if (!sw?.register(&amp;#39;${new URL(root).pathname}sw.js&amp;#39;)
                        ${onsuccess ? `?.then(${onsuccess.toString()})` : &amp;quot;&amp;quot;}
                        ?.catch(error)
                    ) error()
                })()
            &amp;lt;/script&amp;gt;`;
    },
  },
  /** @type {?DomConfig|boolean} */
  dom: {
    /** @type {?VoidFunction} */
    onsuccess: () =&amp;gt; {
      caches
        .match(&amp;#39;https://id.v3/&amp;#39;)
        .then((res) =&amp;gt; {
          if (res)
            res.json().then((json) =&amp;gt; {
              utils &amp;amp;&amp;amp;
                utils.snackbarShow(
                  `已刷新缓存，更新为${json.escape + &amp;#39;.&amp;#39; + json.global + &amp;#39;.&amp;#39; + json.local
                  }版本最新内容`,
                  false,
                  2500
                );
            });
          else console.info(&amp;#39;未找到缓存&amp;#39;);
        })
        .catch((error) =&amp;gt; console.error(&amp;#39;缓存匹配出错&amp;#39;, error));
    },
  },
  /** @type {?VersionJsonConfig|boolean} */
  json: {
    /** @type {number} */
    maxHtml: 15,
    /** @type {number} */
    charLimit: 1024,
    /** @type {string[]} */
    merge: [],
    exclude: {
      /** @type {RegExp[]} */
      localhost: [],
      /** @type {RegExp[]} */
      other: [],
    },
  },
  /** @type {?ExternalMonitorConfig|boolean} */
  external: {
    /** @type {number} */
    timeout: 5000,
    /** 拉取文件时地并发限制 */
    concurrencyLimit: 100,
    /** @type {({head: string, tail: string}|function(string):string[])[]} */
    js: [],
    /** @type {RegExp[]} */
    stable: [
      /^https:\/\/npm\.elemecdn\.com\/[^/@]+\@[^/@]+\/[^/]+\/[^/]+$/,
      /^https:\/\/cdn\.cbd\.int\/[^/@]+\@[^/@]+\/[^/]+\/[^/]+$/,
      /^https:\/\/cdn\.jsdelivr\.net\/npm\/[^/@]+\@[^/@]+\/[^/]+\/[^/]+$/,
    ],
    replacer: (srcUrl) =&amp;gt; {
      if (srcUrl.startsWith(&amp;#39;https://cdn.jsdelivr.net/npm/&amp;#39;)) {
        const pathname = new URL(srcUrl).pathname;
        return [
          srcUrl,
          `https://cdn.cbd.int/${pathname}`,
          `https://npm.elemecdn.com/${pathname}`,
          `https://fastly.jsdelivr.net/npm/${pathname}`,
        ];
      } else {
        return srcUrl;
      }
    },
  },
};

module.exports.cacheRules = {
  simple: {
    clean: true,
    search: false,
    match: (url, $eject) =&amp;gt;
      url.host === $eject.domain &amp;amp;&amp;amp; [&amp;#39;/404.html&amp;#39;].includes(url.pathname),
  },
  cdn: {
    clean: true,
    match: (url) =&amp;gt;
      [
        &amp;#39;cdn.cbd.int&amp;#39;,
        &amp;#39;lf26-cdn-tos.bytecdntp.com&amp;#39;,
        &amp;#39;lf6-cdn-tos.bytecdntp.com&amp;#39;,
        &amp;#39;lf3-cdn-tos.bytecdntp.com&amp;#39;,
        &amp;#39;lf9-cdn-tos.bytecdntp.com&amp;#39;,
        &amp;#39;cdn.staticfile.org&amp;#39;,
        &amp;#39;npm.elemecdn.com&amp;#39;,
      ].includes(url.host) &amp;amp;&amp;amp;
      url.pathname.match(/\.(js|css|woff2|woff|ttf|cur)$/),
  },
};

module.exports.getSpareUrls = (srcUrl) =&amp;gt; {
  if (srcUrl.startsWith(&amp;#39;https://npm.elemecdn.com&amp;#39;)) {
    return {
      timeout: 3000,
      list: [
        srcUrl,
        `https://fastly.jsdelivr.net/${new URL(srcUrl).pathname}`,
      ],
    };
  }
};

module.exports.ejectValues = (hexo, rules) =&amp;gt; {
  return {
    domain: {
      prefix: &amp;#39;const&amp;#39;,
      value: new URL(hexo.config.url).host,
    },
  };
};

module.exports.skipRequest = (request) =&amp;gt; request.url.startsWith(&amp;quot;https://i0.hdslb.com&amp;quot;) ||
  request.url.startsWith(&amp;#39;https://meting.qjqq.cn&amp;#39;) ||
  request.url.startsWith(&amp;#39;https://api.i-meto.com&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/hexojs/hexo-deployer-git&quot;&gt;hexo-deploy-git&lt;/a&gt;&lt;/strong&gt; 提交到git的插件&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-deploy-git --save
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;6&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/hexojs/hexo-generator-feed&quot;&gt;hexo-generator-feed&lt;/a&gt;&lt;/strong&gt; hexo的rss插件&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-generator-feed --save
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;7&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/ohroy/hexo-abbrlink&quot;&gt;hexo 的短链接&lt;/a&gt;&lt;/strong&gt;: &lt;code&gt;hexo-abbrlink&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-abbrlink --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在&lt;code&gt;_config.yml&lt;/code&gt;里修改：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;permalink: posts/:abbrlink/ 
# or
permalink: posts/:abbrlink.html
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;添加:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# abbrlink config
abbrlink:
  alg: crc32      # Algorithm used to calc abbrlink. Support crc16(default) and crc32
  rep: hex        # Representation of abbrlink in URLs. Support dec(default) and hex
  drafts: false   # Whether to generate abbrlink for drafts. (false in default)
  force: false    # Enable force mode. In this mode, the plugin will ignore the cache, and calc the abbrlink for every post even it already had an abbrlink. (false in default)
  writeback: true # Whether to write changes to front-matters back to the actual markdown files. (true in default)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;8&quot;&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/hexojs/hexo-generator-sitemap&quot;&gt;博客的sitemap&lt;/a&gt;&lt;/strong&gt; : &lt;code&gt;hexo-generator-sitemap&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-generator-sitemap --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在&lt;code&gt;_config.yml&lt;/code&gt;里添加配置：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;sitemap:
  path: 
    - sitemap.xml
    - sitemap.txt
  template: ./sitemap_template.xml
  template_txt: ./sitemap_template.txt
  rel: false
  tags: true
  categories: true
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;9&quot;&gt;
&lt;li&gt;&lt;a href=&quot;https://www.mebi.me/hexo-with-algolia&quot;&gt;&lt;strong&gt;使用algolia搜索&lt;/strong&gt;&lt;/a&gt; : &lt;code&gt;hexo-algoliasearch&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;注册algolia：&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;注册地址：&lt;a href=&quot;https://dashboard.algolia.com/users/sign_up&quot;&gt;dashboard.algolia.com/users/sign_up&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;创建应用：&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;注册成功后创建应用：&lt;a href=&quot;https://dashboard.algolia.com/account/plan/create?from=dashboard&quot;&gt;dashboard.algolia.com/account/plan/create?from=dashboard&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;search -&amp;gt; configure -&amp;gt; index添加index_name即可&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;在博客执行命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-algoliasearch --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;_config.yml&lt;/code&gt;里添加&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;algolia:
  appId: &amp;quot;Z7A3XW4R2I&amp;quot;
  apiKey: &amp;quot;12db1ad54372045549ef465881c17e743&amp;quot;
  adminApiKey: &amp;quot;40321c7c207e7f73b63a19aa24c4761b&amp;quot;
  chunkSize: 5000
  indexName: &amp;quot;my-hexo-blog&amp;quot;
  fields:
    - content:strip:truncate,0,500
    - excerpt:strip
    - gallery
    - permalink
    - photos
    - slug
    - tags
    - title
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;[!NOTE]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;!!!配置完成后记得运行 &lt;code&gt;hexo clean&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;在&lt;code&gt;hexo g &lt;/code&gt;后实行下列代码：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;hexo algolia
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;ol start=&quot;10&quot;&gt;
&lt;li&gt;**&lt;a href=&quot;https://blog.liushen.fun/posts/1dfd1f41/&quot;&gt;hexo-safego&lt;/a&gt;**安全跳转插件&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;使用该插件之前，需要先安装 &lt;code&gt;cheerio&lt;/code&gt;，&lt;code&gt;cheerio&lt;/code&gt; 是一个轻量级的库，用于在服务器端快速、灵活地实现 jQuery 核心功能。在 &lt;code&gt;hexo-safego&lt;/code&gt; 插件中，&lt;code&gt;cheerio&lt;/code&gt; 被用来解析和操作生成的静态 HTML 内容，类似于在浏览器中使用 jQuery 处理 DOM 元素。这使得插件能够在生成静态页面时，处理和替换外部链接，增强博客的安全性，而不需要在客户端引入 jQuery。Hexo 一般都有这个插件，可以在 &lt;code&gt;node_modules&lt;/code&gt; 查看，如果没有，请先执行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i cheerio --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后即可安装该插件：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-safego --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在&lt;code&gt;hexo&lt;/code&gt;根目录的&lt;code&gt;_config.yml&lt;/code&gt;文件中添加以下配置：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# hexo-safego安全跳转插件
# see https://blog.liushen.fun/posts/1dfd1f41/
hexo_safego:
  # 基本功能设置
  general:
    enable: true                # 启用插件
    enable_base64_encode: true  # 使用 Base64 编码
    enable_target_blank: true   # 打开新窗口
  # 安全设置
  security:
    url_param_name: &amp;#39;u&amp;#39;         # URL 参数名
    html_file_name: &amp;#39;go.html&amp;#39;   # 重定向页面的文件名
    ignore_attrs:               # 忽略处理的 HTML 属性
      - &amp;#39;data-fancybox&amp;#39;
  # 容器与页面设置
  scope:
    apply_containers:           # 应用的容器选择器
      - &amp;#39;#article-container&amp;#39;
    apply_pages:                # 应用的页面路径
      - &amp;quot;/posts/&amp;quot;
      - &amp;quot;/devices/&amp;quot;
    exclude_pages:              # 排除的页面路径
  # 域名白名单
  whitelist:
    domain_whitelist:           # 允许的白名单域名
      - &amp;quot;qyliu.top&amp;quot;
      - &amp;quot;liushen.fun&amp;quot;
  # 页面外观设置
  appearance:
    avatar: /info/avatar.ico    # 头像路径
    title: &amp;quot;清羽飞扬&amp;quot;            # 页面标题
    subtitle: &amp;quot;安全中心&amp;quot;         # 页面副标题
    darkmode: true              # 是否启用深色模式
    countdowntime: -1           # 倒计时秒数
  # 调试设置
  debug:
    enable: false               # 启用调试模式
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;11&quot;&gt;
&lt;li&gt;&lt;strong&gt;hexo的追番页面&lt;/strong&gt;：&lt;a href=&quot;https://github.com/HCLonely/hexo-bilibili-bangumi&quot;&gt;hexo-bilibili-bangumi&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pnpm i hexo-bilibili-bangumi --save
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;在&lt;code&gt;_config.yml&lt;/code&gt;配置：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;bangumi: # 追番设置
  enable: true           # 是否启用
  source: bili          # 数据源
  path: bangumis/index.html  # 页面路径
  vmid:                 # 用户ID
  title: &amp;#39;追番列表&amp;#39;      # 页面标题
  quote: &amp;#39;生命不息，追番不止！&amp;#39; # 页面引言
  show: 1              # 初始显示页面: 0=想看, 1=在看, 2=看过
  lazyload: true       # 是否启用图片懒加载
  metaColor:           # meta 信息字体颜色
  color:               # 简介字体颜色
  webp: true          # 是否使用 webp 格式图片
  progress: true      # 是否显示进度条

cinema: # 追剧设置
  enable: true           # 是否启用
  source: bili

game: # 游戏设置，仅支持source: bgmv0
  enable: true           # 是否启用
  source: bgmv0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;还在更新中。。。&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Github action配置&lt;/h2&gt;
&lt;p&gt;承接&lt;a href=&quot;#github-config&quot;&gt;段落&lt;/a&gt;的继续吧，未来会在&lt;del&gt;出&lt;/del&gt;水一期。&lt;/p&gt;
&lt;p&gt;接下来就是创建一个私有仓库，根据大佬的文章，是为了保护&lt;strong&gt;Token&lt;/strong&gt;，见仁见智。&lt;/p&gt;
&lt;p&gt;这个私有仓库的建立是存储Hexo博客代码，如果你要使用&lt;a href=&quot;https://github.com/Qexo/Qexo&quot;&gt;Qexo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;，这也是必不可少的！&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.314926.xyz/images/2025/08/19/hexo-beiwang1.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;创建完成后，需要把博客的源码 push 到这里。首先获取远程仓库地址，此处虽然 SSH 和 HTTPS 均可。SSH 在绑定过 ssh key 的设备上无需再输入密码，HTTPS 则需要输入密码，但是 SSH 偶尔会遇到端口占用的情况。请自主选择。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://img.314926.xyz/images/2025/08/19/hexo-beiwang2.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[!TIP]&lt;/p&gt;
&lt;p&gt;这里之所以是私有仓库，是因为在接下来的配置中会用到 &lt;code&gt;Token&lt;/code&gt;，如果 &lt;code&gt;Token&lt;/code&gt; 被盗用，别人可以肆意操作你的 github 仓库内容，为了避免这一风险，才选择的博客源码闭源。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;配置 Github Action&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;在&lt;code&gt;[Blogroot]&lt;/code&gt;新建&lt;code&gt;.github&lt;/code&gt;文件夹,注意开头是有个&lt;code&gt;.&lt;/code&gt;的。然后在&lt;code&gt;.github&lt;/code&gt; 内新建 &lt;code&gt;workflows&lt;/code&gt; 文件夹，再在 &lt;code&gt;workflows&lt;/code&gt; 文件夹内新建 &lt;code&gt;autodeploy.yml&lt;/code&gt;,在&lt;code&gt;[Blogroot]/.github/workflows/autodeploy.yml&lt;/code&gt; 里面输入&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-yml&quot;&gt;# 当有改动推送到 main 分支时，启动 Action
name: 自动部署

on:
  push:
    branches:
      - main # 自选分支

  release:
    types:
      - published

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: 检查分支
        uses: actions/checkout@v4
        with:
          ref: main # 自选分支

      - name: 安装 Node
        uses: actions/setup-node@v4
        with:
          node-version: &amp;quot;22.x&amp;quot; # node版本

      - name: 安装 Hexo
        run: |
          export TZ=&amp;#39;Asia/Shanghai&amp;#39;
          npm install hexo-cli -g
          npm install yamljs --save

      - name: 缓存 Hexo
        uses: actions/cache@v4
        id: cache
        with:
          path: node_modules
          key: ${{ runner.os }}-node-${{ hashFiles(&amp;#39;**/package-lock.json&amp;#39;) }}

      - name: 安装依赖
        if: steps.cache.outputs.cache-hit != &amp;#39;true&amp;#39;
        run: |
          npm install --save
          npm install hexo-algoliasearch --save
          npm install hexo-bilibili-bangumi --save

      - name: 生成静态文件
        run: |
          node ./link.js
          hexo clean
          hexo generate
          hexo bangumi -u
          hexo algolia

      - name: 部署
        run: |
          cd ./public
          git init -b main
          git config --global user.name &amp;#39;${{ secrets.GITHUBUSERNAME }}&amp;#39;
          git config --global user.email &amp;#39;${{ secrets.GITHUBEMAIL }}&amp;#39;
          git add .
          git commit -m &amp;quot;${{ github.event.head_commit.message }} $(date +&amp;quot;%Z %Y-%m-%d %A %H:%M:%S&amp;quot;) Updated by GitHub Actions&amp;quot;
          git push --force --quiet &amp;quot;https://${{ secrets.GITHUBUSERNAME }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ secrets.GITHUBUSERNAME }}/${{ secrets.GITHUBUSERNAME }}.github.io.git&amp;quot; main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;上述代码是来自&lt;a href=&quot;https://akilar.top/posts/f752c86d/&quot;&gt;店长&lt;/a&gt;的修改自用，为什么不用&lt;a href=&quot;https://blog.anheyu.com/posts/asdx.html&quot;&gt;安知鱼&lt;/a&gt;的？&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;首先把Token直接放在仓库的文件里还是不太好。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;像我这种在本地搞的，推不到仓库里，因为这里的token不能直接上传，所以改成环境变量来引入，但是依旧有各种问题，相反使用了店长的代码后，就大差不差，询问AI后就得到目前的代码，也就可以正式上传了。（无拉踩的意思）&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;之后需要自己到仓库的 Settings-&amp;gt;Secrets-&amp;gt;actions 下添加环境变量，变量名参考脚本中出现的，依次添加。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://img.314926.xyz/images/2025/08/19/hexo-beiwang3.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3&gt;重新设置远程仓库和分支&lt;/h3&gt;
&lt;details&gt;
&lt;summary&gt;🍼第一次使用git管理博客源码&lt;/summary&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;删除或者先把&lt;code&gt;[Blogroot]/themes/solitude/.git&lt;/code&gt;移动到非博客文件夹目录下,原因是主题文件夹下的&lt;code&gt;.git&lt;/code&gt;文件夹的存在会导致其被识别成子项目，从而无法被上传到源码仓库。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;在博客根目录&lt;code&gt;[Blogroot]&lt;/code&gt;路径下运行指令:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git init #初始化
git remote add origin git@github.com:[GithubUsername]/[SourceRepo].git #[SourceRepo]为存放源码的github私有仓库
git checkout -b master # 切换到master分支，
#2020年10月后github新建仓库默认分支改为main，注意更改
# 如果不是，后面的所有设置的分支记得保持一致
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;添加屏蔽项&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
.deploy_git*/
.idea
themes/solitude/.git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果不是&lt;code&gt;solitude&lt;/code&gt;主题，记得替换最后一行内容为你自己当前使用的主题。
4. 之后再运行 git 提交指令，将博客源码提交到 github 上。&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git add .
git commit -m &amp;quot;github action update&amp;quot;
git push origin master
#2020年10月后github新建仓库默认分支改为main，注意更改
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;5&quot;&gt;
&lt;li&gt;此时你的主题文件夹若已经被正常上传，并且你也添加了主题文件夹下的.git 文件夹的屏蔽项。那你可以考虑把第二步移走或删除的&lt;code&gt;.git&lt;/code&gt;放回来，用作以后升级。（不禁怀疑真的有人会去用这个方式来升级吗）&lt;/details&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;details&gt;
&lt;summary&gt;🍾曾经做过git管理源码的操作&lt;/summary&gt;

&lt;ol&gt;
&lt;li&gt;添加屏蔽项&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;因为能够使用指令进行安装的内容不包括在需要提交的源码内，所有我们需要将这些内容添加到屏蔽项，表示不上传到 github 上。这样可以显著减少需要提交的文件量和加快提交速度。
打开&lt;code&gt;[Blogroot]/.gitignore&lt;/code&gt;,输入以下内容：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;.DS_Store
Thumbs.db
db.json
*.log
node_modules/
public/
.deploy*/
.deploy_git*/
.idea
themes/solitude/.git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;如果不是&lt;code&gt;solitude&lt;/code&gt;主题，记得替换最后一行内容为你自己当前使用的主题。&lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;提交源码到私有仓库&lt;code&gt;[SourceRepo]&lt;/code&gt;
在博客根目录&lt;code&gt;[Blogroot]&lt;/code&gt;下启动终端，使用 git 指令重设仓库地址。这样在新建仓库，我们仍旧可以保留珍贵的 commit history，便于版本回滚。&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git remote rm origin # 删除原有仓库链接
git remote add origin git@github.com:[GithubUsername]/[SourceRepo].git #[SourceRepo]为新的存放源码的github私有仓库
git checkout -b master # 切换到master分支，
#2020年10月后github新建仓库默认分支改为main，注意更改
# 如果不是，后面的所有设置的分支记得保持一致
git add .
git commit -m &amp;quot;github action update&amp;quot;
git push origin master
#2020年10月后github新建仓库默认分支改为main，注意更改
&lt;/code&gt;&lt;/pre&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;可能遇到的 bug
因为 solitude 主题文件夹下的.git 文件夹的存在，那么主题文件夹会被识别子项目。从而无法被上传到源码仓库。若是遇到添加屏蔽项，但是还是无法正常上传主题文件夹的情况。请先将本地源码中的 themes 文件夹移动到别的目录下。然后 commit 一次。接着将 themes 文件夹移动回来，再 commit 一次。&lt;blockquote&gt;
&lt;p&gt;[!IMPORTANT]&lt;/p&gt;
&lt;p&gt;要是还不行，那就删了 solitude 主题文件夹下的.git 文件夹，然后再重复上述的 commit 操作。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/details&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;挖坑&lt;/h1&gt;
&lt;p&gt;大致写到这，未来或许会有&lt;del&gt;下一章&lt;/del&gt;挖坑？但是目前通用的就到这，然后后续会写Qexo的简单使用方法、solitude的一些配置更改和我踩坑经历吧。&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Sat, 16 Aug 2025 00:00:00 GMT</pubDate></item><item><title>Markdown 强调语法</title><link>https://boke.zsx815.top/post/markdown-qiangdiaoyufa/</link><guid isPermaLink="true">https://boke.zsx815.top/post/markdown-qiangdiaoyufa/</guid><description>Markdown 强调语法，如何使用星号和下划线进行文本强调。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/markdown-qiangdiaoyufa/&quot;&gt;https://boke.zsx815.top/post/markdown-qiangdiaoyufa/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href=&quot;https://markdown.com.cn/basic-syntax/emphasis.html&quot;&gt;https://markdown.com.cn/basic-syntax/emphasis.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Markdown 强调语法&lt;/h2&gt;
&lt;p&gt;通过将文本设置为粗体或斜体来强调其重要性。&lt;/p&gt;
&lt;h3&gt;粗体（Bold）&lt;/h3&gt;
&lt;p&gt;要加粗文本，请在单词或短语的前后各添加两个星号（asterisks）或下划线（underscores）。如需加粗一个单词或短语的中间部分用以表示强调的话，请在要加粗部分的两侧各添加两个星号（asterisks）。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;Markdown语法&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;HTML&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;预览效果&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;I just love **bold text**.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;I just love &amp;lt;strong&amp;gt;bold text&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;I just love &lt;strong&gt;bold text&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;I just love __bold text__.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;I just love &amp;lt;strong&amp;gt;bold text&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;I just love &lt;strong&gt;bold text&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;Love**is**bold&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;Love&amp;lt;strong&amp;gt;is&amp;lt;/strong&amp;gt;bold&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;Love &lt;strong&gt;is&lt;/strong&gt; bold&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;粗体（Bold）用法最佳实践&lt;/h3&gt;
&lt;p&gt;Markdown 应用程序在如何处理单词或短语中间的下划线上并不一致。为兼容考虑，在单词或短语中间部分加粗的话，请使用星号（asterisks）。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;✅  Do this&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;❌  Don&amp;#39;t do this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;Love**is**bold&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;Love__is__bold&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;斜体（Italic）&lt;/h3&gt;
&lt;p&gt;要用斜体显示文本，请在单词或短语前后添加一个星号（asterisk）或下划线（underscore）。要斜体突出单词的中间部分，请在字母前后各添加一个星号，中间不要带空格。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;Markdown语法&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;HTML&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;预览效果&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is ***really important***.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is &amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;really important&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This text is &lt;em&gt;&lt;strong&gt;really important&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is ___really important___.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is &amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;really important&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This text is &lt;em&gt;&lt;strong&gt;really important&lt;/strong&gt;&lt;/em&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is __*really important*__.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is &amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;really important&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This text is &lt;strong&gt;&lt;em&gt;really important&lt;/em&gt;&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is **_really important_**.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This text is &amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;really important&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt;.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This text is &lt;strong&gt;&lt;em&gt;really important&lt;/em&gt;&lt;/strong&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is really***very***important text.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is really&amp;lt;strong&amp;gt;&amp;lt;em&amp;gt;very&amp;lt;/em&amp;gt;&amp;lt;/strong&amp;gt;important text.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This is really &lt;em&gt;&lt;strong&gt;very&lt;/strong&gt;&lt;/em&gt; important text.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h3&gt;粗体（Bold）和斜体（Italic）用法的最佳实践&lt;/h3&gt;
&lt;p&gt;Markdown 应用程序在处理单词或短语中间添加的下划线上并不一致。为了实现兼容性，请使用星号将单词或短语的中间部分加粗并以斜体显示，以示重要。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;✅  Do this&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;❌  Don&amp;#39;t do this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is really***very***important text.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is really___very___important text.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Thu, 17 Jul 2025 00:00:00 GMT</pubDate></item><item><title>Markdown 换行语法</title><link>https://boke.zsx815.top/post/markdowm-huanhang/</link><guid isPermaLink="true">https://boke.zsx815.top/post/markdowm-huanhang/</guid><description>Markdown 换行语法，如何创建换行以及最佳实践</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/markdowm-huanhang/&quot;&gt;https://boke.zsx815.top/post/markdowm-huanhang/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;原文链接: &lt;a href=&quot;https://markdown.com.cn/basic-syntax/line-breaks.html&quot;&gt;https://markdown.com.cn/basic-syntax/line-breaks.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Markdown 换行语法&lt;/h2&gt;
&lt;p&gt;在一行的末尾添加两个或多个空格，然后按回车键,即可创建一个换行(&lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt;)。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;Markdown语法&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;HTML&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;预览效果&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is the first line.  &lt;/code&gt;&lt;br /&gt;&lt;code&gt;And this is the second line.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;This is the first line.&amp;lt;br&amp;gt;&lt;/code&gt;&lt;br /&gt; &lt;code&gt;And this is the second line.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;This is the first line.&lt;br /&gt; And this is the second line.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;换行（Line Break）用法的最佳实践&lt;/h2&gt;
&lt;p&gt;几乎每个 Markdown 应用程序都支持两个或多个空格进行换行，称为 &lt;code&gt;结尾空格（trailing whitespace)&lt;/code&gt; 的方式，但这是有争议的，因为很难在编辑器中直接看到空格，并且很多人在每个句子后面都会有意或无意地添加两个空格。由于这个原因，你可能要使用除结尾空格以外的其它方式来换行。幸运的是，几乎每个 Markdown 应用程序都支持另一种换行方式：HTML 的 &lt;code&gt;&amp;lt;br /&amp;gt;&lt;/code&gt; 标签。&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;为了兼容性，请在行尾添加“结尾空格”或 HTML 的 &lt;code&gt;&amp;lt;br&amp;gt;&lt;/code&gt; 标签来实现换行。&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;还有两种其他方式我并不推荐使用。CommonMark 和其它几种轻量级标记语言支持在行尾添加反斜杠 (&lt;code&gt;\&lt;/code&gt;) 的方式实现换行，但是并非所有 Markdown 应用程序都支持此种方式，因此从兼容性的角度来看，不推荐使用。并且至少有两种轻量级标记语言支持无须在行尾添加任何内容，只须键入回车键（&lt;code&gt;return&lt;/code&gt;）即可实现换行。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;✅  Do this&lt;/th&gt;
&lt;th align=&quot;center&quot;&gt;❌  Don&amp;#39;t do this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;First line with two spaces after.  &lt;/code&gt;&lt;br /&gt; &lt;code&gt;And the next line.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;First line with a backslash after.\&lt;/code&gt; &lt;br /&gt; &lt;code&gt;And the next line.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;First line with the HTML tag after.&amp;lt;br&amp;gt;&lt;/code&gt;&lt;br /&gt; &lt;code&gt;And the next line.&lt;/code&gt;&lt;/td&gt;
&lt;td align=&quot;center&quot;&gt;&lt;code&gt;First line with nothing after.&lt;/code&gt;&lt;br /&gt; &lt;code&gt;And the next line.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Sat, 28 Jun 2025 00:00:00 GMT</pubDate></item><item><title>资源分享：涂鹿Toolooz</title><link>https://boke.zsx815.top/post/zyfx-toolooz/</link><guid isPermaLink="true">https://boke.zsx815.top/post/zyfx-toolooz/</guid><description>涂鹿Toolooz：曲线文字绘制设计工具，轻松创建沿任意路径排布的精美文字</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/zyfx-toolooz/&quot;&gt;https://boke.zsx815.top/post/zyfx-toolooz/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;涂鹿Toolooz：曲线文字绘制设计工具，轻松创建沿任意路径排布的精美文字&lt;/h2&gt;
&lt;p&gt;　　涂鹿Toolooz，在线曲线文字绘制工具，可使文字沿任意路径排列，打造独特视觉效果。为您的徽标、标题、艺术作品赋予生命力与创意。&lt;/p&gt;
&lt;p&gt;　　支持自定义画布尺寸、文本内容、字体、间距、颜色、描边等，还支持多个绘图工具和选择文本是否重复，可导出为 PNG、WebP 和 SVG 格式，免费使用，无需注册。&lt;/p&gt;
&lt;h2&gt;网站介绍&lt;/h2&gt;
&lt;h3&gt;截图&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505191632987.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3&gt;特色&lt;/h3&gt;
&lt;h4&gt;自由绘制路径&lt;/h4&gt;
&lt;p&gt;　　使用鼠标或触控笔自由绘制路径，或选择预设形状如圆形、方形、椭圆等，轻松创建文字轨迹。&lt;/p&gt;
&lt;h4&gt;文本样式丰富&lt;/h4&gt;
&lt;p&gt;　　自定义字体、大小、颜色、间距等属性，支持文本背景带，打造丰富多样的文字效果。&lt;/p&gt;
&lt;h4&gt;交互式编辑&lt;/h4&gt;
&lt;p&gt;　　直观的选择、移动、缩放和旋转功能，让您精确控制每个文字路径的位置和外观。&lt;/p&gt;
&lt;h4&gt;灵活配置&lt;/h4&gt;
&lt;p&gt;　　自定义画布尺寸、背景色、缩放级别等，适应各种设计场景和需求。&lt;/p&gt;
&lt;h4&gt;多格式导出&lt;/h4&gt;
&lt;p&gt;　　将设计导出为PNG、SVG或WEBP格式，可自定义分辨率和尺寸，轻松应用于各种场景。&lt;/p&gt;
&lt;h4&gt;模板库&lt;/h4&gt;
&lt;p&gt;　　内置多种精美模板，一键应用，快速开始您的创意设计项目&lt;/p&gt;
&lt;h2&gt;应用场景&lt;/h2&gt;
&lt;p&gt;　　涂鹿曲线文字绘制设计工具适用于多种创意设计&lt;/p&gt;
&lt;p&gt;　　创建独特的环形或自定义形状品牌徽标，增强品牌视觉识别度。#社交媒体 #创意设计&lt;/p&gt;
&lt;p&gt;　　为社交媒体平台设计吸引眼球的曲线文字图片，提高内容吸引力。创意海报设计&lt;/p&gt;
&lt;p&gt;　　创建个性化海报和宣传材料，为活动和产品增添创意元素。&lt;/p&gt;
&lt;h2&gt;网站链接&lt;/h2&gt;
&lt;p&gt;　　&lt;a href=&quot;https://toolooz.com/&quot;&gt;https://toolooz.com&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;原文链接&lt;/h2&gt;
&lt;p&gt;　　&lt;a href=&quot;https://www.appmiao.com/836/&quot;&gt;https://www.appmiao.com/836/&lt;/a&gt;&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Mon, 19 May 2025 00:00:00 GMT</pubDate></item><item><title>来将 Telegram 当音乐播放器吧！</title><link>https://boke.zsx815.top/post/telegram-music/</link><guid isPermaLink="true">https://boke.zsx815.top/post/telegram-music/</guid><description>来将 Telegram 当音乐播放器吧！（寻找音乐、即时歌词、无损音乐不失真压缩）</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/telegram-music/&quot;&gt;https://boke.zsx815.top/post/telegram-music/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;来将 Telegram 当音乐播放器吧！（寻找音乐、即时歌词、无损音乐不失真压缩）&lt;/h2&gt;
&lt;h3&gt;步骤一：到 &lt;a href=&quot;https://t.me/music_v1bot&quot;&gt;@music_v1bot&lt;/a&gt; 下载歌曲，并找到歌词&lt;/h3&gt;
&lt;p&gt;　　&lt;em&gt;输入指令： /search （你想要的歌名）&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505151340118.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3&gt;步骤二：&lt;a href=&quot;https://telegra.ph/Mtmanager-02-10-2&quot;&gt;下载 MT 管理器（点我）&lt;/a&gt;&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;u&gt;开启：下载好的歌词文件&lt;/u&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505151343982.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h3&gt;步骤三：最右上角、搜索&amp;gt;勾选正则化，替换（全部替换）&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;输入：[(\d{2}:\d{2}).\d+]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;替换：$1&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;code&gt;注意：&amp;quot;$1&amp;quot;后面要加一个空格(英文)。&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505151346330.jpg&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;代码作者：Aric&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;　　并将选取好的歌词，粘贴到音乐文件就完成了。&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://t.me/TESTLIVEUP&quot;&gt;（我是范例-点我查看）&lt;/a&gt;&lt;/h3&gt;
&lt;div style=&quot;text-align:center; font-weight:bold; text-decoration:underline;&quot;&gt;须知&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;使用：“.FLAC“格式的音乐文件，有时候不能正常显示歌词时间轴，是正常的，所以你可能要转换特定的格式，如.mp3，或是.ogg 或.m4a 的歌曲。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;　　→ 如果你对音乐品质有极致追求，也有电脑 🖥️，我个人极度推荐使用 dBpowerAMP 这类型工具，将无损音乐格式转换成 m4a （水果的算法：QAAC 编码的音乐），目前可以&lt;a href=&quot;https://telegra.ph/QAAC-%E5%8E%8B%E7%BC%A9%E9%9F%B3%E4%B9%90%E6%8A%80%E6%9C%AF%E8%AF%A6%E8%A7%A3-08-22&quot;&gt;算是当今世界上最好的压缩算法，在通讯界享有盛名&lt;/a&gt;，且压缩后可以到接近百分之百还原。（甚至连对音乐/声学研究的职业工作者都讚叹不已）笔者强烈推荐，只叹手机没有类似的软件。专门转成 QAAC 编码的。&lt;/p&gt;
&lt;h3&gt;&lt;a href=&quot;https://t.me/haoruanfenxianggroup/369211&quot;&gt;🖥️ 电脑版 dBpowerAMP 下载/教学请点我&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505151358822.jpg&quot; alt=&quot;&quot;&gt;​&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;拓展&lt;/h3&gt;
&lt;p&gt;　　以上是原文内容，如果你改了音乐格式失去了原本的封面，歌手等等东西，一般来说是不妨碍什么的，如果你一定要改的话，可以使用&lt;a href=&quot;https://t.me/kemiaosw_me/394&quot;&gt;音乐标签&lt;/a&gt;。具体使用很简单，我不多赘述，给个视频你就大致明白了：​&lt;code&gt; &lt;/code&gt;​&lt;/p&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
  &lt;iframe src=&quot;https://player.bilibili.com/player.html?isOutside=true&amp;amp;aid=615163818&amp;amp;bvid=BV1Jh4y1g7PV&amp;amp;cid=1175422578&amp;amp;p=1&quot; 
          scrolling=&quot;no&quot; 
          border=&quot;https://boke.zsx815.top/0&quot; 
          frameborder=&quot;https://boke.zsx815.top/no&quot; 
          framespacing=&quot;0&quot; 
          allowfullscreen=&quot;true&quot;
          style=&quot;width: 100%; max-width: 800px; height: 450px;&quot;&gt;
  &lt;/iframe&gt;
&lt;/div&gt;

&lt;p&gt;　　同时，如果你想更换音乐格式，有很多种方法，以下给一个&lt;a href=&quot;https://convertio.co/zh/flac-m4a/&quot;&gt;网站&lt;/a&gt;。&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;原文链接&lt;/h3&gt;
&lt;p&gt;　　&lt;a href=&quot;https://telegra.ph/Telegram-Real-Time-sync-lyrics-05-14&quot;&gt;https://telegra.ph/Telegram-Real-Time-sync-lyrics-05-14&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;　　‍&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Thu, 15 May 2025 00:00:00 GMT</pubDate></item><item><title>DROP：便捷大文件分享与托管网站，免费享10GB空间免费部署</title><link>https://boke.zsx815.top/post/drop/</link><guid isPermaLink="true">https://boke.zsx815.top/post/drop/</guid><description>DROP 是一个便捷的文件分享与托管平台，云存储工具，提供免费10GB的存储空间，支持大文件的快速上传与分享。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/drop/&quot;&gt;https://boke.zsx815.top/post/drop/&lt;/a&gt;&lt;/blockquote&gt; &lt;h3&gt;网站简介&lt;/h3&gt;
&lt;p&gt;DROP 是一个便捷的文件分享与托管平台，云存储工具，提供免费10GB的存储空间，支持大文件的快速上传与分享。&lt;/p&gt;
&lt;p&gt;支持上传图片、视频、压缩文件和PDF，选择适合文件的文档后，点击拷贝链接即可直接获得分享链接。采用AI驱动技术，确保文件传输的高效性和安全性，同时提供简洁直观的用户界面，方便用户管理和分享文件。DROP 适用于个人用户和创作者，可轻松展示和分发作品&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;截图&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505092144042.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;功能特色&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;免费10GB存储&lt;/strong&gt;：新用户可免费享受10GB的存储空间，满足日常文件分享需求。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;大文件支持&lt;/strong&gt;：支持大文件的快速上传与分享，适合分享高清视频、大型文档等。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI驱动&lt;/strong&gt;：采用AI技术优化文件传输和管理，提升用户体验。 &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;隐私保护&lt;/strong&gt;：提供文件访问控制，保护用户隐私和数据安全。  &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;简洁界面&lt;/strong&gt;：直观的用户界面，易于上手，方便文件管理。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;多平台支持&lt;/strong&gt;：支持多种设备和操作系统，方便随时随地访问文件。&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3&gt;网站地址&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://drop.space/&quot;&gt;https://drop.space/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;原文链接&lt;/strong&gt;: &lt;a href=&quot;https://www.appmiu.com/31115.html&quot;&gt;https://www.appmiu.com/31115.html&lt;/a&gt;&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Fri, 09 May 2025 00:00:00 GMT</pubDate></item><item><title>tgtalk免费部署</title><link>https://boke.zsx815.top/post/tgtalk-deploy/</link><guid isPermaLink="true">https://boke.zsx815.top/post/tgtalk-deploy/</guid><description>一个基于 Cloudflare Workers 的 tg 频道消息说说。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/tgtalk-deploy/&quot;&gt;https://boke.zsx815.top/post/tgtalk-deploy/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;部署 API&lt;/h2&gt;
&lt;p&gt;访问 &lt;a href=&quot;https://gist.github.com/FloatSheep/55db67d9e8148149ebbcb0f9f6b0d901&quot;&gt;Gist&lt;/a&gt; 并获取其中所有代码&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;需要注意，本 API Worker 脚本基于 ChenYFan 修改，包含了本项目需要使用的功能，请勿随意更改脚本内容
TGTalker-Frontend V2 的 API 不兼容 V1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;进入 &lt;a href=&quot;https://dash.cloudflare.com&quot;&gt;Cloudflare 仪表盘&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;选择创建应用程序 -&amp;gt; 创建 Worker -&amp;gt; 修改名称（部署）-&amp;gt; 编辑代码&lt;/p&gt;
&lt;p&gt;在其中粘贴你复制的所有代码，并且修改 ChannelName 为你的频道名称，部署并访问 Worker 查看是否能正确返回内容&lt;/p&gt;
&lt;p&gt;接着你可以为你的 Worker 绑定一个域名&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505042340004.png&quot; alt=&quot;&quot;&gt;
&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505042340138.png&quot; alt=&quot;&quot;&gt;
&lt;img src=&quot;https://cdn.jsdelivr.net/gh/kmfx/tuchuang@main/img/202505042340963.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;保存，然后将你绑定的域名填入配置中的 api 项即可。&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Sun, 04 May 2025 00:00:00 GMT</pubDate></item><item><title>Waline评论在Vercel部署</title><link>https://boke.zsx815.top/post/waline-deploy-vercel/</link><guid isPermaLink="true">https://boke.zsx815.top/post/waline-deploy-vercel/</guid><description>使用Waline评论我喜欢使用的部署方法(个人认为最简便)</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/waline-deploy-vercel/&quot;&gt;https://boke.zsx815.top/post/waline-deploy-vercel/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;使用Waline评论我喜欢使用的部署方法(个人认为最简便)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;所需账号&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;一个Github账号&lt;/li&gt;
&lt;li&gt;一个Vercel账号&lt;/li&gt;
&lt;li&gt;一个leancloud账号(最好是国际服的，你有了Github难道还用大陆的吗？大陆的要备案，故在这里不阐述，末尾放原文链接)&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;在 leancloud 里创建数据库&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://console.leancloud.app/login&quot;&gt;登录&lt;/a&gt; 或 &lt;a href=&quot;https://console.leancloud.app/register&quot;&gt;注册&lt;/a&gt; &lt;code&gt;LeanCloud 国际版&lt;/code&gt; 并进入 &lt;a href=&quot;https://console.leancloud.app/apps&quot;&gt;控制台&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;点击左上角 &lt;a href=&quot;https://console.leancloud.app/apps&quot;&gt;创建应用&lt;/a&gt; 并起一个你喜欢的名字 (请选择免费的开发版):&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/7FOYbvS8MlQXe52.png&quot; alt=&quot;创建应用&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;进入应用，选择左下角的 &lt;code&gt;设置&lt;/code&gt; &amp;gt; &lt;code&gt;应用 Key&lt;/code&gt;。你可以看到你的 &lt;code&gt;APP ID&lt;/code&gt;,&lt;code&gt;APP Key&lt;/code&gt; 和 &lt;code&gt;Master Key&lt;/code&gt;。请记录它们，以便后续使用。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/c1Vltvsm8GYXSbf.png&quot; alt=&quot;ID 和 Key&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;在 Vercel 部署&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwalinejs%2Fwaline%2Ftree%2Fmain%2Fexample&quot;&gt;&lt;img src=&quot;https://vercel.com/button&quot; alt=&quot;Vercel&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;点击上方按钮，跳转至 Vercel 进行 Server 端部署。&lt;/p&gt;
&lt;p&gt;::: note&lt;/p&gt;
&lt;p&gt;如果你未登录的话，Vercel 会让你注册或登录，请使用 GitHub 账户进行快捷登录。&lt;/p&gt;
&lt;p&gt;:::&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;输入一个你喜欢的 Vercel 项目名称并点击 &lt;code&gt;Create&lt;/code&gt; 继续:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/XauJLO7hfcWVx2Y.png&quot; alt=&quot;创建项目&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;此时 Vercel 会基于 Waline 模板帮助你新建并初始化仓库，仓库名为你之前输入的项目名。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/Q7tExaML3XKlf12.png&quot; alt=&quot;deploy&quot;&gt;&lt;/p&gt;
&lt;p&gt;一两分钟后，满屏的烟花会庆祝你部署成功。此时点击 &lt;code&gt;Go to Dashboard&lt;/code&gt; 可以跳转到应用的控制台。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/HqfvwV6GdrFROSZ.png&quot; alt=&quot;deploy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;点击顶部的 &lt;code&gt;Settings&lt;/code&gt; - &lt;code&gt;Environment Variables&lt;/code&gt; 进入环境变量配置页，并配置三个环境变量 &lt;code&gt;LEAN_ID&lt;/code&gt;, &lt;code&gt;LEAN_KEY&lt;/code&gt; 和 &lt;code&gt;LEAN_MASTER_KEY&lt;/code&gt; 。它们的值分别对应上一步在 LeanCloud 中获得的 &lt;code&gt;APP ID&lt;/code&gt;, &lt;code&gt;APP KEY&lt;/code&gt;, &lt;code&gt;Master Key&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/9laMFio1umnjB6g.png&quot; alt=&quot;设置环境变量&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;环境变量配置完成之后点击顶部的 &lt;code&gt;Deployments&lt;/code&gt; 点击顶部最新的一次部署右侧的 &lt;code&gt;Redeploy&lt;/code&gt; 按钮进行重新部署。该步骤是为了让刚才设置的环境变量生效。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/WkVxeRub73aIHBX.png&quot; alt=&quot;redeploy&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;此时会跳转到 &lt;code&gt;Overview&lt;/code&gt; 界面开始部署，等待片刻后 &lt;code&gt;STATUS&lt;/code&gt; 会变成 &lt;code&gt;Ready&lt;/code&gt;。此时请点击 &lt;code&gt;Visit&lt;/code&gt; ，即可跳转到部署好的网站地址，此地址即为你的服务端地址。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/xM8rEezGTqFQNCY.png&quot; alt=&quot;redeploy success&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;绑定域名 (可选)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;点击顶部的 &lt;code&gt;Settings&lt;/code&gt; - &lt;code&gt;Domains&lt;/code&gt; 进入域名配置页&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;输入需要绑定的域名并点击 &lt;code&gt;Add&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/9wHyLEWQOtvz1fA.png&quot; alt=&quot;Add domain&quot;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;在域名服务器商处添加新的 &lt;code&gt;CNAME&lt;/code&gt; 解析记录&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;CNAME&lt;/td&gt;
&lt;td&gt;example&lt;/td&gt;
&lt;td&gt;cname.vercel-dns.com(国区的可用 cname-china.vercel-dns.com)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;等待生效，你可以通过自己的域名来访问了:tada:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;评论系统：example.yourdomain.com&lt;/li&gt;
&lt;li&gt;评论管理：example.yourdomain.com/ui&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/14/4BOxqfs16erKTMV.png&quot; alt=&quot;success&quot;&gt;&lt;/p&gt;
&lt;h2&gt;HTML 引入 (客户端)&lt;/h2&gt;
&lt;p&gt;在你的网页中进行如下设置:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;导入 Waline 样式 &lt;code&gt;https://unpkg.com/@waline/client@v3/dist/waline.css&lt;/code&gt;。&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;创建 &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; 标签使用来自 &lt;code&gt;https://unpkg.com/@waline/client@v3/dist/waline.js&lt;/code&gt; 的 &lt;code&gt;init()&lt;/code&gt; 函数初始化，并传入必要的 &lt;code&gt;el&lt;/code&gt; 与 &lt;code&gt;serverURL&lt;/code&gt; 选项。&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;el&lt;/code&gt; 选项是 Waline 渲染使用的元素，你可以设置一个字符串形式的 CSS 选择器或者一个 HTMLElement 对象。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;serverURL&lt;/code&gt; 是服务端的地址，即上一步获取到的值。&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;lt;head&amp;gt;
  &amp;lt;!-- ... --&amp;gt;
  &amp;lt;link
    rel=&amp;quot;stylesheet&amp;quot;
    href=&amp;quot;https://unpkg.com/@waline/client@v3/dist/waline.css&amp;quot;
  /&amp;gt;
  &amp;lt;!-- ... --&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;!-- ... --&amp;gt;
  &amp;lt;div id=&amp;quot;waline&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script type=&amp;quot;module&amp;quot;&amp;gt;
    import { init } from &amp;#39;https://unpkg.com/@waline/client@v3/dist/waline.js&amp;#39;;

    init({
      el: &amp;#39;#waline&amp;#39;,
      serverURL: &amp;#39;https://your-domain.vercel.app&amp;#39;,
    });
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;评论服务此时就会在你的网站上成功运行 :tada:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;评论管理 (管理端)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;部署完成后，请访问 &lt;code&gt;&amp;lt;serverURL&amp;gt;/ui/register&lt;/code&gt; 进行注册。首个注册的人会被设定成管理员。&lt;/li&gt;
&lt;li&gt;管理员登陆后，即可看到评论管理界面。在这里可以修改、标记或删除评论。&lt;/li&gt;
&lt;li&gt;用户也可通过评论框注册账号，登陆后会跳转到自己的档案页。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;视频教程&lt;/h2&gt;
&lt;p&gt;以下是热心用户制作的视频教程，以上操作不清楚的也可以参考一二。&lt;/p&gt;
&lt;h3&gt;Waline 部署教程（快速上手）&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;UP 主：&lt;a href=&quot;https://space.bilibili.com/381992209&quot;&gt;rickroll 摇&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;使用 Vercel 简单地部署 Waline 评论系统&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;UP 主：&lt;a href=&quot;https://space.bilibili.com/355877984&quot;&gt;岚天呀&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;以上为部分修改原文&lt;/h2&gt;
&lt;p&gt;原文链接: &lt;a href=&quot;https://waline.js.org/guide/get-started/&quot;&gt;https://waline.js.org/guide/get-started/&lt;/a&gt;&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Mon, 14 Apr 2025 00:00:00 GMT</pubDate></item><item><title>Umami博客访问统计Vercel+Cloudflare Wokers部署</title><link>https://boke.zsx815.top/post/umami-free-deploy/</link><guid isPermaLink="true">https://boke.zsx815.top/post/umami-free-deploy/</guid><description>Umami博客访问统计Vercel+Cloudflare Wokers部署教程，附带效果图展示。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/umami-free-deploy/&quot;&gt;https://boke.zsx815.top/post/umami-free-deploy/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;第一部分：Vercel+Umami&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;第一步
 1.1 &lt;kbd&gt;Fork&lt;/kbd&gt;​&lt;a href=&quot;https://github.com/umami-software/umami&quot;&gt;umami&lt;/a&gt;到自己的Github仓库&lt;/p&gt;
&lt;p&gt; &lt;img src=&quot;https://s2.loli.net/2025/04/06/c4xDVNrsBpTM8YZ.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt; 1.2 创建项目&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/GX9OdivuxF5pJzH.webp&quot; alt=&quot;&quot;&gt;
index.mdx
2. 第二步&lt;/p&gt;
&lt;p&gt;　2.1 创建&lt;a href=&quot;https://vercel.com/login&quot;&gt;Verce&lt;/a&gt;l账号，这里我就省略了，因为GitHub可以直接进行授权即可。&lt;/p&gt;
&lt;p&gt;   2.2 在你授权以后，首先创建&lt;kbd&gt;Postgres&lt;/kbd&gt;数据库，直接一路下一步，创建好就行，可以给下面的连接复制出来&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/K69FpfmjZxcu3Ad.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/7OieEKGht4kgSux.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　点击&lt;kbd&gt;Copy Snippet&lt;/kbd&gt;​,就可以，记住在粘贴的时候是我画线里面的部分，双引号都不需要 ，因为要设置环境变量。&lt;/p&gt;
&lt;p&gt;　　 2.3 在创建好数据库以后，回到主页面的&lt;kbd&gt;Overview&lt;/kbd&gt;​，然后右上角有一个&lt;kbd&gt;Add New&lt;/kbd&gt;​选择添加&lt;kbd&gt;Project&lt;/kbd&gt;​，选择你&lt;kbd&gt;Fork&lt;/kbd&gt;​的&lt;kbd&gt;umami&lt;/kbd&gt;​，添加即可。
    2.4 设置环境变量，&lt;code&gt;DATABASE_URL&lt;/code&gt;​和&lt;code&gt;HASH_SALT&lt;/code&gt;​和&lt;code&gt;TRACKER_SCRIPT_NAME&lt;/code&gt;​，其中&lt;code&gt;DATABASE_URL&lt;/code&gt;​的值就是上面划线的部分，其他的两个环境变量都是对应的值是String自己可以随意定义。
　　 2.5 设置好以后点击&lt;kbd&gt;Deploy&lt;/kbd&gt;​，等待大约两分钟左右，自动部署完成，部署完成以后可以通过下图种面板上面给的链接可以直接访问。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/ahX2wHLrfYAD7ZW.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　 2.6 打开以后会跳出登录地址，默认的登录密码是&lt;kbd&gt;adminumami&lt;/kbd&gt;​，登录进去以后，设置给自己密码修改了，然后就是设置里面添加网站，给你要统计的网站添加进去，到此，别人访问你的网站你可以通过面板看到统计数据了。&lt;/p&gt;
&lt;h2&gt;第二部分：Umami+Cloudflare worker&lt;/h2&gt;
&lt;p&gt;这一部分主要是让你的博客上面能展示的访问数据，效果如下：&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/fR71aFG4oMD29Pz.webp&quot; alt=&quot;image&quot;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;注册&lt;kbd&gt;CloudFlare&lt;/kbd&gt;​账号，然后进去以后，选择&lt;kbd&gt;Workers&lt;/kbd&gt;​和&lt;kbd&gt;Pages&lt;/kbd&gt;​，点击&lt;kbd&gt;创建&lt;/kbd&gt;​，再点击&lt;kbd&gt;部署&lt;/kbd&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/CYojqdGHkiuFepQ.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/6B2rXxk4Uu71GQC.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　部署以后，进去点击编辑代码，将里面的代码进行替换：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;addEventListener(&amp;#39;fetch&amp;#39;, event =&amp;gt; {
  event.respondWith(handleRequest(event));
});

const API_BASE_URL = &amp;#39;https://umami.yourdomain.com&amp;#39;;  // 替换你的刚才部署的umami的域名
const TOKEN = &amp;#39;your_token&amp;#39;; // 获取的token
const WEBSITE_ID = &amp;#39;your_website_id&amp;#39;; // 在umami添加网站的 webstie id
const CACHE_KEY = &amp;#39;umami_cache&amp;#39;;
const CACHE_TIME = 600; // Cache time in seconds

async function fetchUmamiData(startAt, endAt) {
  const url = `${API_BASE_URL}/api/websites/${WEBSITE_ID}/stats?startAt=${startAt}&amp;amp;endAt=${endAt}`;
  const response = await fetch(url, {
    headers: {
      &amp;#39;Authorization&amp;#39;: `Bearer ${TOKEN}`,
      &amp;#39;Content-Type&amp;#39;: &amp;#39;application/json&amp;#39;
    }
  });

  if (!response.ok) {
    console.error(`Error fetching data: ${response.statusText}`);
    return null;
  }

  return response.json();
}

async function handleRequest(event) {
  const cache = await caches.open(CACHE_KEY);
  const cachedResponse = await cache.match(event.request);

  if (cachedResponse) {
    return cachedResponse;
  }

  const now = Date.now();
  const todayStart = new Date(now).setHours(0, 0, 0, 0);
  const yesterdayStart = new Date(now - 86400000).setHours(0, 0, 0, 0);
  const lastMonthStart = new Date(now).setMonth(new Date(now).getMonth() - 1);
  const lastYearStart = new Date(now).setFullYear(new Date(now).getFullYear() - 1);

  const [todayData, yesterdayData, lastMonthData, lastYearData] = await Promise.all([
    fetchUmamiData(todayStart, now),
    fetchUmamiData(yesterdayStart, todayStart),
    fetchUmamiData(lastMonthStart, now),
    fetchUmamiData(lastYearStart, now)
  ]);

  const responseData = {
    today_uv: todayData?.visitors?.value ?? null,
    today_pv: todayData?.pageviews?.value ?? null,
    yesterday_uv: yesterdayData?.visitors?.value ?? null,
    yesterday_pv: yesterdayData?.pageviews?.value ?? null,
    last_month_pv: lastMonthData?.pageviews?.value ?? null,
    last_year_pv: lastYearData?.pageviews?.value ?? null
  };

  const jsonResponse = new Response(JSON.stringify(responseData), {
    headers: {
      &amp;#39;Content-Type&amp;#39;: &amp;#39;application/json&amp;#39;,
      &amp;#39;Access-Control-Allow-Origin&amp;#39;: &amp;#39;*&amp;#39;,
      &amp;#39;Access-Control-Allow-Methods&amp;#39;: &amp;#39;GET, POST, PUT, DELETE, OPTIONS&amp;#39;,
      &amp;#39;Access-Control-Allow-Headers&amp;#39;: &amp;#39;Content-Type, Authorization&amp;#39;
    }
  });

  event.waitUntil(cache.put(event.request, jsonResponse.clone()));

  return jsonResponse;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　但是里面有几个比较重要的参数需要修改&lt;code&gt;API_BASE_URL&lt;/code&gt;​、&lt;code&gt;TOKEN&lt;/code&gt;​、&lt;code&gt;WEBSITE_ID&lt;/code&gt;​其中&lt;code&gt;API_BASE_URL&lt;/code&gt;​和&lt;code&gt;WEBSITE_ID&lt;/code&gt;​已经是有的，&lt;code&gt;WEBSITE_ID&lt;/code&gt;​在&lt;kbd&gt;umami&lt;/kbd&gt;​中的设置，选择你已经添加好的网站，点击&lt;kbd&gt;编辑&lt;/kbd&gt;​，会出现网站的&lt;code&gt;WEBSITE_ID&lt;/code&gt;​：&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/eFHEYB45nQOUAML.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　 2.2 获取&lt;kbd&gt;token&lt;/kbd&gt;​，在想&lt;kbd&gt;api&lt;/kbd&gt;​测试网站，&lt;a href=&quot;https://hoppscotch.io/&quot;&gt;hoppscotch&lt;/a&gt;，跳转到这个页面以后，如下图所示&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/06/vXrQmtpu4HdIasN.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　  2.2.1 请求方式选择&lt;kbd&gt;post&lt;/kbd&gt;​，链接填写方式是：&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://你的umami域名或者是链接/api/auth/login
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　  2.2.2 请求体选择&lt;kbd&gt;Body&lt;/kbd&gt;​参数格式选择&lt;kbd&gt;application/json&lt;/kbd&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
 &amp;quot;username&amp;quot;:&amp;quot;用户名&amp;quot;,
 &amp;quot;password&amp;quot;:&amp;quot;密码&amp;quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　  2.2.3 返回结果中&lt;kbd&gt;token&lt;/kbd&gt;​里面的内容就是需要的&lt;kbd&gt;token&lt;/kbd&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;token&amp;quot;: &amp;quot;你的token&amp;quot;, # 你需要记录下来的内容
  &amp;quot;user&amp;quot;: {
    &amp;quot;id&amp;quot;: &amp;quot;41e2b680-648e-4b09-bcd7-3e2b10c06264&amp;quot;,
    &amp;quot;username&amp;quot;: &amp;quot;admin&amp;quot;,
    &amp;quot;role&amp;quot;: &amp;quot;admin&amp;quot;,
    &amp;quot;createdAt&amp;quot;: &amp;quot;2024-11-12T09:18:12.766Z&amp;quot;,
    &amp;quot;isAdmin&amp;quot;: true
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　到这里，你部署&lt;code&gt;api&lt;/code&gt;​所需要的所有参数内容都已经有了，给替换进去即可。&lt;/p&gt;
&lt;p&gt;　　 2.3 测试在你部署好以后，会有一个链接，当然你如果是用&lt;kbd&gt;cloudflare&lt;/kbd&gt;​代理你的域名，可以直接进行关联。&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/07/IPCS2rhLbiaX3G8.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　然后点击或则是复制粘贴到浏览器，请求以后会出来下面的结果：&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://s2.loli.net/2025/04/07/M9wsiYKBoGyLI8T.webp&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;　　如果没有结果，建议你先去你部署的umami面板里面看看有没有数据，有数据的情况下，这里请求都会有数据的，清理浏览器缓存开代理在测试。&lt;/p&gt;
&lt;h2&gt;第三部分：添加博客统计&lt;/h2&gt;
&lt;p&gt;　　将数据添加到&lt;kbd&gt;about&lt;/kbd&gt;​页面&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;tj: # 统计
  provider: custom # custom
  url: 你的数据接口地址
  img: https://7.isyangs.cn/1/65eb2e9109826-1.png # 背景
  desc: # 卡片左下角描述
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　配置完成~&lt;/p&gt;
&lt;p&gt;　　感谢&lt;a href=&quot;https://blog.starsharbor.com/&quot;&gt;starsharbor&lt;/a&gt;大佬博客的指导，&lt;a href=&quot;https://blog.starsharbor.com/posts/solitude-about_umami/&quot;&gt;原文&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;作者原文&lt;/h2&gt;
&lt;p&gt;作者: Couture
链接: &lt;a href=&quot;https://www.coutures.top/posts/27233.html&quot;&gt;https://www.coutures.top/posts/27233.html&lt;/a&gt;
来源: Couture
著作权归作者所有。 商业转载请联系作者获得授权，非商业转载请注明出处。&lt;/p&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Mon, 07 Apr 2025 00:00:00 GMT</pubDate></item><item><title>Git 同步上游仓库的更新</title><link>https://boke.zsx815.top/post/git-tongbu/</link><guid isPermaLink="true">https://boke.zsx815.top/post/git-tongbu/</guid><description>使用一个 Github Template 创建了我自己的仓库，需要同步一下补丁更新，总不能自己手抄一遍吧，搜了一下解决方案。记录一下。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/git-tongbu/&quot;&gt;https://boke.zsx815.top/post/git-tongbu/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;Git 同步上游仓库的更新&lt;/h2&gt;
&lt;p&gt;　　使用一个 Github Template 创建了我自己的仓库，需要同步一下补丁更新，总不能自己手抄一遍吧，搜了一下解决方案。&lt;/p&gt;
&lt;p&gt;　　记录一下。&lt;/p&gt;
&lt;h3&gt;添加上游仓库&lt;/h3&gt;
&lt;p&gt;　　给上游仓库取个名字，如果将命名为 &lt;code&gt;upstream&lt;/code&gt;​ ，可以在本地仓库中运行以下命令：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git remote add upstream https://github.com/$&amp;lt;upstream-repo&amp;gt;.git
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;获取上游仓库的更改&lt;/h3&gt;
&lt;p&gt;　　运行以下命令以获取上游仓库中的所有分支和提交：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git fetch upstream
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;合并上游更改&lt;/h3&gt;
&lt;p&gt;　　现在，将上游 main 分支的更改合并到您的本地 main 分支：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git merge upstream/main --allow-unrelated-histories
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　如果只需要合并特定的 commit ：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git cherry-pick &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　也可以使用&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;gcp &amp;lt;commit-hash&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　commit-hash 可以直接从 github 网页上复制。&lt;/p&gt;
&lt;p&gt;　　这时 commit 的作者是源仓库的作者， Vercel 提示我 Build 失败，需要升级到 Pro，可以再修改一个文件，自己添加一条 commit 。&lt;/p&gt;
&lt;p&gt;　　当然这很不优雅，可以使用下面的命令获取更改到文件，但是不会提交 commit ，&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git cherry-pick &amp;lt;commit-hash&amp;gt; --no-commit
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　然后手动提交一下&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git commit -m &amp;quot;commit information&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;解决冲突&lt;/h3&gt;
&lt;p&gt;　　如何自己已经修改过源代码，在合并过程中可能发生冲突，需要手动解决。&lt;br&gt;Git 也会进行提示，手动编辑冲突文件并保存，然后再提交更改。&lt;/p&gt;
&lt;h3&gt;批量提交&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git cherry-pick &amp;lt;起始提交&amp;gt;^..&amp;lt;结束提交&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　如果有冲突会按照顺序处理，然后执行， continue 直到结束&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git cherry-pick --continue
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;​&lt;code&gt;&amp;lt;起始提交&amp;gt;&lt;/code&gt;​：范围的开始点（不包含此提交，除非用 &amp;lt;起始提交&amp;gt;~ 或 &amp;lt;起始提交&amp;gt;^）。&lt;/li&gt;
&lt;li&gt;​&lt;code&gt;&amp;lt;结束提交&amp;gt;&lt;/code&gt;​：范围的结束点（包含此提交）。&lt;/li&gt;
&lt;li&gt;​&lt;code&gt;^&lt;/code&gt;​ 是 Git 的语法，用于指定“之前的提交”。&lt;/li&gt;
&lt;li&gt;​&lt;code&gt;..&lt;/code&gt;​ 表示范围。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;推送&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;　　当然默认来说，并不会推送到新加入的 &lt;code&gt;upstream&lt;/code&gt;​ ，直接 &lt;code&gt;git push&lt;/code&gt;​ 即可&lt;/p&gt;
&lt;p&gt;　　如果不再需要同步，可以删除上游的仓库&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;git remote remove upstream
&lt;/code&gt;&lt;/pre&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Fri, 04 Apr 2025 00:00:00 GMT</pubDate></item><item><title>Markdown 段落语法</title><link>https://boke.zsx815.top/post/markdown-duanluo/</link><guid isPermaLink="true">https://boke.zsx815.top/post/markdown-duanluo/</guid><description>Markdown 段落语法，如何创建段落以及最佳实践</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/markdown-duanluo/&quot;&gt;https://boke.zsx815.top/post/markdown-duanluo/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;原文位置: &lt;a href=&quot;https://markdown.com.cn/basic-syntax/paragraphs.html&quot;&gt;https://markdown.com.cn/basic-syntax/paragraphs.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Markdown 段落&lt;/h2&gt;
&lt;p&gt;要创建段落，请使用空白行将一行或多行文本进行分隔。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Markdown语法&lt;/th&gt;
&lt;th&gt;HTML&lt;/th&gt;
&lt;th&gt;预览效果&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;I really like using Markdown.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;p&amp;gt;I really like using Markdown.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;I really like using Markdown.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;I think I&amp;#39;ll use it to format all of my documents from now on.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;lt;p&amp;gt;I think I&amp;#39;ll use it to format all of my documents from now on.&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;p&gt;I think I&amp;#39;ll use it to format all of my documents from now on.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;段落（Paragraph）用法的最佳实践&lt;/h2&gt;
&lt;p&gt;不要用空格（spaces）或制表符（ tabs）缩进段落。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;✅  Do this&lt;/th&gt;
&lt;th&gt;❌  Don&amp;#39;t do this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Don&amp;#39;t put tabs or spaces in front of your paragraphs.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;    This can result in unexpected formatting problems.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Keep lines left-aligned like this.&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;  Don&amp;#39;t add tabs or spaces in front of paragraphs.&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Thu, 13 Feb 2025 00:00:00 GMT</pubDate></item><item><title>Markdown-标题语法 | 技术分享</title><link>https://boke.zsx815.top/post/markdown-biaotiyufa/</link><guid isPermaLink="true">https://boke.zsx815.top/post/markdown-biaotiyufa/</guid><description>记录 Markdown 语法的标题语法,方便学习和查找。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/markdown-biaotiyufa/&quot;&gt;https://boke.zsx815.top/post/markdown-biaotiyufa/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;原文位置: &lt;a href=&quot;https://markdown.com.cn/basic-syntax/headings.html&quot;&gt;https://markdown.com.cn/basic-syntax/headings.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;Markdown 标题语法&lt;/h1&gt;
&lt;p&gt;要创建标题，请在单词或短语前面添加井号 (#) 。&lt;code&gt;#&lt;/code&gt; 的数量代表了标题的级别。例如，添加三个 &lt;code&gt;#&lt;/code&gt; 表示创建一个三级标题 (&lt;code&gt;&amp;lt;h3&amp;gt;&lt;/code&gt;) (例如：&lt;code&gt;### My Header&lt;/code&gt;)。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Markdown语法&lt;/th&gt;
&lt;th&gt;HTML&lt;/th&gt;
&lt;th&gt;预览效果&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;# Heading level 1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h1&amp;gt;Heading level 1&amp;lt;/h1&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h1&gt;Heading level 1&lt;/h1&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;## Heading level 2&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h2&amp;gt;Heading level 1&amp;lt;/h2&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h2&gt;Heading level 2&lt;/h2&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;### Heading level 3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h3&amp;gt;Heading level 1&amp;lt;/h3&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h3&gt;Heading level 3&lt;/h3&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;#### Heading level 4&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h4&amp;gt;Heading level 1&amp;lt;/h4&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h4&gt;Heading level 4&lt;/h4&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;##### Heading level 5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h5&amp;gt;Heading level 1&amp;lt;/h5&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h5&gt;Heading level 5&lt;/h5&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;###### Heading level 6&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h6&amp;gt;Heading level 1&amp;lt;/h6&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h6&gt;Heading level 6&lt;/h6&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;可选语法&lt;/h2&gt;
&lt;p&gt;还可以在文本下方添加任意数量的 == 号来标识一级标题，或者 -- 号来标识二级标题。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Markdown语法&lt;/th&gt;
&lt;th&gt;HTML&lt;/th&gt;
&lt;th&gt;&lt;div style=&quot;width:100px;&quot;&gt;预览效果&lt;/div&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Heading level 1&lt;/code&gt;&lt;br /&gt;&lt;code&gt;===============&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h1&amp;gt;Heading level 1&amp;lt;/h1&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h1&gt;Heading level 1&lt;/h1&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Heading level 2&lt;/code&gt;&lt;br /&gt;&lt;code&gt;---------------&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&amp;lt;h2&amp;gt;Heading level 2&amp;lt;/h2&amp;gt;&lt;/td&gt;
&lt;td&gt;&lt;h2&gt;Heading level 2&lt;/h2&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;最佳实践&lt;/h2&gt;
&lt;p&gt;不同的 &lt;strong&gt;Markdown&lt;/strong&gt; 应用程序处理 &lt;code&gt;#&lt;/code&gt; 和标题之间的空格方式并不一致。为了兼容考虑，请用一个空格在 &lt;code&gt;#&lt;/code&gt; 和标题之间进行分隔。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;✅  Do this&lt;/th&gt;
&lt;th&gt;❌  Don&amp;#39;t do this&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;&lt;code&gt;# Here&amp;#39;s a Heading&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;#Here&amp;#39;s a Heading&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Wed, 12 Feb 2025 00:00:00 GMT</pubDate></item><item><title>Markdown-速查表</title><link>https://boke.zsx815.top/post/markdown-suchabiao/</link><guid isPermaLink="true">https://boke.zsx815.top/post/markdown-suchabiao/</guid><description>记录 Markdown 的用法，便于查找。</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://boke.zsx815.top/post/markdown-suchabiao/&quot;&gt;https://boke.zsx815.top/post/markdown-suchabiao/&lt;/a&gt;&lt;/blockquote&gt; &lt;blockquote&gt;
&lt;p&gt;原文位置: &lt;a href=&quot;https://markdown.com.cn/cheat-sheet.html#%E6%80%BB%E8%A7%88&quot;&gt;https://markdown.com.cn/cheat-sheet.html#%E6%80%BB%E8%A7%88&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h1&gt;总览&lt;/h1&gt;
&lt;p&gt;Markdown 速查表提供了所有 &lt;strong&gt;Markdown&lt;/strong&gt;
语法元素的基本解释。如果你想了解某些语法元素的更多信息，请参阅更详细的
&lt;strong&gt;基本语法&lt;/strong&gt; 和 &lt;strong&gt;扩展语法&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;基本语法&lt;/h2&gt;
&lt;p&gt;这些是 &lt;strong&gt;John Gruber&lt;/strong&gt; 的原始设计文档中列出的元素。所有 &lt;strong&gt;Markdown&lt;/strong&gt;
应用程序都支持这些元素。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;元素&lt;/th&gt;
&lt;th&gt;Markdown 语法&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td&gt;标题（Heading）&lt;/td&gt;
&lt;td&gt;\ # H1 一级标题&lt;br /&gt; \ ## H2 二级标题&lt;br /&gt; \ ### H3 三级标题&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;粗体（Bold）&lt;/td&gt;
&lt;td&gt;**bold text**&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;斜体（Italic）&lt;/td&gt;
&lt;td&gt;*italicized text*&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;引用块（Blockquote）&lt;/td&gt;
&lt;td&gt;&amp;gt; blockquote&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;有序列表（Ordered List）&lt;/td&gt;
&lt;td&gt;1. First item&lt;br /&gt; 2. Second item&lt;br /&gt; 3. Third item&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;无序列表（Unordered List）&lt;/td&gt;
&lt;td&gt;- First item&lt;br /&gt; - Second item&lt;br /&gt; - Third item&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;代码（Code）&lt;/td&gt;
&lt;td&gt;`code`&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;分隔线（Horizontal Rule）&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;链接（Link）&lt;/td&gt;
&lt;td&gt;[title](&lt;a href=&quot;https://www.example.com&quot;&gt;https://www.example.com&lt;/a&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;图片（Image）&lt;/td&gt;
&lt;td&gt;![alt text](image.jpg)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;扩展语法&lt;/h2&gt;
&lt;p&gt;这些元素通过添加额外的功能扩展了基本语法。但是，并非所有 &lt;strong&gt;Markdown&lt;/strong&gt;
应用程序都支持这些元素。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&quot;center&quot;&gt;元素&lt;/th&gt;
&lt;th align=&quot;left&quot;&gt;Markdown 语法&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;表格（Table）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;&lt;code&gt;| Syntax | Description |&lt;/code&gt;&lt;br /&gt;&lt;code&gt;| -----------  |  -----------  |&lt;/code&gt;&lt;br /&gt;&lt;code&gt;| Header  |  Title  |&lt;/code&gt;&lt;br /&gt;&lt;code&gt;| Paragraph | Text |&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;代码块（Fenced Code Block）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;&lt;code&gt;```&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;quot;firstName&amp;quot;: &amp;quot;John&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;quot;lastName&amp;quot;: &amp;quot;Smith&amp;quot;,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;quot;age&amp;quot;: 25&lt;/code&gt;&lt;br&gt; &lt;code&gt;}&lt;/code&gt;&lt;br&gt; &lt;code&gt;```&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;脚注（Footnote）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;Here’s a sentence with a footnote.&lt;code&gt;[^1]&lt;/code&gt;&lt;br /&gt;&lt;code&gt;[^1]&lt;/code&gt;: This is the footnote.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;标题编号（Heading ID）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;\ ### My Great Heading{#custom-id}&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;定义列表（Definition List）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;term&lt;br /&gt;: definition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td align=&quot;center&quot;&gt;任务列表（Task List）&lt;/td&gt;
&lt;td align=&quot;left&quot;&gt;&lt;code&gt;- [x] Write the press release&lt;/code&gt;&lt;br /&gt;&lt;code&gt;- [ ] Update the website&lt;/code&gt;&lt;br /&gt;&lt;code&gt;- [ ] Contact the media&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
</content:encoded><dc:creator>ZSXの小站</dc:creator><pubDate>Tue, 11 Feb 2025 00:00:00 GMT</pubDate></item></channel></rss>