-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
604 lines (403 loc) · 34.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Jason Koo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description">
<meta property="og:type" content="website">
<meta property="og:title" content="Jason Koo">
<meta property="og:url" content="http://jasonkoo.github.io/index.html">
<meta property="og:site_name" content="Jason Koo">
<meta property="og:description">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Jason Koo">
<meta name="twitter:description">
<link rel="alternative" href="/atom.xml" title="Jason Koo" type="application/atom+xml">
<link rel="icon" href="/img/favicon-32x32.png">
<link rel="stylesheet" href="/css/style.css" type="text/css">
</head>
<body>
<div id="container">
<div class="left-col">
<div class="overlay"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img lazy-src="/img/myavatar.JPG" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/">Jason Koo</a></h1>
</hgroup>
<p class="header-subtitle">Jason's Geyser</p>
<div class="switch-btn">
<div class="icon">
<div class="icon-ctn">
<div class="icon-wrap icon-house" data-idx="0">
<div class="birdhouse"></div>
<div class="birdhouse_holes"></div>
</div>
<div class="icon-wrap icon-ribbon hide" data-idx="1">
<div class="ribbon"></div>
</div>
<div class="icon-wrap icon-link hide" data-idx="2">
<div class="loopback_l"></div>
<div class="loopback_r"></div>
</div>
<div class="icon-wrap icon-me hide" data-idx="3">
<div class="user"></div>
<div class="shoulder"></div>
</div>
</div>
</div>
<div class="tips-box hide">
<div class="tips-arrow"></div>
<ul class="tips-inner">
<li>菜单</li>
<li>标签</li>
<li>友情链接</li>
<li>关于我</li>
</ul>
</div>
</div>
<div class="switch-area">
<div class="switch-wrap">
<section class="switch-part switch-part1">
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/jasonkoo/following" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/jasonkoo" title="weibo">weibo</a>
<a class="rss" target="_blank" href="/#" title="rss">rss</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/gulei" title="zhihu">zhihu</a>
</div>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<a href="/tags/Git/" style="font-size: 10px;">Git</a> <a href="/tags/GitHub/" style="font-size: 10px;">GitHub</a> <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/Node-js/" style="font-size: 10px;">Node.js</a> <a href="/tags/Proxy/" style="font-size: 10px;">Proxy</a> <a href="/tags/Shadowsocks/" style="font-size: 10px;">Shadowsocks</a> <a href="/tags/Ubuntu/" style="font-size: 10px;">Ubuntu</a> <a href="/tags/music/" style="font-size: 10px;">music</a> <a href="/tags/nvm/" style="font-size: 10px;">nvm</a> <a href="/tags/songs/" style="font-size: 10px;">songs</a>
</div>
</section>
<section class="switch-part switch-part3">
<div id="js-friends">
<a target="_blank" class="main-nav-link switch-friends-link" href="http://litten.github.io/">Litten</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://localhost:4000/">卡卡的美丽传说</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://localhost:4000/">本泽马的博客</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://localhost:4000/">吉格斯的博客</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://localhost:4000/">习大大大不同</a>
<a target="_blank" class="main-nav-link switch-friends-link" href="http://localhost:4000/">托蒂的博客</a>
</div>
</section>
<section class="switch-part switch-part4">
<div id="js-aboutme">我是谁,我从哪里来,我到哪里去?我就是我,是颜色不一样的吃货…</div>
</section>
</div>
</div>
</header>
</div>
</div>
<div class="mid-col">
<nav id="mobile-nav">
<div class="overlay">
<div class="slider-trigger"></div>
<h1 class="header-author js-mobile-header hide">Jason Koo</h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img lazy-src="/img/myavatar.JPG" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author">Jason Koo</h1>
</hgroup>
<p class="header-subtitle">Jason's Geyser</p>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/jasonkoo/following" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/jasonkoo" title="weibo">weibo</a>
<a class="rss" target="_blank" href="/#" title="rss">rss</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/gulei" title="zhihu">zhihu</a>
</div>
</nav>
</header>
</div>
</nav>
<div class="body-wrap">
<article id="post-setup-shadowsocks-on-ubuntu" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/10/13/setup-shadowsocks-on-ubuntu/" class="article-date">
<time datetime="2015-10-13T13:50:08.000Z" itemprop="datePublished">2015-10-13</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/10/13/setup-shadowsocks-on-ubuntu/">Setup Shadowsocks on Ubuntu</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="What_is_Shadowsocks?">What is Shadowsocks?</h2><p>Shadowsocks is a fast tunnel proxy that helps you bypass firewalls.</p>
<h2 id="Installation">Installation</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ sudo apt-get install python-pip</span><br><span class="line">$ sudo pip install shadowsocks</span><br></pre></td></tr></table></figure>
<h2 id="Configuration">Configuration</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ vi /etc/shadowsocks.json</span><br></pre></td></tr></table></figure>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">{</span><br><span class="line"> "<span class="attribute">server</span>":<span class="value"><span class="string">"45.33.34.238"</span></span>,</span><br><span class="line"> "<span class="attribute">server_port</span>":<span class="value"><span class="number">27886</span></span>,</span><br><span class="line"> "<span class="attribute">local_address</span>": <span class="value"><span class="string">"127.0.0.1"</span></span>,</span><br><span class="line"> "<span class="attribute">local_port</span>":<span class="value"><span class="number">1080</span></span>,</span><br><span class="line"> "<span class="attribute">password</span>":<span class="value"><span class="string">"xxxxxxxxxxx"</span></span>,</span><br><span class="line"> "<span class="attribute">timeout</span>":<span class="value"><span class="number">300</span></span>,</span><br><span class="line"> "<span class="attribute">method</span>":<span class="value"><span class="string">"aes-256-cfb"</span></span>,</span><br><span class="line"> "<span class="attribute">fast_open</span>":<span class="value"><span class="literal">false</span></span><br><span class="line"></span>}</span><br></pre></td></tr></table></figure>
<h2 id="Starting_and_Stopping_Client">Starting and Stopping Client</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># start client in background to connect to the proxy server</span></span><br><span class="line">$ sslocal -c /etc/shadowsocks.json <span class="operator">-d</span> start</span><br><span class="line"><span class="comment"># stop client</span></span><br><span class="line">$ sslocal -c /etc/shadowsocks.json <span class="operator">-d</span> stop</span><br></pre></td></tr></table></figure>
<h2 id="Starting_Client_Upon_Startup_of_Ubuntu">Starting Client Upon Startup of Ubuntu</h2><p>Add <code>sslocal -c /etc/shadowsocks.json -d start</code> to /etc/rc.local</p>
<h2 id="Chrome_Setting">Chrome Setting</h2><p>设置 -> 显示高级设置 -> 更改代理服务器设置 -> 网络代理 -> Socks主机:127.0.0.1:1080</p>
<h2 id="Firefox_Setting">Firefox Setting</h2><p>左上方 -> 工具 -> 添加附件 -> 搜索AutoProxy,并下载安装 -> 重启Firefox -> AutoProxy首选项 -> 代理服务器 -> 编辑代理服务器 -> 添加代理:Shadowsocks, 127.0.0.1:1080, socks5 -> 确定 -> 全局模式使用Shadowsocks</p>
<h2 id="References">References</h2><p><a href="https://github.com/shadowsocks/shadowsocks/wiki" target="_blank" rel="external">Shadowsocks Wiki</a><br><a href="https://github.com/shadowsocks/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E" target="_blank" rel="external">Shadowsocks Tutorial</a><br><a href="https://github.com/shadowsocks/shadowsocks/wiki/Configuration-via-Config-File" target="_blank" rel="external">Configuration via Config File</a></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Proxy/">Proxy</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Shadowsocks/">Shadowsocks</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Ubuntu/">Ubuntu</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/Tools/">Tools</a><a class="article-category-link" href="/categories/Tools/Proxy/">Proxy</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-my-song-list" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/10/11/my-song-list/" class="article-date">
<time datetime="2015-10-11T10:51:29.000Z" itemprop="datePublished">2015-10-11</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/10/11/my-song-list/">我喜欢的一些歌曲</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="国内">国内</h2><ul>
<li>李白 李荣浩</li>
<li>老街 李荣浩</li>
<li>模特 李荣浩</li>
<li>行走的力量 李荣浩</li>
<li>Power To Go 陈坤</li>
<li>终于等到你 张靓颖</li>
<li>那又如何 应嘉俐</li>
<li>当你老了 赵照</li>
<li>走在冷风中 刘思涵</li>
<li>时光倒流二十年 陈奕迅</li>
<li>一生中最爱(Live) 陈奕迅</li>
<li>十面埋伏 陈奕迅</li>
<li>你就不要想起我 田馥甄</li>
<li>魔鬼中的天使 田馥甄</li>
<li>南海姑娘 王菲</li>
<li>空白格 杨宗纬</li>
<li>其实都没有 杨宗纬</li>
<li>我变了 我没变 杨宗纬</li>
<li>Beautiful Love 蔡健雅</li>
<li>没有围墙的世界 莫文蔚</li>
<li>送别 陈绮贞</li>
<li>送别 朴树</li>
<li>平凡之路 朴树</li>
<li>你是我心爱的姑娘 汪峰</li>
<li>月半小夜曲 李克勤</li>
<li>锋味 谢霆锋</li>
<li>我是真的爱你 李宗盛</li>
<li>我是真的爱你 魏雪漫</li>
<li>后会无期 邓紫棋</li>
<li>情歌而已 声音碎片</li>
<li>我是真的受伤了 王莞之</li>
<li>想把我唱给你听 老狼 王婧</li>
<li>我怀念的 孙燕姿</li>
<li>爱一点 莫艳琳</li>
<li>流星(Live) 李文琦</li>
<li>原谅不美好 郁可唯</li>
<li>爱一点 王力宏 章子怡</li>
<li>哪里是你的拥抱 逃跑计划</li>
<li>贝加尔湖畔 李健</li>
<li>星空 五月天</li>
<li>她说 林俊杰</li>
<li>我(国语版) 张国荣</li>
<li>我(粤语版) 张国荣</li>
<li>是什么让我遇见这样的你 白安</li>
<li>是什么让我遇见这样的你 李文琦</li>
</ul>
<h2 id="国外">国外</h2><ul>
<li>Demons Imagine Dragons</li>
<li>I Am You Kim Taylor</li>
<li>Hooked on a Feeling Blue Swede</li>
<li>These Are The Words James Blunt</li>
<li>Annie James Blunt</li>
<li>Best Laid Plans James Blunt</li>
<li>1973 James Blunt</li>
<li>Tell Me If You Wanna Go Home Keira Knightley</li>
<li>Yellow Jem</li>
<li>Viva La Vida David Garrett</li>
<li>Viva La Vida Coldplay</li>
<li>The Cello Song The Piano Guys</li>
<li>How Long Will I Love You Jon Boden and Sam Sweeney and Ben Coleman</li>
<li>How Long Will I Love You Ellie Goulding</li>
<li>Imagine Jack Johnson</li>
<li>Tuesday Five for Fighting</li>
<li>Vincent Aiza Seguerra</li>
<li>You Are My Sunshine Elizabeth Mitchell</li>
<li>Shoot The Moon Norah Jones</li>
<li>Seasons in the Sun Black Box Recorder</li>
<li>Let Her Go Passenger</li>
<li>Suddenly Thirteen Senses</li>
</ul>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/music/">music</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/songs/">songs</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/life/">life</a><a class="article-category-link" href="/categories/life/music/">music</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-hello-world" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/10/11/hello-world/" class="article-date">
<time datetime="2015-10-11T07:09:27.296Z" itemprop="datePublished">2015-10-11</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/10/11/hello-world/">Hello World</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Welcome to <a href="http://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="http://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="http://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick_Start">Quick Start</h2><h3 id="Create_a_new_post">Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run_server">Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate_static_files">Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy_to_remote_sites">Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
</div>
<div class="article-info article-info-index">
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-hexo-blogging" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/10/11/hexo-blogging/" class="article-date">
<time datetime="2015-10-11T07:08:38.000Z" itemprop="datePublished">2015-10-11</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/10/11/hexo-blogging/">Use Hexo to Create a Personal Blog on Github</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h2 id="What_is_Hexo?">What is Hexo?</h2><p>Hexo is a fast, simple and powerful blog framework.</p>
<h2 id="Installation">Installation</h2><h3 id="Install_Git">Install Git</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo apt-get install git-core</span><br></pre></td></tr></table></figure>
<h3 id="Install_Node-js">Install Node.js</h3><p>The best way to install Node.js is with Node Version Manager, nvm for short.</p>
<ul>
<li><p>Install nvm</p>
<ul>
<li><p>Install script</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ wget -qO- https://raw.github.com/creationix/nvm/master/install.sh | sh</span><br></pre></td></tr></table></figure>
</li>
<li><p>Manual install</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ git <span class="built_in">clone</span> https://github.com/creationix/nvm.git ~/.nvm && <span class="built_in">cd</span> ~/.nvm && git checkout `git describe --abbrev=<span class="number">0</span> --tags`</span><br><span class="line"><span class="comment"># To activate nvm, you need to source it from your shell. Add it your `~/.bashrc`, `~/.profile` file to have it automatically sourced upon login.</span></span><br><span class="line">$ . ~/.nvm/nvm.sh</span><br></pre></td></tr></table></figure>
</li>
</ul>
</li>
</ul>
<p><strong>Often I also put in a line to use a specific version of node.</strong> Add <code>nvm use 0.12</code> to your <code>~/.bashrc</code>, <code>~/.profile</code> file.</p>
<ul>
<li>Install Node.js</li>
</ul>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ nvm install <span class="number">0.12</span></span><br><span class="line"><span class="comment"># Must tell nvm to use the specific version of Node.js just installed.</span></span><br><span class="line">$ nvm use <span class="number">0.12</span></span><br></pre></td></tr></table></figure>
<h3 id="Install_Hexo">Install Hexo</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install -g hexo-cli</span><br></pre></td></tr></table></figure>
<h2 id="Create_a_repo_named_jasonkoo-github-io_on_Github">Create a repo named <strong>jasonkoo.github.io</strong> on Github</h2><h2 id="Setup">Setup</h2><h3 id="Initialize_Hexo">Initialize Hexo</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">$ mkdir jasonkoo.github.io</span><br><span class="line">$ <span class="built_in">cd</span> jasonkoo.github.io</span><br><span class="line">$ hexo init .</span><br><span class="line">$ npm install</span><br></pre></td></tr></table></figure>
<h3 id="Install_Yilia_Theme">Install Yilia Theme</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">cd</span> jasonkoo.github.io/themes</span><br><span class="line">$ git <span class="built_in">clone</span> https://github.com/litten/hexo-theme-yilia.git yilia</span><br></pre></td></tr></table></figure>
<h3 id="Install_hexo-deployer-git">Install hexo-deployer-git</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install hexo-deployer-git --save</span><br></pre></td></tr></table></figure>
<h3 id="Edit__config-yml">Edit _config.yml</h3><p>Configure site tile, subtile, author, URl, theme and git deployment.</p>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br></pre></td><td class="code"><pre><span class="line"># Hexo Configuration</span><br><span class="line">## Docs: http://hexo.io/docs/configuration.html</span><br><span class="line">## Source: https://github.com/hexojs/hexo/</span><br><span class="line"></span><br><span class="line"># Site</span><br><span class="line">title: Jason Koo </span><br><span class="line">subtitle: Jason's Geyser</span><br><span class="line">description: </span><br><span class="line">author: Jason Koo</span><br><span class="line">language:</span><br><span class="line">timezone:</span><br><span class="line"></span><br><span class="line"># URL</span><br><span class="line">## If your site is put in a subdirectory, <span class="operator"><span class="keyword">set</span> <span class="keyword">url</span> <span class="keyword">as</span> <span class="string">'http://yoursite.com/child'</span> <span class="keyword">and</span> root <span class="keyword">as</span> <span class="string">'/child/'</span></span><br><span class="line"><span class="keyword">url</span>: <span class="keyword">http</span>://jasonkoo.github.io </span><br><span class="line">root: /</span><br><span class="line">permalink: :<span class="keyword">year</span>/:<span class="keyword">month</span>/:<span class="keyword">day</span>/:title/</span><br><span class="line">permalink_defaults:</span><br><span class="line"></span><br><span class="line"># <span class="keyword">Directory</span></span><br><span class="line">source_dir: <span class="keyword">source</span></span><br><span class="line">public_dir: <span class="keyword">public</span></span><br><span class="line">tag_dir: tags</span><br><span class="line">archive_dir: archives</span><br><span class="line">category_dir: categories</span><br><span class="line">code_dir: downloads/code</span><br><span class="line">i18n_dir: :lang</span><br><span class="line">skip_render:</span><br><span class="line"></span><br><span class="line"># Writing</span><br><span class="line">new_post_name: :title.md # <span class="keyword">File</span> <span class="keyword">name</span> <span class="keyword">of</span> <span class="keyword">new</span> posts</span><br><span class="line">default_layout: post</span><br><span class="line">titlecase: <span class="literal">false</span> # Transform title <span class="keyword">into</span> titlecase</span><br><span class="line">external_link: <span class="literal">true</span> # <span class="keyword">Open</span> <span class="keyword">external</span> links <span class="keyword">in</span> <span class="keyword">new</span> tab</span><br><span class="line">filename_case: <span class="number">0</span></span><br><span class="line">render_drafts: <span class="literal">false</span></span><br><span class="line">post_asset_folder: <span class="literal">false</span></span><br><span class="line">relative_link: <span class="literal">false</span></span><br><span class="line">future: <span class="literal">true</span></span><br><span class="line">highlight:</span><br><span class="line"> <span class="keyword">enable</span>: <span class="literal">true</span></span><br><span class="line"> line_number: <span class="literal">true</span></span><br><span class="line"> auto_detect: <span class="literal">true</span></span><br><span class="line"> tab_replace:</span><br><span class="line"></span><br><span class="line"># <span class="keyword">Category</span> & Tag</span><br><span class="line">default_category: uncategorized</span><br><span class="line">category_map:</span><br><span class="line">tag_map:</span><br><span class="line"></span><br><span class="line"># <span class="built_in">Date</span> / <span class="keyword">Time</span> <span class="keyword">format</span></span><br><span class="line">## Hexo uses Moment.js <span class="keyword">to</span> <span class="keyword">parse</span> <span class="keyword">and</span> display <span class="built_in">date</span></span><br><span class="line">## You can customize the <span class="built_in">date</span> <span class="keyword">format</span> <span class="keyword">as</span> defined <span class="keyword">in</span></span><br><span class="line">## <span class="keyword">http</span>://momentjs.com/docs/#/displaying/<span class="keyword">format</span>/</span><br><span class="line"><span class="keyword">date_format</span>: YYYY-MM-DD</span><br><span class="line"><span class="keyword">time_format</span>: HH:mm:ss</span><br><span class="line"></span><br><span class="line"># Pagination</span><br><span class="line">## <span class="keyword">Set</span> per_page <span class="keyword">to</span> <span class="number">0</span> <span class="keyword">to</span> <span class="keyword">disable</span> pagination</span><br><span class="line">per_page: <span class="number">10</span></span><br><span class="line">pagination_dir: page</span><br><span class="line"></span><br><span class="line"># Extensions</span><br><span class="line">## Plugins: <span class="keyword">http</span>://hexo.io/plugins/</span><br><span class="line">## Themes: <span class="keyword">http</span>://hexo.io/themes/</span><br><span class="line">theme: yilia</span><br><span class="line"></span><br><span class="line"># Deployment</span><br><span class="line">## Docs: <span class="keyword">http</span>://hexo.io/docs/deployment.html</span><br><span class="line">deploy:</span><br><span class="line"> <span class="keyword">type</span>: git</span><br><span class="line"> repo: [email protected]:jasonkoo/jasonkoo.github.io.git</span></span><br></pre></td></tr></table></figure>
<h2 id="New_Post_Creation">New Post Creation</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"hexo blogging"</span></span><br><span class="line">$ vi <span class="built_in">source</span>/_post/hexo-blogging.md</span><br></pre></td></tr></table></figure>
<h2 id="Generating_and_Deployment">Generating and Deployment</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate --deploy</span><br><span class="line"><span class="comment"># or</span></span><br><span class="line">$ hexo deploy --generate</span><br></pre></td></tr></table></figure>
<h2 id="References">References</h2><p><a href="https://hexo.io/" target="_blank" rel="external">Hexo Official Website</a><br><a href="https://hexo.io/docs/index.html" target="_blank" rel="external">How to Install Hexo</a><br><a href="https://github.com/creationix/nvm" target="_blank" rel="external">Node Version Manager</a><br><a href="https://github.com/litten/hexo-theme-yilia" target="_blank" rel="external">Hexo Theme Yilia</a><br><a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Hexo Create a Post</a><br><a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Hexo Generating</a><br><a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Hexo Deployment</a></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Git/">Git</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/GitHub/">GitHub</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Hexo/">Hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Node-js/">Node.js</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/nvm/">nvm</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/Tools/">Tools</a><a class="article-category-link" href="/categories/Tools/Blog/">Blog</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
© 2015 Jason Koo
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
</div>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
<script>
var yiliaConfig = {
fancybox: true,
mathjax: true,
animate: true,
isHome: true,
isPost: false,
isArchive: false,
isTag: false,
isCategory: false,
open_in_new: false
}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/js/main.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</div>
</body>
</html>