使用 Hexo,Material Theme 以及 Github Pages 搭建个人博客

准备条件

  • Node.js
  • npm
  • Git
  • GitHub账号

开始搭建

  1. hexo init Blog
  2. cd Blog
  3. npm install hexo-deployer-git --save
  4. npm install hexo-material
  5. cp node_modules/hexo-material themes/material
  6. 修改博客根目录下的_config.yml中的以下项:
    title: JustSong
    author: Song
    language: en
    theme: material
    deploy:
      type: git
      repository: https://github.com/songwonderful/songwonderful.github.io
      branch: master
    
  7. 重命名themes/material下的_config.template.yml_config.yml并修改以下项:
    slogan: "尽人事,听天命"
    github: https://github.com/songwonderful
    zhihu: https://www.zhihu.com/people/songwonderful/
    

注意事项

  • Powershell下中文显示可能不正常,推荐使用CMD
  • 使用npm install hexo-material仅仅是为了获取主题文件
  • 使用git config core.autocrlf true消除LF will be replaced by CRLF警告

常用命令

  • hexo new "article name"
  • hexo g -d
  • hexo s
  • hexo new page about
posted @ 2019-05-31 00:03  JustSong  阅读(543)  评论(0编辑  收藏  举报