<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>kelvin-luo</title>
    <description>研究方向为计算机视觉、机器学习、深度学习、人工智能等。</description>
    <link>http://kelvin-luo.github.io/</link>
    <atom:link href="http://kelvin-luo.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Tue, 28 Jul 2026 09:41:18 +0000</pubDate>
    <lastBuildDate>Tue, 28 Jul 2026 09:41:18 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>极简图像编辑工具   orchidimgediter功能介绍</title>
        <description>&lt;h1 id=&quot;极简图像编辑工具---orchidimgediter功能介绍&quot;&gt;极简图像编辑工具 - OrchidImgEditer功能介绍&lt;/h1&gt;

&lt;blockquote&gt;
  &lt;p&gt;一个轻量级、功能丰富的图像注释和编辑工具，为截图、标记、提取文字而生。&lt;/p&gt;

  &lt;p&gt;github主页：https://github.com/kelvin-luo/OrchidImgEditer.git&lt;/p&gt;
&lt;/blockquote&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;工具概述&quot;&gt;工具概述&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;OrchidImgEditergEditer&lt;/strong&gt; 是一个基于 C++、Qt 6 和 OpenCV 5 开发的跨平台图像编辑应用。它提供了一套直观的图像标注、处理和 OCR 文字提取功能，特别适合需要快速处理、批注、识别图像内容的用户。&lt;/p&gt;

&lt;h3 id=&quot;核心特性&quot;&gt;核心特性&lt;/h3&gt;

&lt;p&gt;✨ &lt;strong&gt;开箱即用&lt;/strong&gt; — 一键启动，直观的图形界面&lt;br /&gt;
🎨 &lt;strong&gt;丰富的绘图工具&lt;/strong&gt; — 直线、矩形、圆形、箭头、自由铅笔等&lt;br /&gt;
🔤 &lt;strong&gt;OCR 文字识别&lt;/strong&gt; — 内置 Tesseract 引擎，支持中英文识别&lt;br /&gt;
✂️ &lt;strong&gt;图像处理&lt;/strong&gt; — 裁剪、ROI 抠图、马赛克模糊&lt;br /&gt;
⚡ &lt;strong&gt;流畅的交互&lt;/strong&gt; — 实时缩放、撤销、颜色选择器&lt;br /&gt;
💾 &lt;strong&gt;灵活的保存&lt;/strong&gt; — 支持多种格式导出&lt;/p&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;核心功能详解&quot;&gt;核心功能详解&lt;/h2&gt;

&lt;h3 id=&quot;1--绘图与标注工具&quot;&gt;1. 📐 绘图与标注工具&lt;/h3&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;工具&lt;/th&gt;
      &lt;th&gt;功能&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;strong&gt;直线&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;画直线&lt;/td&gt;
      &lt;td&gt;连接关键点、标记方向&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;矩形&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;画矩形框&lt;/td&gt;
      &lt;td&gt;突出重点区域、创建边框&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;圆形&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;画圆形&lt;/td&gt;
      &lt;td&gt;圆形高亮、创建标记&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;箭头&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;带箭头的直线&lt;/td&gt;
      &lt;td&gt;指示方向、流程标记&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;铅笔&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;自由手绘&lt;/td&gt;
      &lt;td&gt;手写注释、随意涂鸦&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;文字&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;添加文本标签&lt;/td&gt;
      &lt;td&gt;注解、标题、说明文字&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;使用方式&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;工具栏中选择工具&lt;/li&gt;
  &lt;li&gt;在图像上点击或拖拽绘制&lt;/li&gt;
  &lt;li&gt;支持实时调整线宽、颜色&lt;/li&gt;
  &lt;li&gt;按 Ctrl+Z 撤销最后操作&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/2026-07-26-极简图像编辑工具 - OrchidImgEditer功能介绍.assets/捕获.PNG&quot; alt=&quot;捕获&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;2--ocr-文字识别&quot;&gt;2. 🔍 OCR 文字识别&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;OrchidImgEditergEditer&lt;/strong&gt; 集成了 &lt;strong&gt;Tesseract 5.4 OCR 引擎&lt;/strong&gt;，可快速从图像中提取文字。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;支持语言&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;✅ 简体中文&lt;/li&gt;
  &lt;li&gt;✅ 英文&lt;/li&gt;
  &lt;li&gt;✅ 其他 120+ 种语言（通过扩展语言包）&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;使用流程&lt;/strong&gt;：&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;在工具栏选择 &lt;strong&gt;OCR 工具&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;在图像上拖拽选择包含文字的矩形区域&lt;/li&gt;
  &lt;li&gt;识别结果自动复制到剪贴板（可选）&lt;/li&gt;
  &lt;li&gt;在程序中查看或编辑识别结果&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;应用场景&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;截图上的文字快速提取&lt;/li&gt;
  &lt;li&gt;证件信息识别&lt;/li&gt;
  &lt;li&gt;表单数据录入&lt;/li&gt;
  &lt;li&gt;多语言文档扫描&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/2026-07-26-极简图像编辑工具 - OrchidImgEditer功能介绍.assets/捕获2.PNG&quot; alt=&quot;捕获2&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;3-️-图像裁剪与处理&quot;&gt;3. ✂️ 图像裁剪与处理&lt;/h3&gt;

&lt;h4 id=&quot;裁剪工具-crop&quot;&gt;裁剪工具 (Crop)&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;选择矩形区域后自动裁剪&lt;/li&gt;
  &lt;li&gt;保留裁剪后的图像&lt;/li&gt;
  &lt;li&gt;支持多次独立裁剪&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;roi-抠图工具-roi-extract&quot;&gt;ROI 抠图工具 (ROI Extract)&lt;/h4&gt;
&lt;p&gt;高级功能：通过指定上下左右的 &lt;strong&gt;Padding 值&lt;/strong&gt; 进行精准抠图。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Padding 参数说明&lt;/strong&gt;：&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;上: 顶部内缩距离（正数）或外扩（负数）
下: 底部内缩距离（正数）或外扩（负数）
左: 左侧内缩距离（正数）或外扩（负数）
右: 右侧内缩距离（正数）或外扩（负数）
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;示例&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Top=10, Bottom=10, Left=10, Right=10&lt;/code&gt; → 原区域所有边向内缩小 10 像素&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Top=-5, Bottom=-5, Left=-5, Right=-5&lt;/code&gt; → 原区域所有边向外扩大 5 像素&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;马赛克工具-mosaic&quot;&gt;马赛克工具 (Mosaic)&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;隐藏敏感区域&lt;/li&gt;
  &lt;li&gt;支持调整马赛克块大小&lt;/li&gt;
  &lt;li&gt;快速打码处理&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;4--样式定制&quot;&gt;4. 🎨 样式定制&lt;/h3&gt;

&lt;p&gt;在工具栏中实时调整：&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;参数&lt;/th&gt;
      &lt;th&gt;范围&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;strong&gt;线宽&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;1-50&lt;/td&gt;
      &lt;td&gt;绘图线条粗细&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;马赛克大小&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;1-30&lt;/td&gt;
      &lt;td&gt;马赛克块大小&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;字体大小&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;8-72&lt;/td&gt;
      &lt;td&gt;文字标注大小&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;颜色&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;RGB&lt;/td&gt;
      &lt;td&gt;点击颜色按钮选择自定义颜色&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&quot;5-️-交互体验&quot;&gt;5. 🖱️ 交互体验&lt;/h3&gt;

&lt;h4 id=&quot;视图缩放&quot;&gt;视图缩放&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;鼠标滚轮&lt;/strong&gt; — 以鼠标位置为中心缩放&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;适应窗口&lt;/strong&gt; — 工具栏 Fit 按钮快速适应屏幕&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;实时显示&lt;/strong&gt; — 状态栏显示当前缩放比例&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;图像打开&quot;&gt;图像打开&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;拖拽打开&lt;/strong&gt; — 直接把图像文件拖到窗口打开&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;菜单打开&lt;/strong&gt; — File → Open&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;快捷键&lt;/strong&gt; — Ctrl+O&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;撤销与恢复&quot;&gt;撤销与恢复&lt;/h4&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;撤销&lt;/strong&gt; — Ctrl+Z 或工具栏 Undo 按钮&lt;/li&gt;
  &lt;li&gt;支持多步撤销&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;工作流程示例&quot;&gt;工作流程示例&lt;/h2&gt;

&lt;h3 id=&quot;场景快速截图注释&quot;&gt;场景：快速截图注释&lt;/h3&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;启动&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;OrchidImgEditergEditer&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;拖拽一张截图到窗口（或使用&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Ctrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;O&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;打开）&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;在需要注意的地方：&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;用&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;矩形工具&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;框出问题区域&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;用&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;箭头工具&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;指示重点&lt;/span&gt;
   &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;用&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;文字工具&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;添加说明&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;用&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;颜色选择器&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;改变标记颜色（如改成红色更醒目）&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;Ctrl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;S&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;保存为&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;PNG&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;JPG&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;分享或发送&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;场景从图像提取中文&quot;&gt;场景：从图像提取中文&lt;/h3&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;打开图片（如扫描文档、证件照）&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;工具栏选择&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;OCR&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;工具&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;在包含文字的区域拖拽选择矩形&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;系统自动识别并显示文字&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;复制提取的文字到文档或编辑器&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;场景敏感信息打码&quot;&gt;场景：敏感信息打码&lt;/h3&gt;

&lt;div class=&quot;language-c highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;打开包含敏感信息的截图&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;工具栏选择&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;马赛克工具&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;调整马赛克大小（如&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;×&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;像素块）&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;在敏感区域（如身份证号、手机号）拖拽涂盖&lt;/span&gt;
&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;保存处理后的图像&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;系统需求&quot;&gt;系统需求&lt;/h2&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;项目&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;strong&gt;操作系统&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Windows 10 / 11 或更新版本&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;处理器&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;任意现代 CPU（建议双核以上）&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;内存&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;最小 2GB，建议 4GB+&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;磁盘空间&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;100MB+ 自由空间&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;依赖&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Visual C++ Redistributable&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;安装与使用&quot;&gt;安装与使用&lt;/h2&gt;

&lt;h3 id=&quot;快速开始&quot;&gt;快速开始&lt;/h3&gt;

&lt;p&gt;直接使用编译版本（推荐新手）&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;下载发布包（包含预编译的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.exe&lt;/code&gt;）&lt;/li&gt;
  &lt;li&gt;解压到任意目录&lt;/li&gt;
  &lt;li&gt;运行 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kImgEdit.exe&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;或者拖拽图像文件到窗口打开&lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;常见问题-faq&quot;&gt;常见问题 (FAQ)&lt;/h2&gt;

&lt;h3 id=&quot;q1-打开-ocr-工具后没有识别到文字&quot;&gt;Q1: 打开 OCR 工具后没有识别到文字？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: 这通常是因为 Tesseract 语言包未正确加载。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;解决方案&lt;/strong&gt;：&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;首次使用请运行 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;setup_tesseract.bat&lt;/code&gt; 将 OCR 引擎打包到程序目录&lt;/li&gt;
  &lt;li&gt;确保程序可访问 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./tesseract/tessdata&lt;/code&gt; 目录中的语言文件&lt;/li&gt;
  &lt;li&gt;如果仍有问题，在菜单 &lt;strong&gt;Settings → Tesseract Status&lt;/strong&gt; 查看当前使用的路径&lt;/li&gt;
  &lt;li&gt;也可手动指向系统已安装的 Tesseract（如 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\Program Files\Tesseract-OCR&lt;/code&gt;）&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;q2-如何识别其他语言&quot;&gt;Q2: 如何识别其他语言？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: Tesseract 支持 120+ 种语言。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;方式&lt;/strong&gt;：&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;下载对应的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.traineddata&lt;/code&gt; 语言文件&lt;/li&gt;
  &lt;li&gt;放入 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;./tesseract/tessdata&lt;/code&gt; 或系统 Tesseract 目录&lt;/li&gt;
  &lt;li&gt;重启程序即可使用&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;q3-支持哪些图像格式&quot;&gt;Q3: 支持哪些图像格式？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: 支持常见格式：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;输入：JPG, PNG, BMP, TIFF, WebP 等&lt;/li&gt;
  &lt;li&gt;输出：PNG（无损）、JPG（可控质量）&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;q4-编辑的图像可以撤销吗&quot;&gt;Q4: 编辑的图像可以撤销吗？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: 支持撤销，但有限制：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;按 &lt;strong&gt;Ctrl+Z&lt;/strong&gt; 或工具栏 &lt;strong&gt;Undo&lt;/strong&gt; 按钮逐步撤销&lt;/li&gt;
  &lt;li&gt;一次加载图像中最多保留 ~50 步撤销记录（具体数量取决于编辑复杂度）&lt;/li&gt;
  &lt;li&gt;关闭未保存的图像会丢失所有编辑&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;q5-程序可以移动或便携使用吗&quot;&gt;Q5: 程序可以移动或便携使用吗？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: 完全可以！&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;所有相对路径都已相对于程序所在目录&lt;/li&gt;
  &lt;li&gt;直接移动整个文件夹到其他位置，程序照样运行&lt;/li&gt;
  &lt;li&gt;无需注册表写入，卸载直接删除即可&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;q6-如何批量处理图像&quot;&gt;Q6: 如何批量处理图像？&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;A&lt;/strong&gt;: 目前 OrchidImgEditer主要针对单个图像的精细编辑。如需批量处理，可考虑：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;通过脚本循环调用（传入参数）&lt;/li&gt;
  &lt;li&gt;或使用 OpenCV 编写自定义批处理脚本&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;获取帮助&quot;&gt;获取帮助&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;📖 &lt;strong&gt;在线文档&lt;/strong&gt;：[项目主页]&lt;/li&gt;
  &lt;li&gt;🐛 &lt;strong&gt;提交 Bug&lt;/strong&gt;：通过 GitHub Issues&lt;/li&gt;
  &lt;li&gt;💬 &lt;strong&gt;讨论与建议&lt;/strong&gt;：GitHub Discussions&lt;/li&gt;
  &lt;li&gt;📧 &lt;strong&gt;联系开发者&lt;/strong&gt;：342247588@qq.com&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;更新日志&quot;&gt;更新日志&lt;/h2&gt;

&lt;h3 id=&quot;v10当前版本&quot;&gt;v1.0（当前版本）&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;✅ 基础绘图工具集（直线、矩形、圆形、箭头、铅笔）&lt;/li&gt;
  &lt;li&gt;✅ 内置 Tesseract OCR 中英文识别&lt;/li&gt;
  &lt;li&gt;✅ 图像裁剪与 ROI 抠图&lt;/li&gt;
  &lt;li&gt;✅ 马赛克模糊工具&lt;/li&gt;
  &lt;li&gt;✅ 撤销功能&lt;/li&gt;
  &lt;li&gt;✅ 拖拽打开图像&lt;/li&gt;
  &lt;li&gt;✅ 实时缩放与交互&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;计划中的功能&quot;&gt;计划中的功能&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;🔮 高级滤镜（模糊、锐化、色温调整等）&lt;/li&gt;
  &lt;li&gt;🔮 图层支持（多图层编辑）&lt;/li&gt;
  &lt;li&gt;🔮 批量处理 API&lt;/li&gt;
  &lt;li&gt;🔮 插件系统&lt;/li&gt;
  &lt;li&gt;🔮 暗黑主题支持&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h2 id=&quot;鸣谢&quot;&gt;鸣谢&lt;/h2&gt;

&lt;p&gt;感谢以下开源项目与社区的支持：&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Qt Framework&lt;/li&gt;
  &lt;li&gt;OpenCV&lt;/li&gt;
  &lt;li&gt;Tesseract OCR&lt;/li&gt;
  &lt;li&gt;所有贡献者与使用者&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;简介到此结束。祝您使用愉快！&lt;/strong&gt; 🎨✨&lt;/p&gt;

&lt;p&gt;有任何问题或建议，欢迎在知乎评论区讨论！&lt;/p&gt;
</description>
        <pubDate>Sun, 26 Jul 2026 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2026/07/%E6%9E%81%E7%AE%80%E5%9B%BE%E5%83%8F%E7%BC%96%E8%BE%91%E5%B7%A5%E5%85%B7-OrchidImgEditer%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2026/07/%E6%9E%81%E7%AE%80%E5%9B%BE%E5%83%8F%E7%BC%96%E8%BE%91%E5%B7%A5%E5%85%B7-OrchidImgEditer%E5%8A%9F%E8%83%BD%E4%BB%8B%E7%BB%8D/</guid>
        
        
      </item>
    
      <item>
        <title>博客模板功能介绍</title>
        <description>&lt;p&gt;在此之前我有写过一篇&lt;a href=&quot;http://leopardpan.cn/2016/10/jekyll_tutorials1/&quot;&gt;如何使用我博客模板的文章&lt;/a&gt; 请先看这篇基础集成，这篇文章主要讲的是如何使用和修改我的博客主题，文章内容含以下几点：&lt;/p&gt;

&lt;h2 id=&quot;博客特性&quot;&gt;博客特性&lt;/h2&gt;

&lt;ul class=&quot;task-list&quot;&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;适配电脑、手机、平板等各屏幕&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;响应式设计&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;个性化头像&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;每篇文章自动添加打赏功能&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持Disqus、livere评论系统&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持站点总数访问统计，每篇文章访问统计&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持文章自动生成目录&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持标签分类&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持代码高亮&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持文章H1、H2、H3、H4标题样式多样化&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持多种三方社交icon展示，能从博客直接跳转到自己的三方社交主页&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;支持三方社交分享(facebook、twitter)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;博客主要模块介绍&quot;&gt;博客主要模块介绍&lt;/h2&gt;

&lt;h3 id=&quot;_configyml&quot;&gt;_config.yml&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; 是博客的配置文件，整个站点的信息都在这修改，想要把我的模板改成你自己的也需要修改&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;重要字段说明&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;enableToc: 是否开启文章自动生成目录，设置为false文章不会自动生成目录&lt;/li&gt;
  &lt;li&gt;comment/livere: livere评论系统，支持微信、qq、微博、豆瓣、twitter等登录后可以直接评论&lt;/li&gt;
  &lt;li&gt;comment/disqus: disqus评论系统，支持facebook、twitter等登录后可以直接评论&lt;/li&gt;
  &lt;li&gt;social/weibo、github、zhihu、jianshu等: 个人站底部展示的微博等三方社交按钮，点击后直接跳转到个人微博或其他社交主页&lt;/li&gt;
  &lt;li&gt;baidu/id: 百度统计，用来统计你个人站点的用户访问情况&lt;/li&gt;
  &lt;li&gt;ga/id: google统计，用来统计你个人站点的用户访问情况&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;_config.yml 文件除以上字段还有一些可以自行修改，例如title之类的字段&lt;/p&gt;

&lt;h3 id=&quot;_posts&quot;&gt;_posts&lt;/h3&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; 目录是用来存放文章的目录，写新文章，直接放在这个目录即可&lt;/p&gt;

&lt;p&gt;使用博客模板时，请把博客自带的文章给去掉，如果想使用博客自带的文章请 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;注明出处&lt;/code&gt;。&lt;/p&gt;

&lt;h3 id=&quot;自定义页面&quot;&gt;自定义页面&lt;/h3&gt;

&lt;p&gt;about.md、support.md 等为自定义页面，如果你想添加自动以页面可以直接复制about.md 文件修改文件名和里面的内容即可。&lt;/p&gt;

&lt;p&gt;如果需要在导航显示你新增的页面，直接在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; 文件的nav字段中添加你新页面配置即可&lt;/p&gt;

&lt;h3 id=&quot;修改说明&quot;&gt;修改说明&lt;/h3&gt;

&lt;p&gt;如果要修改博客模板信息建议只修改&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; 文件内容和 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; 里面的文章信息。因为博客模板一直在更新迭代，改动多了以免你后期更新博客模板的时候不方便。&lt;/p&gt;

&lt;p&gt;如果你想改动模板的样式又想继续更新迭代博客模板，你可以提交在github上提交&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pull request&lt;/code&gt; 或者直接给我发邮件建议改成什么样，如果你的提议确实可以，我会采纳的，并且非常感谢你的建议。&lt;/p&gt;

&lt;p&gt;博客迭代信息请看&lt;a href=&quot;http://leopardpan.cn/2020/07/ReleaseNode/&quot;&gt;ReleaseNode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;遇到解决不了的问题可以找 &lt;a href=&quot;http://leopardpan.cn/support/&quot;&gt;技术支持&lt;/a&gt;&lt;/p&gt;

</description>
        <pubDate>Sat, 11 Jul 2020 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2020/07/blog_info/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2020/07/blog_info/</guid>
        
        <category>jekyll</category>
        
        
      </item>
    
      <item>
        <title>博客迭代记录</title>
        <description>&lt;h2 id=&quot;介绍&quot;&gt;介绍&lt;/h2&gt;

&lt;p&gt;本博客首发时间为2015年，至今已经5个年头了。&lt;/p&gt;

&lt;p&gt;感觉之前更新迭代的有点乱，很多用户在使用的时候也没法确定是否要更新新版的博客，再次我专门用一篇文章来记录博客更新迭代的记录，如果你已经在使用我的博客模板的，你可以看看更新记录后确认下是否要更新。&lt;/p&gt;

&lt;p&gt;博客的全功能介绍请看&lt;a href=&quot;http://leopardpan.cn/2020/07/blog_info/&quot;&gt;博客功能介绍&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;100&quot;&gt;1.0.0&lt;/h2&gt;

&lt;p&gt;2016-11-25 第一版发布，红色主题&lt;/p&gt;

&lt;h2 id=&quot;200-开发中&quot;&gt;2.0.0 开发中&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;2016-11-25 修改博客风格为淡蓝色主题&lt;/li&gt;
  &lt;li&gt;2016-12-16 增长404、about等页面&lt;/li&gt;
  &lt;li&gt;2017-1-12 增加代码高亮&lt;/li&gt;
  &lt;li&gt;2017-3-19 增加打赏公共&lt;/li&gt;
  &lt;li&gt;2017-9-8 多说评论系统停服，切换到disqus评论（多说上的评论全没了😭）&lt;/li&gt;
  &lt;li&gt;2019-1-25 增加博客底部社交链接&lt;/li&gt;
  &lt;li&gt;2020-7-8 博客域名从 &lt;a href=&quot;http://baixin.io&quot;&gt;http://baixin.io&lt;/a&gt; 迁移到 &lt;a href=&quot;http://leopardpan.cn&quot;&gt;http://leopardpan.cn&lt;/a&gt; （baixin.io没法备案之前的统计也全没了😭）.&lt;/li&gt;
  &lt;li&gt;2020-7-13 增加文章自动生成目录功能, 增加livere评论系统&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;博客更新手册&quot;&gt;博客更新手册&lt;/h2&gt;

&lt;p&gt;如果你已经在使我的博客模板了，现在又想继续更新新版的博客，你下载博客后只需要修改两个各方&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;_config.yml 文件&lt;/li&gt;
  &lt;li&gt;_posts 目录&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_config.yml&lt;/code&gt; 文件里面的内容设置成你自己的，也可以用你原来的，最好是更新版的字段做一下对比。&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;_posts&lt;/code&gt; 目录里面的文章全部删掉，把你自己的文章放进来&lt;/p&gt;

&lt;p&gt;修改以上两个地方新版的博客便更新完成，快看看效果吧！&lt;/p&gt;

</description>
        <pubDate>Fri, 10 Jul 2020 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2020/07/ReleaseNode/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2020/07/ReleaseNode/</guid>
        
        <category>jekyll</category>
        
        
      </item>
    
      <item>
        <title>文档支持的Markdown语法</title>
        <description>&lt;h2 id=&quot;什么是-markdown&quot;&gt;什么是 Markdown&lt;/h2&gt;

&lt;p&gt;Markdown 是一种方便记忆、书写的纯文本标记语言，用户可以使用这些标记符号以最小的输入代价生成极富表现力的文档：如您正在阅读的这篇文章。它使用简单的符号标记不同的标题，分割不同的段落，&lt;strong&gt;粗体&lt;/strong&gt; 或者 &lt;em&gt;斜体&lt;/em&gt; 某些文字.&lt;/p&gt;

&lt;p&gt;很多产品的文档也是用markdown编写的，并且以“README.MD”的文件名保存在软件的目录下面。
　　&lt;/p&gt;
&lt;h2 id=&quot;一些基本语法&quot;&gt;一些基本语法&lt;/h2&gt;

&lt;p&gt;标题          &lt;br /&gt;
H1 :# Header 1          &lt;br /&gt;
H2 :## Header 2         &lt;br /&gt;
H3 :### Header 3         &lt;br /&gt;
H4 :#### Header 4         &lt;br /&gt;
H5 :##### Header 5          &lt;br /&gt;
H6 :###### Header 6    &lt;br /&gt;
链接 :&lt;a href=&quot;URL&quot;&gt;Title&lt;/a&gt;      &lt;br /&gt;
加粗 :&lt;strong&gt;Bold&lt;/strong&gt;      &lt;br /&gt;
斜体字 :&lt;em&gt;Italics&lt;/em&gt;       &lt;br /&gt;
*删除线 :&lt;del&gt;text&lt;/del&gt;        &lt;br /&gt;
内嵌代码 : &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert(&apos;Hello World&apos;);&lt;/code&gt;&lt;/p&gt;

&lt;h3 id=&quot;列表&quot;&gt;列表&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;列表1&lt;/li&gt;
  &lt;li&gt;列表2&lt;/li&gt;
  &lt;li&gt;列表3&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;列表引用&quot;&gt;列表引用&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;ul&gt;
    &lt;li&gt;列表1&lt;/li&gt;
    &lt;li&gt;列表2&lt;/li&gt;
    &lt;li&gt;列表3&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h3 id=&quot;插入一张图片&quot;&gt;插入一张图片&lt;/h3&gt;

&lt;p&gt;打赏一个吧&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/payimg/weipayimg.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;css 的大部分语法同样可以在 markdown 上使用，但不同的渲染器渲染出来的 markdown 内容样式也不一样，下面这些链接里面有 markdown 基本语法，你也可以在下面几个平台上尝试着写一些。&lt;/p&gt;

&lt;h2 id=&quot;博客支持的高级语法&quot;&gt;博客支持的高级语法&lt;/h2&gt;

&lt;h3 id=&quot;1-制作一份待办事宜&quot;&gt;1. 制作一份待办事宜&lt;/h3&gt;

&lt;ul class=&quot;task-list&quot;&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;支持以 PDF 格式导出文稿&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; /&gt;改进 Cmd 渲染算法，使用局部渲染技术提高渲染效率&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;新增 Todo 列表功能&lt;/li&gt;
  &lt;li class=&quot;task-list-item&quot;&gt;&lt;input type=&quot;checkbox&quot; class=&quot;task-list-item-checkbox&quot; disabled=&quot;disabled&quot; checked=&quot;checked&quot; /&gt;修复 图标功能&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;2-高亮一段代码&quot;&gt;2. 高亮一段代码&lt;/h3&gt;

&lt;div class=&quot;language-python highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
&lt;span class=&quot;o&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;requires_authorization&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;SomeClass&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;pass&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;__main__&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# A comment
&lt;/span&gt;    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&apos;hello world&apos;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h4 id=&quot;3-绘制表格&quot;&gt;3. 绘制表格&lt;/h4&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;项目&lt;/th&gt;
      &lt;th style=&quot;text-align: right&quot;&gt;价格&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;数量&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;计算机&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;$1600&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;5&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;手机&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;$12&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;12&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;管线&lt;/td&gt;
      &lt;td style=&quot;text-align: right&quot;&gt;$1&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;234&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

</description>
        <pubDate>Sun, 20 Nov 2016 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2016/11/markdownTool/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2016/11/markdownTool/</guid>
        
        <category>markdown</category>
        
        
      </item>
    
      <item>
        <title>Jekyll搭建个人博客</title>
        <description>&lt;p&gt;　之前写了一篇&lt;a href=&quot;http://leopardpan.cn/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/&quot;&gt;HEXO搭建个人博客&lt;/a&gt;的教程获得了很好评，尤其是在&lt;a href=&quot;http://www.jianshu.com/p/465830080ea9&quot;&gt;简书&lt;/a&gt;上目前已经累积了10W+的阅读量了，也有好心的读者主动给我打赏，在此感谢。&lt;/p&gt;

&lt;p&gt;　如果你看过我的文章会发现我现在的博客样式跟之前是有很大的区别的，之前我也是使用 HEXO 搭建的博客，后来发现使用 HEXO 在多台电脑上发布博客，操作起来并不是那么方便，果断就转到了 Jekyll 上，接下来我会讲如何使用 Jekyll 搭建博客，&lt;a href=&quot;http://leopardpan.cn/#blog&quot;&gt;博客模板效果&lt;/a&gt;。&lt;/p&gt;

&lt;h3 id=&quot;介绍&quot;&gt;介绍&lt;/h3&gt;

&lt;p&gt;　Jekyll 是一个简单的博客形态的静态站点生产机器。它有一个模版目录，其中包含原始文本格式的文档，通过 Markdown （或者 Textile） 以及 Liquid 转化成一个完整的可发布的静态网站，你可以发布在任何你喜爱的服务器上。Jekyll 也可以运行在 GitHub Page 上，也就是说，你可以使用 GitHub 的服务来搭建你的项目页面、博客或者网站，而且是完全免费的&lt;/p&gt;

&lt;p&gt;　使用 Jekyll 搭建博客之前要确认下本机环境，Git 环境（用于部署到远端）、&lt;a href=&quot;http://www.ruby-lang.org/en/downloads/&quot;&gt;Ruby&lt;/a&gt; 环境（Jekyll 是基于 Ruby 开发的）、包管理器 &lt;a href=&quot;http://rubygems.org/pages/download&quot;&gt;RubyGems&lt;/a&gt;              &lt;br /&gt;
　　如果你是 Mac 用户，你就需要安装 Xcode 和 Command-Line Tools了。下载方式 Preferences → Downloads → Components。&lt;/p&gt;

&lt;p&gt;　　Jekyll 是一个免费的简单静态网页生成工具，可以配合第三方服务例如： Disqus（评论）、多说(评论) 以及分享 等等扩展功能，Jekyll 可以直接部署在 Github（国外） 或 Coding（国内） 上，可以绑定自己的域名。&lt;a href=&quot;http://jekyll.bootcss.com/&quot;&gt;Jekyll中文文档&lt;/a&gt;、&lt;a href=&quot;https://jekyllrb.com/&quot;&gt;Jekyll英文文档&lt;/a&gt;、&lt;a href=&quot;http://jekyllthemes.org/&quot;&gt;Jekyll主题列表&lt;/a&gt;。&lt;/p&gt;

&lt;h3 id=&quot;jekyll-环境配置&quot;&gt;Jekyll 环境配置&lt;/h3&gt;

&lt;p&gt;安装 jekyll&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem install jekyll     
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;创建博客&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll new myBlog    
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;进入博客目录&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cd myBlog  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;启动本地服务&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;在浏览器里输入： &lt;a href=&quot;http://localhost:4000&quot;&gt;http://localhost:4000&lt;/a&gt;，就可以看到你的博客效果了。&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/jekyll/image1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;so easy !&lt;/p&gt;

&lt;h3 id=&quot;目录结构&quot;&gt;目录结构&lt;/h3&gt;
&lt;p&gt;　
　Jekyll 的核心其实是一个文本转换引擎。它的概念其实就是： 你用你最喜欢的标记语言来写文章，可以是 Markdown，也可以是 Textile,或者就是简单的 HTML, 然后 Jekyll 就会帮你套入一个或一系列的布局中。在整个过程中你可以设置URL路径, 你的文本在布局中的显示样式等等。这些都可以通过纯文本编辑来实现，最终生成的静态页面就是你的成品了。&lt;/p&gt;

&lt;p&gt;一个基本的 Jekyll 网站的目录结构一般是像这样的：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;.
├── _config.yml
├── _includes
|   ├── footer.html
|   └── header.html
├── _layouts
|   ├── default.html
|   ├── post.html
|   └── page.html
├── _posts
|   └── 2016-10-08-welcome-to-jekyll.markdown
├── _sass
|   ├── _base.scss
|   ├── _layout.scss
|   └── _syntax-highlighting.scss
├── about.md
├── css
|   └── main.scss
├── feed.xml
└── index.html

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这些目录结构以及具体的作用可以参考 &lt;a href=&quot;http://jekyll.com.cn/docs/structure/&quot;&gt;官网文档&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;进入 _config.yml 里面，修改成你想看到的信息，重新 jekyll server ，刷新浏览器就可以看到你刚刚修改的信息了。&lt;/p&gt;

&lt;p&gt;到此，博客初步搭建算是完成了，&lt;/p&gt;

&lt;h3 id=&quot;博客部署到远端&quot;&gt;博客部署到远端&lt;/h3&gt;

&lt;p&gt;　我这里讲的是部署到 Github Page 创建一个 github 账号，然后创建一个跟你账户名一样的仓库，如我的 github 账户名叫 &lt;a href=&quot;https://github.com/leopardpan&quot;&gt;leopardpan&lt;/a&gt;，我的 github 仓库名就叫 &lt;a href=&quot;https://github.com/leopardpan/leopardpan.github.io&quot;&gt;leopardpan.github.io&lt;/a&gt;，创建好了之后，把刚才建立的 myBlog 项目 push 到 username.github.io仓库里去（username指的是你的github用户名），检查你远端仓库已经跟你本地 myBlog 同步了，然后你在浏览器里输入 username.github.io ，就可以访问你的博客了。&lt;/p&gt;

&lt;h3 id=&quot;编写文章&quot;&gt;编写文章&lt;/h3&gt;

&lt;p&gt;　　所有的文章都是 _posts 目录下面，文章格式为 mardown 格式，文章文件名可以是 .mardown 或者 .md。&lt;/p&gt;

&lt;p&gt;　　编写一篇新文章很简单，你可以直接从 _posts/ 目录下复制一份出来 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2016-10-16-welcome-to-jekyll副本.markdown&lt;/code&gt; ，修改名字为 2016-10-16-article1.markdown ，注意：文章名的格式前面必须为 2016-10-16- ，日期可以修改，但必须为 年-月-日- 格式，后面的 article1 是整个文章的连接 URL，如果文章名为中文，那么文章的连接URL就会变成这样的：http://leopardpan.cn/2015/08/%E6%90%AD%E5/ ， 所以建议文章名最好是英文的或者阿拉伯数字。 双击 2016-10-16-article1.markdown 打开&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
---
layout: post
title:  &quot;Welcome to Jekyll!&quot;
date:   2016-10-16 11:29:08 +0800
categories: jekyll update
---

正文...

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;title: 显示的文章名， 如：title: 我的第一篇文章                  &lt;br /&gt;
date:  显示的文章发布日期，如：date: 2016-10-16                        &lt;br /&gt;
categories: tag标签的分类，如：categories: 随笔&lt;/p&gt;

&lt;p&gt;注意：文章头部格式必须为上面的，…. 就是文章的正文内容。&lt;/p&gt;

&lt;p&gt;我写文章使用的是 Sublime Text2 编辑器，如果你对 markdown 语法不熟悉的话，可以看看&lt;a href=&quot;https://www.zybuluo.com/&quot;&gt;作业部落的教程&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;使用我的博客模板&quot;&gt;使用我的博客模板&lt;/h3&gt;

&lt;p&gt;虽然博客部署完成了，你会发现博客太简单不是你想要的，如果你喜欢我的模板的话，可以使用我的模板。&lt;/p&gt;

&lt;p&gt;首先你要获取的我博客，&lt;a href=&quot;https://github.com/leopardpan/leopardpan.github.io.git&quot;&gt;Github项目地址&lt;/a&gt;，你可以直接&lt;a href=&quot;https://github.com/leopardpan/leopardpan.github.io/archive/master.zip&quot;&gt;点击下载博客&lt;/a&gt;，进去leopardpan.github.io/ 目录下， 使用命令部署本地服务&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll server   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;如果你本机没配置过任何jekyll的环境可能会报错&quot;&gt;如果你本机没配置过任何jekyll的环境，可能会报错&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/Users/xxxxxxxx/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require&apos;: cannot load such file -- bundler (LoadError)
	from /Users/xxxxxxxx/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/gems/jekyll-3.3.0/lib/jekyll/plugin_manager.rb:34:in `require_from_bundler&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/gems/jekyll-3.3.0/exe/jekyll:9:in `&amp;lt;top (required)&amp;gt;&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/bin/jekyll:23:in `load&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/bin/jekyll:23:in `&amp;lt;main&amp;gt;&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `eval&apos;
	from /Users/xxxxxxxx/.rvm/gems/ruby-2.2.2/bin/ruby_executable_hooks:15:in `&amp;lt;main&amp;gt;&apos;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;原因： 没有安装 bundler ，执行安装 bundler 命令&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
$ gem install bundler

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;提示：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Fetching: bundler-1.13.5.gem (100%)
Successfully installed bundler-1.13.5
Parsing documentation for bundler-1.13.5
Installing ri documentation for bundler-1.13.5
Done installing documentation for bundler after 5 seconds
1 gem installed

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;再次执行 $ jekyll server  ，提示&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;
Could not find proper version of jekyll (3.1.1) in any of the sources
Run `bundle install` to install missing gems.

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;跟着提示运行命令&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ bundle install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这个时候你可能会发现 bundle install 运行卡主不动了。&lt;/p&gt;

&lt;p&gt;如果很长时间都没任何提示的话，你可以尝试修改 gem 的 source&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ gem sources --remove https://rubygems.org/
$ gem sources -a http://ruby.taobao.org/
$ gem sources -l
*** CURRENT SOURCES ***

http://ruby.taobao.org

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;再次执行命令 $ bundle install，发现开始有动静了&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
。。。
Installing jekyll-watch 1.3.1
Installing jekyll 3.1.1
Bundle complete! 3 Gemfile dependencies, 17 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;bundler安装完成，后再次启动本地服务&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll server

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;继续报错&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Configuration file: /Users/tendcloud-Caroline/Desktop/leopardpan.github.io/_config.yml
  Dependency Error: Yikes! It looks like you don&apos;t have jekyll-sitemap or one of its dependencies installed. In order to use Jekyll as currently configured, you&apos;ll need to install this gem. The full error message from Ruby is: &apos;cannot load such file -- jekyll-sitemap&apos; If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/! 
jekyll 3.1.1 | Error:  jekyll-sitemap

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;表示 当前的 jekyll 版本是 3.1.1 ，无法使用 jekyll-sitemap&lt;/p&gt;

&lt;p&gt;解决方法有两个&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;1、打开当前目录下的 _config.yml 文件，把 gems: [jekyll-paginate,jekyll-sitemap] 换成 gems: [jekyll-paginate] ，也就是去掉jekyll-sitemap。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;2、升级 jekyll 版本，我当前的是 jekyll 3.1.2 。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;修改完成后保存配置，再次执行&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jekyll server

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;提示&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Configuration file: /Users/baixinpan/Desktop/OpenSource/Mine/Page-Blog/leopardpan.github.io-github/_config.yml
            Source: /Users/baixinpan/Desktop/OpenSource/Mine/Page-Blog/leopardpan.github.io-github
       Destination: /Users/baixinpan/Desktop/OpenSource/Mine/Page-Blog/leopardpan.github.io-github/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.901 seconds.
 Auto-regeneration: enabled for &apos;/Users/baixinpan/Desktop/OpenSource/Mine/Page-Blog/leopardpan.github.io-github&apos;
Configuration file: /Users/baixinpan/Desktop/OpenSource/Mine/Page-Blog/leopardpan.github.io-github/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;表示本地服务部署成功。&lt;/p&gt;

&lt;p&gt;在浏览器输入 &lt;a href=&quot;127.0.0.1:4000&quot;&gt;127.0.0.1:4000&lt;/a&gt; ， 就可以看到&lt;a href=&quot;http://leopardpan.cn&quot;&gt;leopardpan.cn&lt;/a&gt;博客效果了。&lt;/p&gt;

&lt;h3 id=&quot;修改成你自己的博客&quot;&gt;修改成你自己的博客&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;ul&gt;
    &lt;li&gt;如果你想使用我的模板请把 _posts/ 目录下的文章都去掉。&lt;/li&gt;
    &lt;li&gt;修改 _config.yml 文件里面的内容为你自己的。&lt;/li&gt;
  &lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;然后使用 git push 到你自己的仓库里面去，检查你远端仓库，在浏览器输入 username.github.io 就会发现，你有一个漂亮的主题模板了。&lt;/p&gt;

&lt;h3 id=&quot;为什么要是用-jekyll&quot;&gt;为什么要是用 Jekyll&lt;/h3&gt;

&lt;p&gt;使用了 Jekyll 你会发现如果你想使用多台电脑发博客都很方便，只要把远端 github 仓库里的博客 clone 下来，写文章后再提交就可以了，Hexo 由于远端提交的是静态网页，所有无法直接写 Markdown 的文章。如果你想看 Hexo 搭建博客，可以看看我的另一篇&lt;a href=&quot;http://leopardpan.cn/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/&quot;&gt;HEXO搭建个人博客&lt;/a&gt;的教程。&lt;/p&gt;

&lt;p&gt;如果你在搭建博客遇到问题，可以在&lt;a href=&quot;http://leopardpan.cn/2016/10/jekyll_tutorials1/&quot;&gt;原文博客&lt;/a&gt;的评论里给我提问。&lt;/p&gt;

&lt;p&gt;后面会继续介绍，在我的博客基础上，如何修改成你自己喜欢的 Style，欢迎继续关注我博客的更新。&lt;/p&gt;

&lt;h3 id=&quot;qa&quot;&gt;Q&amp;amp;A&lt;/h3&gt;

&lt;blockquote&gt;
  &lt;p&gt;问题：最近很多朋友使用我的模板报警告：The CNAME &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;leopardpan.cn&lt;/code&gt; is already taken 
解决：把CNAME里面的baixin.io修改成你自己的域名，如果你暂时没有域名，CNAME里面就什么都不用谢。（之前没人反馈过这个问题，应该是github page最近才最的限制。）&lt;/p&gt;
&lt;/blockquote&gt;

</description>
        <pubDate>Fri, 14 Oct 2016 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2016/10/jekyll_tutorials1/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2016/10/jekyll_tutorials1/</guid>
        
        <category>jekyll</category>
        
        
      </item>
    
      <item>
        <title>HEXO进阶</title>
        <description>&lt;p&gt;HEXO接近是最近有一些朋友提出的问题，然后我做了总结，如果你也在使用HEXO，不妨看看，应该会有些帮助。&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;1、博客部署样式出问题了怎么办？&lt;/li&gt;
  &lt;li&gt;2、电脑重装或者误删了本地博客怎么办？&lt;/li&gt;
  &lt;li&gt;3、想使用两台电脑写博客怎么办？&lt;/li&gt;
  &lt;li&gt;4、为何使用百度搜不到我的博客？&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;使用jekyll解决前三个问题&quot;&gt;使用Jekyll解决前三个问题。&lt;/h3&gt;
&lt;p&gt;不得不说 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 确实可以解决我上面三个问题, 因为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 是直接把Markdown格式的文章直接放在github仓库里的, 相当于直接用git来管理博客了, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Github&lt;/code&gt; 官方也很推荐 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 。 你可以先看下 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 搭建博客的&lt;a href=&quot;voyagelab.github.io&quot;&gt;voyagelab&lt;/a&gt;, &lt;a href=&quot;https://github.com/voyagelab/voyagelab.github.io&quot;&gt;github地址&lt;/a&gt;, 当然了这只是很普通的, Jekyll 也有很多主题可以选择的, 更详细的请看&lt;a href=&quot;http://jekyll.bootcss.com/&quot;&gt;Jekyll中文文档&lt;/a&gt;、&lt;a href=&quot;https://jekyllrb.com/&quot;&gt;Jekyll英文文档&lt;/a&gt;、&lt;a href=&quot;http://jekyllthemes.org/&quot;&gt;Jekyll主题列表&lt;/a&gt;。
在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 上逛了一个星期的我又回到了 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hexo&lt;/code&gt; , 发现 目前 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 对主题和一些插件的支持相对 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hexo&lt;/code&gt; 来说, 没那么友好, 可能有一些其它的方法只是我没找到而已,关于 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Jekyll&lt;/code&gt; 搭建博客就介绍到这, 如果有问题的话可以评论, 或者联系我。&lt;/p&gt;

&lt;h3 id=&quot;使用hexo解决上面前三个问题&quot;&gt;使用Hexo解决上面前三个问题&lt;/h3&gt;
&lt;p&gt;是的, 我大&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hexo&lt;/code&gt;同样可以解决上面三个问题, 那就是使用git。关于如何使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hexo&lt;/code&gt; 搭建博客请看我另一篇文章&lt;a href=&quot;http://www.leopardpan.cn/2015/08/25/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/&quot;&gt;HEXO搭建个人博客&lt;/a&gt;, 如果搭建的过程中出现了问题, 我们可以交流交流。现在我假设你已经能基本使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Hexo&lt;/code&gt; 了, 接下来就看看如何来管理博客。&lt;/p&gt;

&lt;h2 id=&quot;使用git管理博客&quot;&gt;使用git管理博客&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/leopardpan/Blog-Growing&quot;&gt;Blog-Growing&lt;/a&gt;是我管理博客的仓库地址。结构大致是:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;– Blog-Growing   &lt;br /&gt;
　　|– .git   &lt;br /&gt;
　　|– .gitignore  &lt;br /&gt;
　　|– Hexo   &lt;br /&gt;
　　　　|   ..  &lt;br /&gt;
　　　　|   ..  &lt;br /&gt;
　　　　|   整个博客的配置信息&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;你可以把我的的&lt;a href=&quot;https://github.com/leopardpan/Blog-Growing&quot;&gt;Blog-Growing&lt;/a&gt; clone下来, 看看一些基本配置是怎么配置的。需要提醒的是, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;要把主题下的.git给删除掉&lt;/code&gt; , 当然了你也可以使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git submodule&lt;/code&gt; 来管理, 具体的管理方法我这里就不做多的介绍了, 想了解的话可以私信我。
上面的过程基本做完后, 怎么来解决我开篇提的前三个问题了。&lt;/p&gt;

&lt;h3 id=&quot;具体实现&quot;&gt;具体实现:&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;一：家里电脑使用博客&lt;/strong&gt;      &lt;br /&gt;
　　建立git远端仓库管理博客,并使用家里的电脑把本地博客的配置推送到远端仓库。 &lt;br /&gt;
&lt;strong&gt;二：公司电脑使用博客&lt;/strong&gt;       &lt;br /&gt;
　　到了公司只需要执行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo npm install -g hexo&lt;/code&gt;,然后cd到你的博客目录下,如我cd 到Hexo目录下, 然后执行 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hexo server&lt;/code&gt; 就可以在本地预览博客了。  &lt;br /&gt;
&lt;strong&gt;三：使用Git保存&lt;/strong&gt;        &lt;br /&gt;
　　修改好博客后记得先使用git来提交下, 即使下次把博客的样式修改坏了, 也可以使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git reset --hard&lt;/code&gt; 来回退。如: 我cd 到 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Blog-Growing&lt;/code&gt; 目录下使用git提交。 &lt;br /&gt;
&lt;strong&gt;四：博客提交&lt;/strong&gt;         &lt;br /&gt;
　　1、修改好的博客使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hexo d&lt;/code&gt; 展示到博客页上。 &lt;br /&gt;
　　2、git push 整个本地博客。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;提示:&lt;/strong&gt; 在这里 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git&lt;/code&gt; 仅仅只是用户做博客的版本管理的, 博客的样式修改、基本部署还是使用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;hexo&lt;/code&gt; 来操作的。&lt;/p&gt;

&lt;h2 id=&quot;让百度能搜索到你的博客&quot;&gt;让百度能搜索到你的博客&lt;/h2&gt;

&lt;h3 id=&quot;为什么要使用百度搜索&quot;&gt;为什么要使用百度搜索？&lt;/h3&gt;

&lt;p&gt;　　有人可能会说作为一个开发人员, 你不会用 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Google&lt;/code&gt; 啊。 是的, Google是能搜到我们搭建在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Github Page&lt;/code&gt; 的博客, 会用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Google&lt;/code&gt; 也是一个开发人员必备技能之一。但是, 我们生活在天朝, 所以百度还是总有会用到的时候, 或者是你想让更多的天朝人能搜到你。&lt;/p&gt;

&lt;h3 id=&quot;为什么使用百度搜索不到-github-page-上的博客&quot;&gt;为什么使用百度搜索不到 Github Page 上的博客？&lt;/h3&gt;

&lt;p&gt;有人联系过 Github Support 部门 , 给出大致的意思就是: 百度爬虫爬得太猛烈，已经对很多 Github 用户造成了问题。所以 Github 将禁止百度爬虫的爬取。&lt;/p&gt;

&lt;h3 id=&quot;如何让百度能搜索你的博客&quot;&gt;如何让百度能搜索你的博客?&lt;/h3&gt;

&lt;p&gt;　　根据上面说的, 目前发现只是Github Page禁止了百度搜索, 所以让百度能搜索到你的博客还是有一些方法的。例如:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;自己搞个VPS,博客部署在VPS上。&lt;/li&gt;
  &lt;li&gt;博客部署 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Coding.net&lt;/code&gt; 上, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;GitCafe&lt;/code&gt;已经合并到 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Coding&lt;/code&gt; 。
我使用的是第二种方法, 博客部署在 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Coding.net&lt;/code&gt; 上也相对简单些。&lt;/li&gt;
&lt;/ul&gt;

&lt;h4 id=&quot;在coding上部署你的博客&quot;&gt;在Coding上部署你的博客。&lt;/h4&gt;

&lt;p&gt;　　Coding同样支持Hexo、Jekyll等博客的部署, Coding 跟Github还是挺像的,而且是中文。 同样的在Coding里面建一个项目,项目名字跟你的用户名一样,这里我就不啰嗦了, 说几个需要注意的地方:   &lt;br /&gt;
&lt;strong&gt;注意一:&lt;/strong&gt;     &lt;br /&gt;
　　在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Coding Page&lt;/code&gt; 上部署博客,需要把博客推送到&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;coding-pages &lt;/code&gt; 分支上, 分支名字是固定的。  &lt;br /&gt;
&lt;strong&gt;注意二:&lt;/strong&gt;   &lt;br /&gt;
　　&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Coding Page&lt;/code&gt; 不支持自定义CNAME, 你需要点击到Page模块,然后添加一个域名来绑定。&lt;/p&gt;

&lt;p&gt;更详细的请看&lt;a href=&quot;https://coding.net/help/doc/pages/index.html&quot;&gt;Coding Pages 官网介绍&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;参考文章:
&lt;a href=&quot;http://jerryzou.com/posts/feasibility-of-allowing-baiduSpider-for-Github-Pages/&quot;&gt;解决 Github Pages 禁止百度爬虫的方法与可行性分析&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;p&gt;转载请注明：&lt;a href=&quot;http://leopardpan.cn&quot;&gt;潘柏信的博客&lt;/a&gt; » &lt;a href=&quot;http://leopardpan.cn/2016/06/HEXO_Advanced/&quot;&gt;点击阅读原文&lt;/a&gt;&lt;/p&gt;
</description>
        <pubDate>Sun, 12 Jun 2016 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2016/06/HEXO_Advanced/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2016/06/HEXO_Advanced/</guid>
        
        <category>hexo</category>
        
        
      </item>
    
      <item>
        <title>HEXO搭建个人博客</title>
        <description>&lt;p&gt;　　经过各种找资料，踩过各种坑，终于使用 hexo 搭建个人博客初步完成了，域名目前用得时 github 的，我的 hexo 是 3.1.1 版本，hexo 不同的版本，很多配置都不一样。好吧，废话不多说了，开始吧。&lt;/p&gt;

&lt;p&gt;　　本篇文章累计了大量评论，和我的一些解答，读者有什么问题可以先看看评论，或者搜下关键字，如果还是有问题可以给我在评论里给我留言，问题很着急的可以加我 ＱＱ：1499065178　，或者给我发邮件：&lt;a href=&quot;mailto:leopardpan@icloud.com&quot;&gt;leopardpan@icloud.com&lt;/a&gt;  ，都可以，如果你已经搭建完成了，可以看看我的另一篇博客&lt;a href=&quot;http://leopardpan.cn/2016/06/HEXO_Advanced/&quot;&gt;HEXO进阶&lt;/a&gt;，有讲如何能百度搜索你的博客、多台电脑使用HEXO发布博客等。我现在的博客是使用 Jekyll 搭建的，如果你想使用我现在的模板请看&lt;a href=&quot;http://leopardpan.cn/2016/10/jekyll_tutorials1/&quot;&gt;Jekyll搭建个人博客&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;背景&quot;&gt;背景&lt;/h2&gt;

&lt;p&gt;　这篇教程是针对与Mac的，&lt;a href=&quot;http://ibruce.info/2013/11/22/hexo-your-blog/?utm_source=tuicool&quot;&gt;参考链接&lt;/a&gt;，由于原文讲到的hexo是以前的老版本，所以现在的版本配置的时候会有些改动。&lt;/p&gt;

&lt;p&gt;　之前是想着写博客，一方面是给自己做笔记，可以提升自己的写作、总结能力，一个技术点我们会使用，并不难，但是要做到让让别人也能听懂我们讲得，还是需要一定的技巧和经验的。很多类似于CSDN、博客园也都可以写文章，但是页面的样式我，不是太喜欢，简书还算好点得。最近看到一些大神们的博客（在我的友情链接里有），貌似都是用hexo写得，我也依葫芦画瓢的搭建了一个。不罗嗦了，直接上搭建步骤。&lt;/p&gt;

&lt;h2 id=&quot;配置环境&quot;&gt;配置环境&lt;/h2&gt;

&lt;h3 id=&quot;安装node必须&quot;&gt;安装Node（必须）&lt;/h3&gt;

&lt;p&gt;作用：用来生成静态页面的
到Node.js&lt;a href=&quot;https://nodejs.org/&quot;&gt;官网&lt;/a&gt;下载相应平台的最新版本，一路安装即可。&lt;/p&gt;

&lt;h3 id=&quot;安装git必须&quot;&gt;安装Git（必须）&lt;/h3&gt;
&lt;p&gt;作用：把本地的hexo内容提交到github上去.
安装Xcode就自带有Git，我就不多说了。&lt;/p&gt;

&lt;h3 id=&quot;申请github必须&quot;&gt;申请GitHub（必须）&lt;/h3&gt;
&lt;p&gt;作用：是用来做博客的远程创库、域名、服务器之类的，怎么与本地hexo建立连接等下讲。
&lt;a href=&quot;https://github.com/&quot;&gt;github&lt;/a&gt;账号我也不再啰嗦了,没有的话直接申请就行了，跟一般的注册账号差不多，SSH Keys，看你自己了，可以不配制，不配置的话以后每次对自己的博客有改动提交的时候就要手动输入账号密码，配置了就不需要了，怎么配置我就不多说了，网上有很多教程。&lt;/p&gt;

&lt;h3 id=&quot;正式安装hexo&quot;&gt;正式安装HEXO　&lt;/h3&gt;
&lt;p&gt;Node和Git都安装好后，可执行如下命令安装hexo：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo npm install -g hexo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;初始化&quot;&gt;初始化&lt;/h3&gt;
&lt;p&gt;创建一个文件夹，如：Blog，cd到Blog里执行hexo init的。命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;好啦，至此，全部安装工作已经完成！&lt;/p&gt;

&lt;h3 id=&quot;生成静态页面&quot;&gt;生成静态页面&lt;/h3&gt;
&lt;p&gt;继续再Blog目录下执行如下命令，生成静态页面&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo generate （hexo g  也可以）   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;本地启动&quot;&gt;本地启动&lt;/h3&gt;
&lt;p&gt;启动本地服务，进行文章预览调试，命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo server   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;浏览器输入&lt;a href=&quot;就可以看到最原始的效果了&quot;&gt;http://localhost:4000&lt;/a&gt;
我不知道你们能不能，反正我不能，因为我还有环境没配置好&lt;/p&gt;

&lt;h3 id=&quot;常见的hexo配置错误&quot;&gt;常见的HEXO配置错误：&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ERROR Plugin load failed: hexo-server

原因： Besides, utilities are separated into a standalone module. hexo.util is not reachable anymore.

解决方法，执行命令：$ sudo npm install hexo-server

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;执行命令hexo server，提示：Usage: hexo&amp;lt;Command&amp;gt; ....

原因：我认为是没有生成本地服务

解决方法，执行命令：$ npm install hexo-server --save

提示：hexo-server@0.1.2 node_modules/hexo-server
.... 

表示成功了[参考](https://hexo.io/zh-cn/docs/server.html)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这个时候再执行：$ hexo-server&lt;/p&gt;

&lt;p&gt;得到: INFO  Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.&lt;/p&gt;

&lt;p&gt;这个时候再点击&lt;a href=&quot;http://0.0.0.0:4000&quot;&gt;http://0.0.0.0:4000&lt;/a&gt;，正常情况下应该是最原始的画面，但是我看到的是：
白板和Cannot GET /   几个字
原因： 由于2.6以后就更新了，我们需要手动配置些东西，我们需要输入下面三行命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install hexo-renderer-ejs --save
npm install hexo-renderer-stylus --save
npm install hexo-renderer-marked --save
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这个时候再重新生成静态文件，命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo generate （或hexo g）
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;启动本地服务器：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo server （或hexo s）
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;再点击网址&lt;a href=&quot;http://0.0.0.0:4000&quot;&gt;http://0.0.0.0:4000&lt;/a&gt; OK终于可以看到属于你自己的blog啦，?，虽然很简陋，但好歹有了一个属于自己的小窝了。&lt;a href=&quot;https://disqus.com/home/discussion/bsspirit/hexogithubweb/&quot;&gt;参考链接&lt;/a&gt;，本地已经简单的设置好了，但是现在域名和服务器都是基于自己的电脑，接下来需要跟github进行关联。&lt;/p&gt;

&lt;h2 id=&quot;配置github&quot;&gt;配置Github&lt;/h2&gt;

&lt;h3 id=&quot;建立repository&quot;&gt;建立Repository&lt;/h3&gt;

&lt;p&gt;建立与你用户名对应的仓库，仓库名必须为【your_user_name.github.io】，固定写法
然后建立关联，我的Blog在本地/Users/leopard/Blog，Blog是我之前建的东西也全在这里面，有：&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Blog      &lt;br /&gt;
　｜      &lt;br /&gt;
　｜－－ _config.yml     &lt;br /&gt;
　｜－－ node_modules    &lt;br /&gt;
　｜－－ public              &lt;br /&gt;
　｜－－ source                                                &lt;br /&gt;
　｜－－ db.json	        &lt;br /&gt;
　｜－－ package.json        &lt;br /&gt;
　｜－－ scaffolds        &lt;br /&gt;
　｜－－ themes          　　　　　
　　　&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;现在我们需要_config.yml文件，来建立关联，命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vim _config.yml
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;翻到最下面，改成我这样子的，注意： &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;: 后面要有空格&lt;/code&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;deploy:
  type: git
  repository: https://github.com/leopardpan/leopardpan.github.io.git
  branch: master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;执行如下命令才能使用git部署&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;npm install hexo-deployer-git --save
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;网上会有很多说法，有的type是github, 还有repository 最后面的后缀也不一样，是github.com.git，我也踩了很多坑，我现在的版本是hexo: 3.1.1，执行命令hexo -vsersion就出来了,貌似3.0后全部改成我上面这种格式了。
忘了说了，我没用SSH Keys如果你用了SSH Keys的话直接在github里复制SSH的就行了，总共就两种协议，相信你懂的。
然后，执行配置命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo deploy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;　然后再浏览器中输入&lt;a href=&quot;http://leopardpan.github.io/&quot;&gt;http://leopardpan.github.io/&lt;/a&gt;就行了，我的 github 的账户叫 leopardpan ,把这个改成你 github 的账户名就行了&lt;/p&gt;

&lt;h3 id=&quot;部署步骤&quot;&gt;部署步骤&lt;/h3&gt;

&lt;p&gt;每次部署的步骤，可按以下三步来进行。&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo clean
hexo generate
hexo deploy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;一些常用命令：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;hexo new &quot;postName&quot; #新建文章
hexo new page &quot;pageName&quot; #新建页面
hexo generate #生成静态页面至public目录
hexo server #开启预览访问端口（默认端口4000，&apos;ctrl + c&apos;关闭server）
hexo deploy #将.deploy目录部署到GitHub
hexo help  #查看帮助
hexo version  #查看Hexo的版本
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这里有大量的&lt;a href=&quot;https://github.com/hexojs/hexo/wiki/Themes&quot;&gt;主题列表&lt;/a&gt;使用方法里面
都有详细的介绍，我就不多说了。    &lt;br /&gt;
我这里有几款个人认为不错的主题，免去你们，一个一个的选了，欢迎吐槽我的审美，?       &lt;br /&gt;
　&lt;a href=&quot;https://github.com/daisygao/hexo-themes-cover&quot;&gt;Cover&lt;/a&gt; - A chic theme with facebook-like cover photo    &lt;br /&gt;
　&lt;a href=&quot;https://github.com/henryhuang/oishi&quot;&gt;Oishi&lt;/a&gt; - A white theme based on Landscape plus and Writing.    &lt;br /&gt;
　&lt;a href=&quot;https://github.com/hardywu/hexo-theme-sidebar&quot;&gt;Sidebar&lt;/a&gt; - Another theme based on Light with a simple sidebar  &lt;br /&gt;
　&lt;a href=&quot;https://github.com/SuperKieran/TKL&quot;&gt;TKL&lt;/a&gt; - A responsive design theme for Hexo. 一个设计优雅的响应式主题  &lt;br /&gt;
　&lt;a href=&quot;https://github.com/levonlin/Tinnypp&quot;&gt;Tinnypp&lt;/a&gt; - A clean, simple theme based on Tinny   &lt;br /&gt;
　&lt;a href=&quot;https://github.com/yunlzheng/hexo-themes-writing&quot;&gt;Writing&lt;/a&gt; - A small and simple hexo theme based on Light   &lt;br /&gt;
　&lt;a href=&quot;https://github.com/litten/hexo-theme-yilia&quot;&gt;Yilia&lt;/a&gt; - Responsive and simple style 优雅简洁响应式主题，我用得就是这个。  &lt;br /&gt;
　&lt;a href=&quot;https://github.com/Voidly/pacman&quot;&gt;Pacman voidy&lt;/a&gt; - A theme with dynamic tagcloud and dynamic snow&lt;/p&gt;

&lt;h2 id=&quot;博客目录介绍&quot;&gt;博客目录介绍&lt;/h2&gt;
&lt;p&gt;　文章在 source/_posts，编辑器可以用 Sublime，支持 markdown 语法。如果想修改头像可以直接在主题的 _config.yml 文件里面修改，友情链接，之类的都在这里，修改名字在 public/index.html 里修改，开始打理你的博客吧，有什么问题或者建议，都可以提出来，我会继续完善的。&lt;/p&gt;

&lt;p&gt;Markdown语法参考链接: &lt;a href=&quot;https://www.zybuluo.com/mdeditor&quot;&gt;作业部落&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&quot;qa&quot;&gt;Q&amp;amp;A&lt;/h2&gt;

&lt;blockquote&gt;
  &lt;p&gt;问：如何让文章想只显示一部分和一个 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;阅读全文&lt;/code&gt; 的按钮？     &lt;br /&gt;
答：在文章中加一个 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; ， &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;!--more--&amp;gt;&lt;/code&gt; 后面的内容就不会显示出来了。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt; &lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;问：本地部署成功了，也能预览效果，但使用 username.github.io 访问，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;出现 404 &lt;/code&gt; .    &lt;br /&gt;
答：首先确认 hexo d 命令执行是否报错，如果没有报错，再查看一下你的 github 的 username.github.io 仓库，你的博客是否已经成功提交了，你的 github 邮箱也要通过验证才行。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;转载请注明原地址，潘柏信的博客：&lt;a href=&quot;http://leopardpan.github.io&quot;&gt;http://leopardpan.github.io&lt;/a&gt; 谢谢！&lt;/p&gt;
</description>
        <pubDate>Tue, 25 Aug 2015 00:00:00 +0000</pubDate>
        <link>http://kelvin-luo.github.io/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/</link>
        <guid isPermaLink="true">http://kelvin-luo.github.io/2015/08/HEXO%E6%90%AD%E5%BB%BA%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/</guid>
        
        <category>hexo</category>
        
        
      </item>
    
  </channel>
</rss>
