Skip to content

Commit 7f23060

Browse files
committed
2016-02-27新增hexo
1 parent 49a64cc commit 7f23060

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

Hexo.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Linux-Tutorial
2+
3+
4+
1.安装 Git
5+
2.安装 Node.js
6+
http://nodejs.org/
7+
此时2016-02-27,最新的版本是:v5.7.0 Stable,如果你不是使用这个版本,不排除会有其他问题出现。
8+
9+
打开 cmd,输入:`npm -v`,如果能出现版本号代表没问题了
10+
11+
12+
打开 Git Shell,输入:
13+
npm install hexo-cli -g
14+
npm install hexo --save
15+
16+
17+
#如果命令无法运行,可以尝试更换taobao的npm源
18+
npm install -g cnpm --registry=https://registry.npm.taobao.org
19+
20+
假设我的 hexo 目录是放在:E:\git_code\hexo
21+
则在 Git Shell 中进入该目录
22+
23+
然后执行:`hexo init`
24+
再执行:`npm install`
25+
26+
然后在hexo的目录就会生成很多子目录和文件
27+
28+
现在来安装Hexo插件
29+
30+
npm install hexo-generator-index --save
31+
npm install hexo-generator-archive --save
32+
npm install hexo-generator-category --save
33+
npm install hexo-generator-tag --save
34+
npm install hexo-server --save
35+
npm install hexo-deployer-git --save
36+
npm install hexo-deployer-heroku --save
37+
npm install hexo-deployer-rsync --save
38+
npm install hexo-deployer-openshift --save
39+
npm install hexo-renderer-marked@0.2 --save
40+
npm install hexo-renderer-stylus@0.2 --save
41+
npm install hexo-generator-feed@1 --save
42+
npm install hexo-generator-sitemap@1 --save
43+
44+
然后启动服务测试:命令:`hexo server`
45+
46+
浏览器访问:`localhost:4000`
47+
48+
然后再 Github 上创建一个仓库,仓库名就是你的 Github 账号登录名,比如我的用户名是:judasn,那我要创建的仓库名字填写:judasn.github.io
49+
50+
首次创建耐心等待10分钟左右审核,之后即可访问静态主页如http://judasn.github.io
51+
52+
同步内容至GitHub
53+
其实就是把hexo生成的public目录下的所有文件复制到judasn.github.io这个项目的根目录下,github会自动识别的,不然没啥的。
54+
55+
56+
57+
资料:
58+
http://wsgzao.github.io/post/hexo-guide/
59+
60+
61+

0 commit comments

Comments
 (0)