本博客的搭建方法

省流:Hexo框架 + Butterfly主题搭建博客

搭建方法主要参考:

https://butterfly.js.org/posts/21cfbf15/

https://nickxu.me/2022/02/13/Hexo%20+%20Butterfly%20%E5%BB%BA%E7%AB%99%E6%8C%87%E5%8D%97%EF%BC%88%E4%B8%80%EF%BC%89Hexo-%E6%A1%86%E6%9E%B6/

//初始化Hexo
hexo init MyBlog

@_config.yml配置文件
//修改基本信息,部署网址位置,这里我选择部署到github pages上(因为免费x

//安装hexo框架中的git部署
npm install hexo-deployer-git --save

*至此可以在公网上部署博客了,虽然是最基本的格式

//安装butterfly主题
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly

//安装渲染器插件
npm install hexo-renderer-pug hexo-renderer-stylus --save

*至此可以实现butterfly主题的博客

报错1:

image-20240830140436370

虽然只是个警告,但是这个警告表示找不到页面,到时候会打不开页面的,导致报错的原因是在主配置文件中将主题改成了butterfly(theme: butterfly),但是在theme文件夹里没有butterfly的原因

报错2:

image-20240830142055295

出现这个错误的原因只是因为没有安装渲染器插件,所以无法渲染页面而已(废话x