`
wiselyman
  • 浏览: 2081271 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
博客专栏
Group-logo
点睛Spring4.1
浏览量:81118
74ae1471-94c5-3ae2-b227-779326b57435
点睛Spring MVC4...
浏览量:130150
社区版块
存档分类
最新评论

利用Github pages建站

 
阅读更多

前面我写了一篇《利用Github pages建站-超简单小白专属 》

随着hexo版本的升级,我在这篇博文里对内容进行更新

 

GitHub准备

  • 注册github账号,并新建一个用户名+github.io的repository

下载安装nodejs

安装hexo

npm install hexo-cli -g #安装
hexo init blog #初始化项目
cd blog
npm install #安装依赖
hexo server #本地查看效果,访问地址为http://localhost:4000

更换主题

  • 安装配置freemind主题
  • 在blog目录下
  • git clone https://github.com/wzpan/hexo-theme-freemind.git themes/freemind
  • npm install hexo-tag-bootstrap --save
  • 添加blog目录下添加的source目录下分别添加categories,tags,about,并分别新建index.html

    内容分别如下:

title: Categories
layout: categories
---
title: Tags
layout: tags
---
title: About
layout: page
---

Something about me. ;-)
  • 配置freemind

blog\themes\freemind目录下有个_config.yml请按照需要修改

配置hexo

  • blog根目录下也有个_config.yml,按照自己需求修改
  • 其中主题修改theme: freemind

发布到github

  • 先安装git部署插件
npm install hexo-deployer-git --save
  • 修改根目录下_config.yml
deploy:
  type: git
  repository: https://github.com/wiselyman/wiselyman.github.io.git
  branch: master
  • 发布
hexo clean  
hexo generate  
hexo deploy #输入帐号密码
   

 

 

效果:

 



 

  • 大小: 176.3 KB
0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics