<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>技术分享 on 博客主页</title>
    <link>https://jaxon.ccwu.cc/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/</link>
    <description>Recent content in 技术分享 on 博客主页</description>
    <generator>Hugo</generator>
    <language>zh</language>
    <lastBuildDate>Tue, 28 Apr 2026 08:00:00 +0800</lastBuildDate>
    <atom:link href="https://jaxon.ccwu.cc/categories/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>免服务器 Hugo &#43; Github &#43; Cloudflare 个人网站（静态网页）部署</title>
      <link>https://jaxon.ccwu.cc/posts/hogo/</link>
      <pubDate>Tue, 28 Apr 2026 08:00:00 +0800</pubDate>
      <guid>https://jaxon.ccwu.cc/posts/hogo/</guid>
      <description>&lt;h4 id=&#34;摘要&#34;&gt;&#xA;  摘要&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%91%98%e8%a6%81&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;本地 hugo 搭建静态页面&lt;/li&gt;&#xA;&lt;li&gt;上传至 github 托管&lt;/li&gt;&#xA;&lt;li&gt;部署至 cloudflare page 或 cloudflare worker&lt;/li&gt;&#xA;&lt;li&gt;（可选）自定义网页域名&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;前置条件&#34;&gt;&#xA;  前置条件&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e5%89%8d%e7%bd%ae%e6%9d%a1%e4%bb%b6&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Git&lt;/li&gt;&#xA;&lt;li&gt;已有 Github、Cloudflare 账号&lt;/li&gt;&#xA;&lt;li&gt;科学上网&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h4 id=&#34;一本地搭建静态页面&#34;&gt;&#xA;  一、本地搭建静态页面&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e4%b8%80%e6%9c%ac%e5%9c%b0%e6%90%ad%e5%bb%ba%e9%9d%99%e6%80%81%e9%a1%b5%e9%9d%a2&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;安装 hugo：winget &lt;font style=&#34;color:rgb(0, 81, 194);&#34;&gt;install&lt;/font&gt; Hugo.Hugo.Extended&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;手动安装：&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/gohugoio/hugo/releases/download/v0.157.0/hugo_extended_0.157.0_windows-amd64.zip&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://github.com/gohugoio/hugo/releases/download/v0.157.0/hugo_extended_0.157.0_windows-amd64.zip&lt;/a&gt;，解压到合适位置，把解压后的 hugo.exe 所在路径添加到环境变量 path，用 hugo version 验证&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;创建 hugo 项目：hugo new site pblog&lt;/li&gt;&#xA;&lt;li&gt;进入项目：cd pblog&lt;/li&gt;&#xA;&lt;li&gt;复制主题：git clone &lt;a href=&#34;https://github.com/luizdepra/hugo-coder.git&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://github.com/luizdepra/hugo-coder.git&lt;/a&gt; themes/hugo-coder&lt;/li&gt;&#xA;&lt;li&gt;配置 hugo.toml，可以使用主题作者提供的示例&lt;/li&gt;&#xA;&lt;li&gt;启动本地预览：hugo server 默认在  &lt;a href=&#34;http://localhost:1313/&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;http://localhost:1313/&lt;/a&gt; 查看&lt;/li&gt;&#xA;&lt;li&gt;删掉主题库 .git：rmdir /s /q themes\hugo-coder.git，避免影响后续推送&lt;/li&gt;&#xA;&lt;li&gt;运行 hugo 验证是否可以成功构建：hugo&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h4 id=&#34;二托管至-github&#34;&gt;&#xA;  二、托管至 Github&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e4%ba%8c%e6%89%98%e7%ae%a1%e8%87%b3-github&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;git init&lt;/li&gt;&#xA;&lt;li&gt;git add .&lt;/li&gt;&#xA;&lt;li&gt;git commit -m &amp;ldquo;Initial&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;在 Github 上创建一个仓库，可以是私有仓库，设置本地项目 Git 远程地址到仓库：git remote add origin &lt;a href=&#34;https://github.com/AlightSoulmate/hugo-demo.git&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;https://github.com/&lt;your-name&gt;/&lt;your-repo&gt;.git&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;git push -u origin master 或 git push -u origin main&lt;/li&gt;&#xA;&lt;li&gt;到仓库验证本地代码已推送&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h4 id=&#34;三部署至-cloudflare-pages&#34;&gt;&#xA;  三、部署至 Cloudflare Pages&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e4%b8%89%e9%83%a8%e7%bd%b2%e8%87%b3-cloudflare-pages&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;进入 Cloudflare - 构建 - Compute - Workers 和 Pages 页面，点击创建应用程序，选择 Pages。首次使用时，需要绑定和授权 Github 账号&lt;/li&gt;&#xA;&lt;li&gt;在创建应用程序页面，选择要部署的项目对应仓库，选择静态框架为 hugo，快速部署，完成后使用 Cloudflare Pages 提供的默认域名访问网页&lt;/li&gt;&#xA;&lt;li&gt;如构建失败，可能是 Hugo 版本差异，需要指定 HUGO_VERSION  环境变量&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h4 id=&#34;四自定义域名&#34;&gt;&#xA;  四、自定义域名&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e5%9b%9b%e8%87%aa%e5%ae%9a%e4%b9%89%e5%9f%9f%e5%90%8d&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h4&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;在 Cloudflare 或阿里云等国内云服务商购买域名，（不要购买 .cn 域名）若在 Cloudflare 外购买，需要在 Cloudflare 域名页面添加域名，按照提示修改 DNS 服务器，添加 DNS 记录，为顶级域名和 www 子域名添加两个 CNAME 记录&lt;/li&gt;&#xA;&lt;li&gt;在 Workers 和 Pages 页面刚刚部署的项目页添加自定义域名，需要等待较长时间&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
    <item>
      <title>✍️ 汉字笔顺动画演示</title>
      <link>https://jaxon.ccwu.cc/posts/hanzi-writer/</link>
      <pubDate>Thu, 16 Apr 2026 08:00:00 +0800</pubDate>
      <guid>https://jaxon.ccwu.cc/posts/hanzi-writer/</guid>
      <description>&lt;h2 id=&#34;让汉字动起来&#34;&gt;&#xA;  让汉字动起来&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e8%ae%a9%e6%b1%89%e5%ad%97%e5%8a%a8%e8%b5%b7%e6%9d%a5&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;这是一款用于展示汉字笔画顺序和交互式书写练习的 JavaScript 库。&lt;/p&gt;&#xA;&lt;div style=&#34;text-align:center;margin:20px&#34;&gt;&#xA;  &lt;input type=&#34;text&#34; id=&#34;charInput&#34; value=&#34;我&#34; maxlength=&#34;1&#34; style=&#34;padding:8px;font-size:16px;width:60px&#34;&gt;&#xA;  &lt;button onclick=&#34;updateChar()&#34; style=&#34;padding:8px 16px;margin-left:10px&#34;&gt;更新&lt;/button&gt;&#xA;  &lt;button onclick=&#34;playAnimation()&#34; style=&#34;padding:8px 16px;margin-left:10px;background:#007bff;color:#fff;border:none&#34;&gt;播放动画&lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&lt;div id=&#34;animationContainer&#34; style=&#34;width:300px;height:300px;margin:20px auto;border:1px solid #ddd&#34;&gt;&lt;/div&gt;&#xA;&lt;div id=&#34;quizContainer&#34; style=&#34;width:300px;height:300px;margin:20px auto;border:1px solid #ddd&#34;&gt;&lt;/div&gt;&#xA;&lt;div style=&#34;text-align:center&#34;&gt;&#xA;  &lt;button onclick=&#34;startQuiz()&#34; style=&#34;padding:8px 16px&#34;&gt;开始练习&lt;/button&gt;&#xA;  &lt;button onclick=&#34;resetQuiz()&#34; style=&#34;padding:8px 16px;margin-left:10px&#34;&gt;重置&lt;/button&gt;&#xA;&lt;/div&gt;&#xA;&lt;script src=&#34;https://cdn.jsdelivr.net/npm/hanzi-writer@3.5/dist/hanzi-writer.min.js&#34;&gt;&lt;/script&gt;&#xA;&lt;script&gt;&#xA;let animationWriter = null;&#xA;let quizWriter = null;&#xA;let currentChar = &#39;我&#39;;&#xA;let totalMistakes = 0;&#xA;let correctStrokes = 0;&#xA;&#xA;function initWriters(char) {&#xA;  if (animationWriter) animationWriter.destroy();&#xA;  if (quizWriter) quizWriter.destroy();&#xA;  &#xA;  animationWriter = HanziWriter.create(&#39;animationContainer&#39;, char, {&#xA;    width: 280, height: 280, padding: 10,&#xA;    strokeColor: &#39;#007bff&#39;,&#xA;    outlineColor: &#39;#ddd&#39;,&#xA;    showOutline: true,&#xA;  });&#xA;  &#xA;  quizWriter = HanziWriter.create(&#39;quizContainer&#39;, char, {&#xA;    width: 280, height: 280, padding: 10,&#xA;    strokeColor: &#39;#28a745&#39;,&#xA;    outlineColor: &#39;#ddd&#39;,&#xA;    showCharacter: false,&#xA;    showOutline: true,&#xA;  });&#xA;  &#xA;  currentChar = char;&#xA;  totalMistakes = 0;&#xA;  correctStrokes = 0;&#xA;  setTimeout(() =&gt; playAnimation(), 500);&#xA;}&#xA;&#xA;function updateChar() {&#xA;  const char = document.getElementById(&#39;charInput&#39;).value;&#xA;  if (char &amp;&amp; char.length === 1) {&#xA;    initWriters(char);&#xA;  } else {&#xA;    alert(&#39;请输入一个汉字！&#39;);&#xA;  }&#xA;}&#xA;&#xA;function playAnimation() {&#xA;  if (animationWriter) animationWriter.animateCharacter();&#xA;}&#xA;&#xA;function startQuiz() {&#xA;  if (quizWriter) {&#xA;    quizWriter.quiz({&#xA;      onCorrectStroke: () =&gt; correctStrokes++,&#xA;      onMistake: () =&gt; totalMistakes++,&#xA;    });&#xA;  }&#xA;}&#xA;&#xA;function resetQuiz() {&#xA;  if (quizWriter) {&#xA;    quizWriter.destroy();&#xA;    initWriters(currentChar);&#xA;  }&#xA;}&#xA;&#xA;window.addEventListener(&#39;load&#39;, () =&gt; initWriters(&#39;我&#39;));&#xA;&lt;/script&gt;</description>
    </item>
  </channel>
</rss>
