子臣的个人博客

0%

hexo-next使用

  1. 管理员模式进入cmd

    1
    2
    3
    4
    5
    6
    7
    hexo init blog
    cd blog
    git clone https://github.com/iissnan/hexo-theme-next themes/next
    查看:
    hexo clean
    hexo g
    hexo s
  2. 新建github仓库

  3. 修改配置

    1. 基础修改
      menu:
      home: /
      archives: /archives
      #about: /about
      #categories: /categories
      tags: /tags
      #commonweal: /404.html

    2. 增加头像
      将头像放置主题目录下的 source/uploads/ (新建 uploads 目录若不存在)
      配置为:avatar: /uploads/avatar.png
      或者 放置在 source/images/ 目录下
      配置为:avatar: /images/avatar.png

    3. 增加背景动画
      canvas_nest
      canvas_nest: true //开启动画
      canvas_nest: false //关闭动画

      three_waves
      three_waves: true //开启动画
      three_waves: false //关闭动画

      1. 增加评论系统

      2. 首页不显示全文

        auto_excerpt:

        ​ enable: false (改为true)

        ​ length: 150

  4. 安装 hexo-deployer-git
    npm install hexo-deployer-git –save
    配置:
    deploy:
    type: git
    repo: https://github.com/WangZiChen1996/landu.git
    branch: master
    推送:hexo d