<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>信息技术 on OHTLY Blog</title>
    <link>https://blog.ohtly.com/categories/%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF/</link>
    <description>Recent content in 信息技术 on OHTLY Blog</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    <lastBuildDate>Tue, 05 May 2026 16:30:00 +0800</lastBuildDate>
    <atom:link href="https://blog.ohtly.com/categories/%E4%BF%A1%E6%81%AF%E6%8A%80%E6%9C%AF/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hugo 博客配置 Mermaid 图表支持</title>
      <link>https://blog.ohtly.com/posts/hugo-mermaid-config/</link>
      <pubDate>Tue, 05 May 2026 16:30:00 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/hugo-mermaid-config/</guid>
      <description>&lt;h1 id=&#34;hugo-博客配置-mermaid-图表支持&#34;&gt;&#xA;  Hugo 博客配置 Mermaid 图表支持&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#hugo-%e5%8d%9a%e5%ae%a2%e9%85%8d%e7%bd%ae-mermaid-%e5%9b%be%e8%a1%a8%e6%94%af%e6%8c%81&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;p&gt;本文说明基于 hugo-coder 主题的博客如何集成 Mermaid 图表。&lt;/p&gt;&#xA;&lt;h2 id=&#34;前提条件&#34;&gt;&#xA;  前提条件&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e5%89%8d%e6%8f%90%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;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;使用支持 Mermaid shortcode 的 Hugo 主题（如 hugo-coder）&lt;/li&gt;&#xA;&lt;li&gt;主题的 &lt;code&gt;baseof.html&lt;/code&gt; 中包含以下逻辑：&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ if .HasShortcode &amp;#34;mermaid&amp;#34; }}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;src&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://cdn.jsdelivr.net/npm/mermaid@9.3.0/dist/mermaid.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;script&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#f92672&#34;&gt;script&lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;mermaid&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;initialize&lt;/span&gt;({&lt;span style=&#34;color:#a6e22e&#34;&gt;startOnLoad&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;true&lt;/span&gt;});&amp;lt;/&lt;span style=&#34;color:#f92672&#34;&gt;script&lt;/span&gt;&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ end }}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;正确写法&#34;&gt;&#xA;  正确写法&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%ad%a3%e7%a1%ae%e5%86%99%e6%b3%95&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;Mermaid 图表必须使用 Hugo Shortcode 语法，而非标准 Markdown 代码块：&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;类型&lt;/th&gt;&#xA;          &lt;th&gt;写法&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;✅ &lt;strong&gt;Shortcode&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;{{&amp;lt; mermaid &amp;gt;}} ... {{&amp;lt; /mermaid &amp;gt;}}&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;❌ &lt;strong&gt;Markdown 代码块&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;```mermaid ... ```&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;图表类型示例&#34;&gt;&#xA;  图表类型示例&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e5%9b%be%e8%a1%a8%e7%b1%bb%e5%9e%8b%e7%a4%ba%e4%be%8b&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;流程图&#34;&gt;&#xA;  流程图&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%b5%81%e7%a8%8b%e5%9b%be&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;mermaid&#34;&gt;&#xA;flowchart TD&#xA;    A[开始] --&gt; B{判断}&#xA;    B --&gt;|条件A| C[处理A]&#xA;    B --&gt;|条件B| D[处理B]&#xA;    C --&gt; E[结束]&#xA;    D --&gt; E&#xA;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;时序图&#34;&gt;&#xA;  时序图&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%97%b6%e5%ba%8f%e5%9b%be&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;mermaid&#34;&gt;&#xA;sequenceDiagram&#xA;    participant 客户端&#xA;    participant 服务器&#xA;    participant 数据库&#xA;&#xA;    客户端-&gt;&gt;服务器: 请求&#xA;    服务器-&gt;&gt;数据库: 查询&#xA;    数据库--&gt;&gt;服务器: 返回结果&#xA;    服务器--&gt;&gt;客户端: 响应&#xA;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;甘特图&#34;&gt;&#xA;  甘特图&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e7%94%98%e7%89%b9%e5%9b%be&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;mermaid&#34;&gt;&#xA;gantt&#xA;    title 项目计划&#xA;    dateFormat YYYY-MM-DD&#xA;    section 设计&#xA;    设计方案 :done, d1, 2026-05-01, 3d&#xA;    设计评审 :done, d2, after d1, 1d&#xA;    section 开发&#xA;    编码实现 :active, dev1, after d2, 5d&#xA;    单元测试 :dev2, after dev1, 2d&#xA;    section 部署&#xA;    部署上线 :deploy, after dev2, 1d&#xA;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;注意事项&#34;&gt;&#xA;  注意事项&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;必须使用 Hugo Shortcode 语法 &lt;code&gt;{{&amp;lt; mermaid &amp;gt;}}&lt;/code&gt;，不要用 &lt;code&gt;```mermaid&lt;/code&gt; Markdown 代码块&lt;/li&gt;&#xA;&lt;li&gt;编写时注意 Shortcode 前后各有一个空行，确保 Hugo 正确解析&lt;/li&gt;&#xA;&lt;li&gt;提交后等待 Cloudflare Pages 自动构建部署（约 1-2 分钟）&lt;/li&gt;&#xA;&lt;li&gt;如需本地预览，运行 &lt;code&gt;hugo server&lt;/code&gt; 后访问 &lt;code&gt;http://localhost:1313&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>智能监控技术方案：OpenClaw &#43; Prometheus &#43; Loki</title>
      <link>https://blog.ohtly.com/posts/2026-05-05-%E6%99%BA%E8%83%BD%E7%9B%91%E6%8E%A7%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/</link>
      <pubDate>Tue, 05 May 2026 13:30:00 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/2026-05-05-%E6%99%BA%E8%83%BD%E7%9B%91%E6%8E%A7%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/</guid>
      <description>&lt;h1 id=&#34;智能监控技术方案&#34;&gt;&#xA;  智能监控技术方案&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%99%ba%e8%83%bd%e7%9b%91%e6%8e%a7%e6%8a%80%e6%9c%af%e6%96%b9%e6%a1%88&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;概述&#34;&gt;&#xA;  概述&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%a6%82%e8%bf%b0&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;本文档描述基于开源组件构建的智能监控告警体系，实现从指标采集到飞书通知的完整告警流程。&lt;/p&gt;&#xA;&lt;h3 id=&#34;架构概览&#34;&gt;&#xA;  架构概览&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%9e%b6%e6%9e%84%e6%a6%82%e8%a7%88&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;告警处理流程&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;mermaid&#34;&gt;&#xA;flowchart TD&#xA;    A[&#34;node-exporter&lt;br/&gt;:9100&#34;]&#xA;    B[&#34;Prometheus&lt;br/&gt;:9090&#34;]&#xA;    C[&#34;Alertmanager&lt;br/&gt;:9093&#34;]&#xA;    D[&#34;alert-transformer&lt;br/&gt;:9091&#34;]&#xA;    E[&#34;OpenClaw&lt;br/&gt;:18789&#34;]&#xA;    F[&#34;飞书 Webhook&#34;]&#xA;    G[&#34;告警规则&lt;br/&gt;alerts.yml&#34;]&#xA;&#xA;    A --&gt;|指标采集| B&#xA;    B --&gt;|告警评估| C&#xA;    B -.-&gt;|加载| G&#xA;    C --&gt;|Webhook| D&#xA;    D --&gt;|格式转换| E&#xA;    E --&gt;|飞书通知| F&#xA;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;&lt;strong&gt;指标采集流程&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;div class=&#34;mermaid&#34;&gt;&#xA;flowchart LR&#xA;    subgraph 指标&#xA;        H[&#34;node-exporter&lt;br/&gt;:9100&#34;]&#xA;        I[&#34;Prometheus&lt;br/&gt;:9090&#34;]&#xA;        H --&gt;|&#34;Prometheus 抓取 (15s)&#34;| I&#xA;    end&#xA;    subgraph 日志&#xA;        J[&#34;Docker 日志&#34;]&#xA;        K[&#34;Alloy&lt;br/&gt;:12345&#34;]&#xA;        L[&#34;Loki&lt;br/&gt;:3100&#34;]&#xA;        J --&gt;|采集| K&#xA;        K --&gt;|发送| L&#xA;    end&#xA;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h3 id=&#34;组件职责&#34;&gt;&#xA;  组件职责&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e7%bb%84%e4%bb%b6%e8%81%8c%e8%b4%a3&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;组件&lt;/th&gt;&#xA;          &lt;th&gt;职责&lt;/th&gt;&#xA;          &lt;th&gt;端口&lt;/th&gt;&#xA;          &lt;th&gt;部署位置&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;node-exporter&lt;/td&gt;&#xA;          &lt;td&gt;系统指标采集 (CPU/内存/磁盘/网络)&lt;/td&gt;&#xA;          &lt;td&gt;9100&lt;/td&gt;&#xA;          &lt;td&gt;每台被监控主机&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Prometheus&lt;/td&gt;&#xA;          &lt;td&gt;指标抓取、存储、告警规则评估&lt;/td&gt;&#xA;          &lt;td&gt;9090&lt;/td&gt;&#xA;          &lt;td&gt;监控服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Alertmanager&lt;/td&gt;&#xA;          &lt;td&gt;告警去重、分组、路由、抑制&lt;/td&gt;&#xA;          &lt;td&gt;9093&lt;/td&gt;&#xA;          &lt;td&gt;监控服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;alert-transformer&lt;/td&gt;&#xA;          &lt;td&gt;告警格式转换为 OpenClaw API&lt;/td&gt;&#xA;          &lt;td&gt;9091&lt;/td&gt;&#xA;          &lt;td&gt;监控服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;OpenClaw&lt;/td&gt;&#xA;          &lt;td&gt;AI 决策、自然语言处理、飞书通知&lt;/td&gt;&#xA;          &lt;td&gt;18789&lt;/td&gt;&#xA;          &lt;td&gt;OpenClaw 服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Loki&lt;/td&gt;&#xA;          &lt;td&gt;日志存储和查询&lt;/td&gt;&#xA;          &lt;td&gt;3100&lt;/td&gt;&#xA;          &lt;td&gt;监控服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Alloy&lt;/td&gt;&#xA;          &lt;td&gt;Docker 日志采集&lt;/td&gt;&#xA;          &lt;td&gt;12345&lt;/td&gt;&#xA;          &lt;td&gt;监控服务器&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;部署配置&#34;&gt;&#xA;  部署配置&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e9%83%a8%e7%bd%b2%e9%85%8d%e7%bd%ae&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;node-exporter-部署&#34;&gt;&#xA;  node-exporter 部署&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#node-exporter-%e9%83%a8%e7%bd%b2&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;每台被监控主机部署 node-exporter，建议使用 Docker Compose：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Elasticsearch IK 中文分词索引环境的部署</title>
      <link>https://blog.ohtly.com/posts/2026-04-16-elasticsearch-ik/</link>
      <pubDate>Thu, 16 Apr 2026 19:30:00 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/2026-04-16-elasticsearch-ik/</guid>
      <description>&lt;h1 id=&#34;elasticsearch-中文分词索引环境的部署&#34;&gt;&#xA;  Elasticsearch 中文分词索引环境的部署&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#elasticsearch-%e4%b8%ad%e6%96%87%e5%88%86%e8%af%8d%e7%b4%a2%e5%bc%95%e7%8e%af%e5%a2%83%e7%9a%84%e9%83%a8%e7%bd%b2&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;背景&#34;&gt;&#xA;  背景&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e8%83%8c%e6%99%af&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;在 RAG（检索增强生成）和中文搜索场景中，Elasticsearch 默认的标准分词器无法正确处理中文文本，会将每个汉字单独切分，导致搜索效果极差。IK 分词器（analysis-ik）是 Elasticsearch 最流行的中文分词插件，支持两种分词模式：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ik_smart&lt;/code&gt;：最少切分（粗粒度），适合搜索场景&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ik_max_word&lt;/code&gt;：最细粒度切分，适合分析场景&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;本文记录在 Docker Compose 环境下部署带 IK 分词器的 Elasticsearch 单节点服务，并配置安全认证。&lt;/p&gt;&#xA;&lt;h2 id=&#34;版本选择说明&#34;&gt;&#xA;  版本选择说明&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e7%89%88%e6%9c%ac%e9%80%89%e6%8b%a9%e8%af%b4%e6%98%8e&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;为什么选择 Elasticsearch 8.x 而不是 9.x？&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;本文部署的是 Elasticsearch 8.17.4，主要原因是当时 IK 分词器尚未支持 Elasticsearch 9.x。&lt;/p&gt;&#xA;&lt;p&gt;根据 &lt;a href=&#34;https://github.com/infinilabs/analysis-ik&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;infinilabs/analysis-ik&lt;/a&gt; 官方发布页面的版本记录：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;IK 插件对 ES 8.x 的支持：持续更新到 8.19.x&lt;/li&gt;&#xA;&lt;li&gt;IK 插件对 ES 9.x 的支持：从 2025 年 5 月才陆续发布（9.0.0 于 2025-05-17 发布）&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;因此，在 2026 年初进行技术选型时，考虑到 IK 插件的稳定性和生态兼容性，选择了 ES 8.17.4。&lt;/p&gt;</description>
    </item>
    <item>
      <title>由 OpenClaw 驱动的自动化博客生产线</title>
      <link>https://blog.ohtly.com/posts/2026-04-03-%E7%94%B1openclaw%E9%A9%B1%E5%8A%A8%E7%9A%84%E8%87%AA%E5%8A%A8%E5%8D%9A%E5%AE%A2%E7%94%9F%E4%BA%A7%E7%BA%BF/</link>
      <pubDate>Fri, 03 Apr 2026 22:30:00 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/2026-04-03-%E7%94%B1openclaw%E9%A9%B1%E5%8A%A8%E7%9A%84%E8%87%AA%E5%8A%A8%E5%8D%9A%E5%AE%A2%E7%94%9F%E4%BA%A7%E7%BA%BF/</guid>
      <description>&lt;p&gt;笔记存在本地，由OpenClaw协助编写。如果再让它驱动 Hugo+GitHub+Cloudflare Pages，就可以再提炼出可分享可公开的博客日志。&lt;/p&gt;&#xA;&lt;h2 id=&#34;搭建步骤&#34;&gt;&#xA;  搭建步骤&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%90%ad%e5%bb%ba%e6%ad%a5%e9%aa%a4&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;h3 id=&#34;hugo-初始化&#34;&gt;&#xA;  Hugo 初始化&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#hugo-%e5%88%9d%e5%a7%8b%e5%8c%96&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;brew install hugo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo new site my-blog&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;cd my-blog&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git init&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;选用 &lt;a href=&#34;https://github.com/luizdepra/hugo-coder&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;hugo-coder&lt;/a&gt; 主题，支持中文，排版干净。&lt;/p&gt;&#xA;&lt;h3 id=&#34;本地写作流程&#34;&gt;&#xA;  本地写作流程&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%9c%ac%e5%9c%b0%e5%86%99%e4%bd%9c%e6%b5%81%e7%a8%8b&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo new content/posts/2026-04-03-my-first-post.md&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# 编辑文件，将 draft = true 改为 false&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;hugo server -D  &lt;span style=&#34;color:#75715e&#34;&gt;# 本地预览 http://localhost:1313&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;推送到-github&#34;&gt;&#xA;  推送到 GitHub&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e6%8e%a8%e9%80%81%e5%88%b0-github&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git remote add origin git@github.com:你的用户名/my-blog.git&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git add .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git commit -m &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;first post&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;git push&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;cloudflare-pages-接入&#34;&gt;&#xA;  Cloudflare Pages 接入&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#cloudflare-pages-%e6%8e%a5%e5%85%a5&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;登录 Cloudflare Dashboard → Workers &amp;amp; Pages → Create application → Pages&lt;/li&gt;&#xA;&lt;li&gt;Connect to GitHub，选择仓库&lt;/li&gt;&#xA;&lt;li&gt;Build 设置：&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Build command: &lt;code&gt;hugo&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Build output目录: &lt;code&gt;public&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;绑定自定义域名（如 blog.ohtly.com）&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;自动化发布&#34;&gt;&#xA;  自动化发布&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#%e8%87%aa%e5%8a%a8%e5%8c%96%e5%8f%91%e5%b8%83&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;以后只需：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello World - 用 Hugo 建博客</title>
      <link>https://blog.ohtly.com/posts/2026-04-03-hello-world/</link>
      <pubDate>Fri, 03 Apr 2026 19:30:00 +0800</pubDate>
      <guid>https://blog.ohtly.com/posts/2026-04-03-hello-world/</guid>
      <description>&lt;h2 id=&#34;hugo-初体验&#34;&gt;&#xA;  Hugo 初体验&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#hugo-%e5%88%9d%e4%bd%93%e9%aa%8c&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://gohugo.io/&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Hugo&lt;/a&gt; 是一个用 Go 语言写的静态网站生成器，速度极快，主题丰富，适合搭建博客、文档、个人站点。&lt;/p&gt;&#xA;&lt;p&gt;只需要一个 &lt;code&gt;hugo.toml&lt;/code&gt; 配置文件 + &lt;code&gt;content/&lt;/code&gt; 目录下的 Markdown 文件，几秒钟就能编译出完整的静态网站。&lt;/p&gt;&#xA;&lt;p&gt;部署流程：&lt;strong&gt;Hugo → GitHub → Cloudflare Pages&lt;/strong&gt;，完全自动化，域名和托管都不依赖任何单一平台，永久可访问。&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;hello-worldgo-语言&#34;&gt;&#xA;  Hello World（Go 语言）&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#hello-worldgo-%e8%af%ad%e8%a8%80&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;链接到标题&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;链接到标题&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;package&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;fmt&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;main&lt;/span&gt;() {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#a6e22e&#34;&gt;fmt&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Println&lt;/span&gt;(&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Hello, World!&amp;#34;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;运行：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go run hello.go&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;输出：&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Hello, World!&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;hr&gt;&#xA;&lt;p&gt;博客搭好了，接下来会陆续把一些可公开的笔记整理发上来。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
