目录

Hugo 博客搭建指南

系列 - 博客搭建指南

使用 Hugo DoIt 主题和 Cloudflare Pages 搭建个人博客的完整指南。

  1. Git

  2. Go Programming Language

  3. Hugo

    建议安装 Hugo Extended 版本。

  1. 在本地初始化博客:

    hugo new site myblog
    cd myblog
    git init
    git submodule add https://github.com/HEIGE-PCloud/DoIt.git themes/DoIt
    git add .
    git commit -m "Initial commit"
  2. 初始化配置文件:

    1. 删除根目录的 hugo.toml 文件
    2. themes/DoIt/exampleSite/config 文件夹复制到博客根目录
    3. 修改根目录的 config/_default/hugo.toml 文件,将 themesDir = "../.." 删去。
  3. 创建第一篇博客文章:

    hugo new posts/my-first-post.md
  4. 根目录下执行:

    hugo server
  5. 打开浏览器,访问 http://localhost:1313 查看博客

    初始界面

详见 DoIt 主题文档

Hexo 博客搭建指南#GitHub

Hexo 博客搭建指南#Cloudflare 基本一致,注意:

  1. 构建命令为 hugo,构建输出目录为 public
  2. 构建系统版本为 版本 3

Hexo 博客搭建指南#评论功能 基本一致