1. 安装 node.js 其中包含 npm包管理器
    • curl -fsSL https://deb.nodesource.com/setup_current.x | bash - apt-get install -y nodejs
  2. 安装cnpm,指定镜像源为taobao:npm install -g cnpm --registry=https://registry.npm.taobao.org
  3. 安装hexo: cnpm install -g hexo-cli
  4. 在home下面建立一个blog文件夹
  5. 在blog文件夹中初始化博客 sudo hexo init
  6. 清理一下 hexo clean
  7. 创建一篇文章 hexo n ‘文章名字’
  8. 生成博客静态文件到默认设置的public文件夹 hexo g
  9. 启动hexo,本地预览:hexo s
  10. 安装 cnpm install --save hexo-deployer-git
  11. 设置_config.yml文件,打开之后 ,拉到最地下将
    1
    2
    3
    type: git 
    repo: http://github.com/blaoke/blaoke.github.io.git
    branch: master
  12. 部署到github,建立一个仓库 名字叫 blaoke.github.io,然后部署到远端 hexo d

主题butterfly

ref: https://github.com/jerryc127/hexo-theme-butterfly

  1. git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git themes/butterfly
  2. 安装pug 以及 stylus 的渲染器:npm install hexo-renderer-pug hexo-renderer-stylus
  3. 官方配置文档:https://butterfly.js.org/posts/dc584b87/#Post-Front-matter

左下角添加音乐

ref: https://guodongblog.com/posts/91597d56b19f/

  1. npm install --save hexo-tag-aplayer
  2. _config.butterfly.yml中添加如下设置,参数看ref
    1
    2
    3
    4
    inject:
    head:
    bottom:
    - <div class="aplayer no-destroy" data-id="7422861869" data-server="netease" data-type="playlist" data-fixed="true" data-autoplay="true" data-lrcType="-1"> </div>

主题配置web

  1. https://www.fomal.cc/