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


title: 使用 Hexo,Material Theme 以及 Github Pages 搭建个人博客
date: 2019-04-29 00:05:50
tags: 其他
---

准备条件

  • 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

猜你喜欢

转载自www.cnblogs.com/justsong/p/10952870.html