Hexo+ICARUS博客搭建

Hexo 安装

安装 Nodejs

Hexo 安装

  1. 使用 yarn (或 npm)

    1
    yarn global add hexo-cli
  2. 在自己选定的目录下 (例如 ./BlogTest 目录下)

    1
    hexo init
  3. 根据Hexo 中文配置教程设置自己的站点信息

  • title
  • subtitle
  • description
  • author
  • language
  • timezone
  • trailing_index
  • trailing_html
  • updated_option
  • per_page
  1. 使用Hexo 中文命令教程构建、预览博客

使用 git 管理备份项目(非 GitHub Pages)

  1. 在 GitHub 创建空白项目
  2. 克隆到本地目录中(例如 Blog)
  3. 将 BlogTest 目录下所有内容(BlogTest/*)拷贝至 Blog 目录下

ICARUS 主题

安装

  1. 在 Blog 目录下,使用以下命令设置 git 子模块,以此种方式将 Icarus 主题克隆至 themes/icarus 目录下
1
git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus
  1. 在 Hexo 的_config.yml 文件中开启 Icarus
1
theme: icarus
  1. 运行 Hexo 命令根据提示安装未安装的模块