搭建个人博客的完整指南

在这篇文章中,我将分享如何从零开始搭建一个美观的个人博客。

为什么选择 Hexo + Butterfly

Hexo 是一个快速、简洁且高效的博客框架,而 Butterfly 主题则提供了丰富的功能和优雅的设计。

环境准备

  1. 安装 Node.js
  2. 安装 Git
  3. 安装 Hexo
1
npm install -g hexo-cli

创建博客

1
2
3
hexo init my-blog
cd my-blog
npm install

安装主题

1
git clone https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly

配置主题

在 _config.yml 中设置:

1
theme: butterfly

写作

创建新文章:

1
hexo new post "文章标题"

部署

1
2
3
hexo clean
hexo generate
hexo deploy

总结

搭建博客能记录生活和学习的点点滴滴。