-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
581 lines (411 loc) · 29.2 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>张荣的自留地</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="好好耕耘">
<meta property="og:type" content="website">
<meta property="og:title" content="张荣的自留地">
<meta property="og:url" content="http://blog.zhangbody.com/index.html">
<meta property="og:site_name" content="张荣的自留地">
<meta property="og:description" content="好好耕耘">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="张荣的自留地">
<meta name="twitter:description" content="好好耕耘">
<link rel="alternative" href="/atom.xml" title="张荣的自留地" type="application/atom+xml">
<link rel="icon" href="/favicon.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="null" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/">zhangbody</a></h1>
</hgroup>
<p class="header-subtitle">不只一亩三分</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="/">Index</a></li>
<li><a href="/reading">Reading</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/categories">Categories</a></li>
<li><a href="/about">About Me</a></li>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/zhangbody" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/zhangbody" title="weibo">weibo</a>
<a class="rss" target="_blank" href="/atom.xml" title="rss">rss</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/zhang-rong-9" title="zhihu">zhihu</a>
</div>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<a href="/tags/DT-Grid/" style="font-size: 10px;">DT Grid</a> <a href="/tags/Hexo/" style="font-size: 10px;">Hexo</a> <a href="/tags/RequireJS/" style="font-size: 10px;">RequireJS</a> <a href="/tags/Web/" style="font-size: 20px;">Web</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://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">zhangbody</h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img lazy-src="null" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author">zhangbody</h1>
</hgroup>
<p class="header-subtitle">不只一亩三分</p>
<nav class="header-menu">
<ul>
<li><a href="/">Index</a></li>
<li><a href="/reading">Reading</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/categories">Categories</a></li>
<li><a href="/about">About Me</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/zhangbody" title="github">github</a>
<a class="weibo" target="_blank" href="http://weibo.com/zhangbody" title="weibo">weibo</a>
<a class="rss" target="_blank" href="/atom.xml" title="rss">rss</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/zhang-rong-9" title="zhihu">zhihu</a>
</div>
</nav>
</header>
</div>
</nav>
<div class="body-wrap">
<article id="post-150628-DtGrid-RequireJS" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/06/28/150628-DtGrid-RequireJS/" class="article-date">
<time datetime="2015-06-28T10:14:39.000Z" itemprop="datePublished">2015-06-28</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/06/28/150628-DtGrid-RequireJS/">DT Grid,RequireJS 混用的坑</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>寥寥几句说完算了。</p>
<p>项目前端所用技术简介:</p>
<ul>
<li>项目是 Web SPA 应用,使用 RequireJS 管理插件,MVVM 框架是 avalon</li>
<li>index.html 引入了 jquery、bootstrap、dtGrid 等三个 js 文件</li>
<li>RequireJS 中也配置了 jquery 插件</li>
</ul>
<p>出现的症状:</p>
<ul>
<li>子模块初始化 dtGrid 时,dtGrid 的 init 方法会出现错误</li>
<li>用 RequireJS 引入 dtGrid 作为插件后,dtGrid 的 init 方法依然出现错误,但问题变了</li>
</ul>
<p>估计问题原因如下:</p>
<ul>
<li>jquery 和 dtGrid 在 index.html 中引入了</li>
<li>dtGrid 是 jquery 插件,使用了 fn 作用域</li>
<li>jquery 在 RequireJS 中也进行了配置</li>
<li>dtGrid 初始化时引用了 RequireJS 模块中 jquery 插件的作用域</li>
</ul>
<p>解决的办法:</p>
<ul>
<li>去掉 RequireJS 中所有的 jquery 引用</li>
</ul>
<p>为何如此解决?</p>
<ul>
<li>dtGrid 还要引用 bootstrap 等插件,依赖关系后面会越来越复杂</li>
<li>所有和显示有关的 js/css 都在 index.html 中引入,如果显示控件有问题,只能说明选错了控件库</li>
<li>所有和业务有关的 js 都用 RequireJS 管理</li>
<li>做一个折中</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/DT-Grid/">DT Grid</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/RequireJS/">RequireJS</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Web/">Web</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/Web/">Web</a>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-150625-hexo-install" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/06/25/150625-hexo-install/" class="article-date">
<time datetime="2015-06-25T06:33:58.000Z" itemprop="datePublished">2015-06-25</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/06/25/150625-hexo-install/">Hexo 安装小计</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="1、操作_Github">1、操作 Github</h1><p>安装好 hexo 后,怎么也要部署到网上上去吧!Github 的申请就不说明了,大家都知道。重点是和 hexo 的配合。</p>
<h2 id="1-1_申请_repo">1.1 申请 repo</h2><p>点击 Github 站点右上方的 <code>new repository</code>,创建一个名为 <code>zhangbody.github.com</code> 的 repo(<code>仓库名必须为【your_user_name.github.io】</code>)。</p>
<p>将 URL <code>https://github.com/zhangbody/zhangbody.github.com.git</code> 拷贝下来待用。</p>
<h1 id="2、安装_hexo">2、安装 hexo</h1><h2 id="2-1_安装_node-js">2.1 安装 node.js</h2><p>安装 <a href="https://nodejs.org/download/">Node.js</a> 或 <a href="https://iojs.org/en/index.html">io.js</a> 都可以。</p>
<h2 id="2-2_安装_hexo">2.2 安装 hexo</h2><p>利用 npm 命令</p>
<figure class="highlight js"><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</span><br></pre></td></tr></table></figure>
<p>安装完成后,自己找一个文件夹(如 <code>H:\hexo</code>)准备初始化 hexo。</p>
<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 init</span><br><span class="line">npm install</span><br></pre></td></tr></table></figure>
<h2 id="2-3_检查安装情况">2.3 检查安装情况</h2><p>运行以下命令,然后在浏览器输入 <code>localhost:4000</code> 查看博客的情况。<br><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 generate</span><br><span class="line">hexo server</span><br></pre></td></tr></table></figure></p>
<h2 id="2-4_配置_hexo">2.4 配置 hexo</h2><h3 id="2-4-1__config-yml">2.4.1 _config.yml</h3><p>编辑 <code>_config.yml</code> (在 <code>H:\hexo</code> 下)。下面是需要自己修改的部分。</p>
<figure class="highlight"><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></pre></td><td class="code"><pre><span class="line"># Site</span><br><span class="line">title: 张荣自己玩的地方</span><br><span class="line">subtitle: 看看上面</span><br><span class="line">description: 描述</span><br><span class="line">author: 张荣</span><br><span class="line">email: [email protected]</span><br><span class="line">language: zh-CN</span><br><span class="line">timezone: Asia/Shanghai</span><br><span class="line"></span><br><span class="line"># URL</span><br><span class="line">url: http://blog.zhangbody.com/</span><br><span class="line">root: /</span><br><span class="line"></span><br><span class="line"># Deployment</span><br><span class="line">deploy:</span><br><span class="line"> type: git</span><br><span class="line"> # Gitbub 的 URL 用在这里了</span><br><span class="line"> repository: https://github.com/zhangbody/zhangbody.github.com.git</span><br><span class="line"> branch: master</span><br></pre></td></tr></table></figure>
<h3 id="2-4-2_CNAME">2.4.2 CNAME</h3><p>这个和博客的域名解析有关,需要在 <code>H:\hexo\source</code> 下创建一个名为 <code>CNAME</code> 的文件,文件内容是自己使用的域名。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">blog.zhangbody.com</span><br></pre></td></tr></table></figure>
<h3 id="2-4-3_404-html">2.4.3 404.html</h3><p>再单独创建一个 404 页面,也放在 <code>H:\hexo\source</code> 下面,这个就不细说了。</p>
<figure class="highlight html"><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></pre></td><td class="code"><pre><span class="line">---</span><br><span class="line">layout: default</span><br><span class="line">---</span><br><span class="line"><span class="tag"><<span class="title">html</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">head</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">meta</span> <span class="attribute">charset</span>=<span class="value">"UTF-8"</span> /></span></span><br><span class="line"> <span class="tag"><<span class="title">title</span>></span>404<span class="tag"></<span class="title">title</span>></span></span><br><span class="line"> <span class="tag"></<span class="title">head</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">body</span>></span></span><br><span class="line"> <span class="tag"><<span class="title">script</span> <span class="attribute">type</span>=<span class="value">"text/javascript"</span> <span class="attribute">src</span>=<span class="value">"http://www.qq.com/404/search_children.js"</span> <span class="attribute">charset</span>=<span class="value">"utf-8"</span>></span><span class="undefined"></span><span class="tag"></<span class="title">script</span>></span></span><br><span class="line"> <span class="tag"></<span class="title">body</span>></span></span><br><span class="line"><span class="tag"></<span class="title">html</span>></span></span><br></pre></td></tr></table></figure>
<h2 id="2-5_部署_hexo">2.5 部署 hexo</h2><p>执行下列指令即可完成部署,部署过程中需要输入 Github 的用户名和密码。</p>
<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 generate</span><br><span class="line">hexo deploy</span><br></pre></td></tr></table></figure>
<h1 id="3、写文章">3、写文章</h1><p>使用如下命令创建新文章。</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">hexo n [文章名称]</span><br></pre></td></tr></table></figure>
<p>hexo 会在 <code>H:\hexo\source\_posts\</code> 目录下创建 <code>[文章名称].md</code> 文件。</p>
<h1 id="3、命令">3、命令</h1><h1 id="3-1_常用命令">3.1 常用命令</h1><table>
<thead>
<tr>
<th>命令</th>
<th style="text-align:right"></th>
<th style="text-align:center">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>hexo g</td>
<td style="text-align:right">hexo generate</td>
<td style="text-align:center">生成静态页面至public目录</td>
</tr>
<tr>
<td>hexo d</td>
<td style="text-align:right">hexo deploy</td>
<td style="text-align:center">将.deploy目录部署到GitHub</td>
</tr>
<tr>
<td>hexo s</td>
<td style="text-align:right">hexo server</td>
<td style="text-align:center">开启预览访问端口(默认端口4000,’ctrl + c’关闭server)</td>
</tr>
<tr>
<td>hexo n “postName”</td>
<td style="text-align:right">hexo new “postName”</td>
<td style="text-align:center">新建文章</td>
</tr>
<tr>
<td>hexo n page “pageName”</td>
<td style="text-align:right">hexo new page “pageName”</td>
<td style="text-align:center">新建页面</td>
</tr>
<tr>
<td>hexo clean</td>
<td style="text-align:right"></td>
<td style="text-align:center">121</td>
</tr>
<tr>
<td>hexo help</td>
<td style="text-align:right"></td>
<td style="text-align:center">查看帮助</td>
</tr>
<tr>
<td>hexo version</td>
<td style="text-align:right"></td>
<td style="text-align:center">查看Hexo的版本</td>
</tr>
</tbody>
</table>
<h1 id="3-2_复合命令">3.2 复合命令</h1><table>
<thead>
<tr>
<th>命令</th>
<th style="text-align:center">说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>hexo deploy -g</td>
<td style="text-align:center">生成加部署</td>
</tr>
<tr>
<td>hexo server -g</td>
<td style="text-align:center">生成加预览</td>
</tr>
</tbody>
</table>
<h1 id="4、Theme_皮肤">4、Theme 皮肤</h1><h2 id="4-1_安装">4.1 安装</h2><p>安装方式如下</p>
<blockquote>
<p>$ cd <code>H:\hexo\</code><br>$ git clone <a href="https://github.com/litten/hexo-theme-yilia.git">https://github.com/litten/hexo-theme-yilia.git</a> themes/yilia</p>
</blockquote>
<p>然后修改<code>hexo</code>根目录下的<code>_config.yml</code>中的<code>theme</code>字段,改为<code>yilia</code></p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">theme: yilia</span><br></pre></td></tr></table></figure>
<h2 id="4-2_更新">4.2 更新</h2><blockquote>
<p>$ cd <code>H:\hexo\themes\yilia\</code><br>$ git pull</p>
</blockquote>
<h2 id="4-3_配置">4.3 配置</h2><p>这里以 yilia Theme 的配置为例,打开<code>H:\hexo\themes\yilia\_config.yml</code> 文件。<br>duoshuo 后面改为自己的多说 <code>short_name</code></p>
<figure class="highlight js"><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">#是否开启多说评论,填写你在多说申请的项目名称 duoshuo: duoshuo-key</span><br><span class="line">#若使用disqus,请在博客config文件中填写disqus_shortname,并关闭多说评论</span><br><span class="line">duoshuo: zhangbody</span><br></pre></td></tr></table></figure>
<h1 id="5、插件">5、插件</h1><p>插件的安装和配置啥的还是看主页去吧!</p>
<ul>
<li><a href="https://github.com/hexojs/hexo-generator-feed">hexo-generator-feed</a></li>
<li><a href="https://github.com/hexojs/hexo-migrator-rss">hexo-migrator-rss</a></li>
<li><a href="https://github.com/hexojs/hexo-generator-sitemap">hexo-generator-sitemap</a></li>
</ul>
<p>但是一些页面显示问题还是需要说的!</p>
<p>修改 <code>themes/yilia</code> 下的 <code>_config.yml</code> 文件,在 menu 节点下添加下面的内容。</p>
<figure class="highlight"><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></pre></td><td class="code"><pre><span class="line">menu:</span><br><span class="line"> 主页: /</span><br><span class="line"> 所有文章: /archives</span><br><span class="line"> Rss: /atom.xml</span><br><span class="line"> Sitemap: /sitemap.xml</span><br></pre></td></tr></table></figure>
<p>向 google 提交 sitemap,请参考【4】。</p>
<h2 id="5-1_安装">5.1 安装</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><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></pre></td><td class="code"><pre><span class="line">npm install hexo-deployer-git --save</span><br><span class="line">npm install hexo-generator-archive --save</span><br><span class="line">npm install hexo-generator-baidu-sitemap@<span class="number">0.1</span>.<span class="number">1</span> --save</span><br><span class="line">npm install hexo-generator-category --save</span><br><span class="line">npm install hexo-generator-feed --save</span><br><span class="line">npm install hexo-generator-index --save</span><br><span class="line">npm install hexo-generator-sitemap --save</span><br><span class="line">npm install hexo-generator-tag --save</span><br><span class="line">npm install hexo-renderer-ejs --save</span><br><span class="line">npm install hexo-renderer-marked --save</span><br><span class="line">npm install hexo-renderer-stylus --save</span><br><span class="line">npm install hexo-server --save</span><br></pre></td></tr></table></figure>
<h2 id="5-2_启用">5.2 启用</h2><p>修改 <code>H:\Hexo\_config.yml</code> 文件,增加如下内容。</p>
<figure class="highlight js"><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"># Extensions</span><br><span class="line">Plugins:</span><br><span class="line">- hexo-generator-feed</span><br><span class="line">- hexo-generator-sitemap</span><br><span class="line"></span><br><span class="line">#Feed Atom</span><br><span class="line">feed:</span><br><span class="line"> type: atom</span><br><span class="line"> path: atom.xml</span><br><span class="line"> limit: <span class="number">20</span></span><br></pre></td></tr></table></figure>
<h2 id="5-3_升级">5.3 升级</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">$ npm update</span><br></pre></td></tr></table></figure>
<h2 id="5-4_卸载">5.4 卸载</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">$ npm uninstall hexo-generator-sitemap</span><br></pre></td></tr></table></figure>
<h2 id="5-5_大配置,以后完善">5.5 大配置,以后完善</h2><figure class="highlight js"><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></pre></td><td class="code"><pre><span class="line">index_generator:</span><br><span class="line"> per_page: <span class="number">10</span> ##首页默认<span class="number">10</span>篇文章标题 如果值为<span class="number">0</span>不分页</span><br><span class="line">archive_generator:</span><br><span class="line"> per_page: <span class="number">10</span> ##归档页面默认<span class="number">10</span>篇文章标题</span><br><span class="line"> yearly: <span class="literal">true</span> ##生成年视图</span><br><span class="line"> monthly: <span class="literal">true</span> ##生成月视图</span><br><span class="line">tag_generator:</span><br><span class="line"> per_page: <span class="number">10</span> ##标签分类页面默认<span class="number">10</span>篇文章</span><br><span class="line">category_generator: </span><br><span class="line"> per_page: <span class="number">10</span> ###分类页面默认<span class="number">10</span>篇文章</span><br><span class="line">feed:</span><br><span class="line"> type: atom ##feed类型 atom或者rss2</span><br><span class="line"> path: atom.xml ##feed路径</span><br><span class="line"> limit: <span class="number">20</span> ##feed文章最小数量</span><br><span class="line">deploy:</span><br><span class="line"> type: git ##部署类型 其他类型自行google之</span><br><span class="line"> repo: <span class="xml"><span class="tag"><<span class="title">repository</span> <span class="attribute">url</span>></span> ##git仓库地址</span><br><span class="line"> branch: [branch] ##git 页面分支</span><br><span class="line"> message: [message] ##git message建议默认字段update 可以自定义</span><br><span class="line"> -多部署</span><br><span class="line"> deploy:</span><br><span class="line"> type: git</span><br><span class="line"> message: update ##git message建议默认字段update 可以自定义</span><br><span class="line"> repo: </span><br><span class="line"> github: <span class="tag"><<span class="title">repository</span> <span class="attribute">url</span>></span>,[branch] ##github 仓库地址和分支</span><br><span class="line"> gitcafe: <span class="tag"><<span class="title">repository</span> <span class="attribute">url</span>></span>,[branch] ##gitcafe 仓库地址和分支</span></span><br></pre></td></tr></table></figure>
<h1 id="6、域名">6、域名</h1><h1 id="7、其它">7、其它</h1>
</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/Hexo/">Hexo</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Web/">Web</a></li></ul>
</div>
<div class="article-category tagcloud">
<a class="article-category-link" href="/categories/Web/">Web</a>
</div>
<p class="article-more-link">
<a href="/2015/06/25/150625-hexo-install/#more">more >></a>
</p>
<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/06/25/hello-world/" class="article-date">
<time datetime="2015-06-25T04:00:00.000Z" itemprop="datePublished">2015-06-25</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/06/25/hello-world/">Hello World</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>从此开启一面窗。</p>
</div>
<div class="article-info article-info-index">
<div class="clearfix"></div>
</div>
</div>
</article>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
© 2015 zhangbody
</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>