使用 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中的如下项:
    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并修改如下项:
    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
相关文章
相关标签/搜索