-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
516 lines (273 loc) · 83.2 KB
/
Copy pathatom.xml
File metadata and controls
516 lines (273 loc) · 83.2 KB
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>遇见西门</title>
<subtitle>simon96.online</subtitle>
<link href="/atom.xml" rel="self"/>
<link href="https://www.simon96.online/"/>
<updated>2018-11-16T12:06:56.785Z</updated>
<id>https://www.simon96.online/</id>
<author>
<name>TDsimon</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>Hexo之常用操作</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-operating/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-operating/</id>
<published>2018-11-16T12:05:35.000Z</published>
<updated>2018-11-16T12:06:56.785Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h3 id="常用操作"><a href="#常用操作" class="headerlink" title="常用操作"></a>常用操作</h3><h4 id="创建文章"><a href="#创建文章" class="headerlink" title="创建文章"></a>创建文章</h4><p>命令:</p><figure class="highlight gauss"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo <span class="keyword">new</span> [layout] <<span class="built_in">title</span>></span><br></pre></td></tr></table></figure><p>参数说明:</p><ul><li>[layout]可以为以下三种:</li></ul><table><thead><tr><th>参数名</th><th>功能</th><th>文章路径</th></tr></thead><tbody><tr><td>post</td><td>新建博文</td><td>source/_posts</td></tr><tr><td>page</td><td>新建页面(如404,分类)</td><td>source</td></tr><tr><td>draft</td><td>草稿</td><td>source/_drafts</td></tr></tbody></table><p>草稿可通过一下命令发布:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> hexo publish [layout] <title></span></span><br></pre></td></tr></table></figure><ul><li><p>title注意:</p><p>不是博文标题,</p><p>是博文markdown文件的名字,</p><p>也是博文链接的后缀(如<code>https://www.simon96.online/2018/10/12/hexo-tutorial/</code>中的hexo-tutorial)</p></li></ul><h4 id="文章模版"><a href="#文章模版" class="headerlink" title="文章模版"></a>文章模版</h4><ul><li><p>创建模版</p><p>在新建文章时,Hexo 会根据 <code>scaffolds</code> 文件夹内相对应的文件来建立文件,例如:</p></li></ul><blockquote><p>$ hexo new blog “simon”</p></blockquote><p> 在执行这行指令时,Hexo 会尝试在 <code>scaffolds</code> 文件夹中寻找 <code>blog.md</code>,并根据其内容建立文章。</p><ul><li><p>修改参数</p><p>以下是您可以在模版中使用的变量:</p></li></ul><table><thead><tr><th>变量</th><th>描述</th></tr></thead><tbody><tr><td>layout</td><td>布局</td></tr><tr><td>title</td><td>标题</td></tr><tr><td>date</td><td>文件建立日期</td></tr></tbody></table><h4 id="Front-matter"><a href="#Front-matter" class="headerlink" title="Front-matter"></a>Front-matter</h4><p>就是博文最上方以 <code>---</code> 分隔的那部分。</p><p>默认可以使用的Front-matter:</p><table><thead><tr><th>参数</th><th>描述</th><th>默认值</th></tr></thead><tbody><tr><td><code>layout</code></td><td>布局</td><td></td></tr><tr><td><code>title</code></td><td>标题</td><td></td></tr><tr><td><code>date</code></td><td>建立日期</td><td>文件建立日期</td></tr><tr><td><code>updated</code></td><td>更新日期</td><td>文件更新日期</td></tr><tr><td><code>comments</code></td><td>开启文章的评论功能</td><td>true</td></tr><tr><td><code>tags</code></td><td>标签(不适用于分页)</td><td></td></tr><tr><td><code>categories</code></td><td>分类(不适用于分页)</td><td></td></tr><tr><td><code>permalink</code></td><td>覆盖文章网址</td></tr></tbody></table><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之错误分析</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-error/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-error/</id>
<published>2018-11-16T12:04:28.000Z</published>
<updated>2018-11-16T12:05:14.952Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h3 id="错误分析"><a href="#错误分析" class="headerlink" title="错误分析"></a>错误分析</h3><p>如果你使用Hexo遇到同样的问题,这里有一些常见问题的解决方案。</p><h4 id="YAML-Parsing-Error"><a href="#YAML-Parsing-Error" class="headerlink" title="YAML Parsing Error"></a>YAML Parsing Error</h4><figure class="highlight maxima"><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">JS-YAML: incomplete <span class="built_in">explicit</span> mapping pair; a <span class="built_in">key</span> node <span class="built_in">is</span> missed <span class="built_in">at</span> line <span class="number">18</span>, column <span class="number">29</span>:</span><br><span class="line"> last_updated: Last updated: <span class="built_in">%s</span></span><br></pre></td></tr></table></figure><ol><li>参数中包含冒号,请用加引号,如<code>Last updated: %s</code></li></ol><figure class="highlight livecodeserver"><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">JS-YAML: bad indentation <span class="keyword">of</span> <span class="keyword">a</span> mapping entry <span class="keyword">at</span> <span class="built_in">line</span> <span class="number">18</span>, column <span class="number">31</span>:</span><br><span class="line"> last_updated:<span class="string">"Last updated: %s"</span></span><br></pre></td></tr></table></figure><ol><li>字段后面的冒号必须为<strong>英文冒号</strong>,如:last_updated:</li><li>字段冒号后面必须跟一个空格,如:last_updated: “Last updated: %s”</li></ol><h4 id="EMFILE-Error"><a href="#EMFILE-Error" class="headerlink" title="EMFILE Error"></a>EMFILE Error</h4><figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">Error: </span>EMFILE, too many open files</span><br></pre></td></tr></table></figure><p>生成大量的文件时,可能遇到EMFILE错误。</p><p>可以运行以下命令来增加允许同步I / O操作的数量。</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">ulimit</span> -n 10000</span></span><br></pre></td></tr></table></figure><h4 id="Process-Out-of-Memory"><a href="#Process-Out-of-Memory" class="headerlink" title="Process Out of Memory"></a>Process Out of Memory</h4><p>当<code>hexo g</code>时,遇到以下错误:</p><figure class="highlight vhdl"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">FATAL <span class="literal">ERROR</span>: CALL_AND_RETRY_LAST Allocation failed - <span class="keyword">process</span> <span class="keyword">out</span> <span class="keyword">of</span> memory</span><br></pre></td></tr></table></figure><p>如下,更改<code>hexo-cli</code>文件的第一行,来增大nodejs堆内存.该bug已在<a href="https://github.com/hexojs/hexo/issues/1735" target="_blank" rel="noopener">新版本</a>修复。</p><figure class="highlight d"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#!/usr/bin/env node --max_old_space_size=8192</span></span><br></pre></td></tr></table></figure><h4 id="Git-Deployment-Problems"><a href="#Git-Deployment-Problems" class="headerlink" title="Git Deployment Problems"></a>Git Deployment Problems</h4><ol><li>RPC failed</li></ol><figure class="highlight subunit"><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"><span class="keyword">error: </span>RPC failed; result=22, HTTP code = 403</span><br><span class="line"></span><br><span class="line">fatal: 'username.github.io' does not appear to be a git repository</span><br></pre></td></tr></table></figure><p>确保你有你的电脑上设置git正确或尝试使用HTTPS存储库URL。</p><ol><li>Error: ENOENT: no such file or directory</li></ol><p>这个需要有一定的git的知识,因为可能是由于写错了标签,类别,或文件名,导致本地和github冲突了,Git不能自动合并这一变化所以它打破了自动分支。</p><p>解决办法:</p><ol><li>检查文章的标签和类别,确保本地和github上是相同的。</li><li>合并分支(Commit)。</li><li>清除,重构。在站点目录下,命令行(即Git Bash)运行<code>hexo clean</code>和<code>hexo g</code></li><li>手动将站点目录下的<code>public</code>文件夹复制到您的桌面</li><li>从你的master分支切换到部署在本地分支。</li><li>从桌面复制<code>public</code>文件夹到本地分支。</li><li>合并分支到github(Commit)。</li><li>切回master分支。</li></ol><h4 id="Server-Problems"><a href="#Server-Problems" class="headerlink" title="Server Problems"></a>Server Problems</h4><figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">Error: </span>listen EADDRINUSE</span><br></pre></td></tr></table></figure><p>你可能使用相同的端口,同时开启了两个Hexo服务器。如果需要同时开启,可以尝试修改端口设置:</p><figure class="highlight routeros"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo<span class="built_in"> server </span>-p 5000</span><br></pre></td></tr></table></figure><h4 id="Plugin-Installation-Problems"><a href="#Plugin-Installation-Problems" class="headerlink" title="Plugin Installation Problems"></a>Plugin Installation Problems</h4><figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm ERR! <span class="keyword">node</span><span class="title">-waf</span> configure build</span><br></pre></td></tr></table></figure><p>这个错误可能发生在试图安装一个用Cc++或另一个javascript语言编写的插件。确保您已经安装了正确的编译器在您的计算机上。</p><h4 id="Error-with-DTrace-Mac-OS-X"><a href="#Error-with-DTrace-Mac-OS-X" class="headerlink" title="Error with DTrace (Mac OS X)"></a>Error with DTrace (Mac OS X)</h4><figure class="highlight arduino"><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">{ [Error: Cannot <span class="built_in">find</span> <span class="keyword">module</span> <span class="string">'./build/Release/DTraceProviderBindings'</span>] code: <span class="string">'MODULE_NOT_FOUND'</span> }</span><br><span class="line">{ [Error: Cannot <span class="built_in">find</span> <span class="keyword">module</span> <span class="string">'./build/default/DTraceProviderBindings'</span>] code: <span class="string">'MODULE_NOT_FOUND'</span> }</span><br><span class="line">{ [Error: Cannot <span class="built_in">find</span> <span class="keyword">module</span> <span class="string">'./build/Debug/DTraceProviderBindings'</span>] code: <span class="string">'MODULE_NOT_FOUND'</span> }</span><br></pre></td></tr></table></figure><p>DTrace安装可能有问题,重装:</p><figure class="highlight coffeescript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">npm</span> install hexo --<span class="literal">no</span>-optional</span><br></pre></td></tr></table></figure><p>详见 <a href="https://github.com/hexojs/hexo/issues/1326#issuecomment-113871796" target="_blank" rel="noopener">#1326</a></p><h4 id="Iterate-Data-Model-on-Jade-or-Swig"><a href="#Iterate-Data-Model-on-Jade-or-Swig" class="headerlink" title="Iterate Data Model on Jade or Swig"></a>Iterate Data Model on Jade or Swig</h4><p>Hexo使用仓库的数据模型。这不是一个数组,所以你可能需要将对象转换为iterable。</p><figure class="highlight django"><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="xml"></span><span class="template-tag">{% <span class="name"><span class="name">for</span></span> post <span class="keyword">in</span> site.posts.toArray() %}</span><span class="xml"></span></span><br><span class="line"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">endfor</span></span> %}</span><span class="xml"></span></span><br></pre></td></tr></table></figure><h4 id="Data-Not-Updated"><a href="#Data-Not-Updated" class="headerlink" title="Data Not Updated"></a>Data Not Updated</h4><p>一些数据不能更新或新生成的文件的最后一个版本完全相同。清理缓存,再试一次:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> hexo clean</span></span><br></pre></td></tr></table></figure><h4 id="No-command-is-executed"><a href="#No-command-is-executed" class="headerlink" title="No command is executed"></a>No command is executed</h4><p>那个不能使用除<code>help</code>、<code>init</code>和<code>version</code>以外的命令行(即Git Bash)时, 有可能时站点目录下的 <code>package.json</code>文件,缺少<code>hexo</code> ,如下:</p><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></pre></td><td class="code"><pre><span class="line">{</span><br><span class="line"> <span class="attr">"hexo"</span>: {</span><br><span class="line"> <span class="attr">"version"</span>: <span class="string">"3.2.2"</span></span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h4 id="Escape-Contents"><a href="#Escape-Contents" class="headerlink" title="Escape Contents"></a>Escape Contents</h4><p>Hexo使用Nunjucks渲染的页面. <code>{ { } }</code>或<code>{ % % }</code>将解析和可能会引起麻烦, 如果要在博文中出现,必须使用三引号:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"></span><br></pre></td></tr></table></figure>Hello {{ sensitive }}<p><figure class="highlight plain"><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><br><span class="line"></span><br></pre></td></tr></table></figure></p><h4 id="ENOSPC-Error-Linux"><a href="#ENOSPC-Error-Linux" class="headerlink" title="ENOSPC Error (Linux)"></a>ENOSPC Error (Linux)</h4><p>如果运行命令<code>$ hexo server</code> 返回一个错误: </p><figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">Error: </span>watch ENOSPC ...</span><br></pre></td></tr></table></figure><p>可以通过运行<code>$ npm dedupe</code>或者以下命令行(即Git Bash):</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> <span class="built_in">echo</span> fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p</span></span><br></pre></td></tr></table></figure><p>来增加测试时,你可以看见的文件数量。</p><h4 id="EMPERM-Error-Windows-Subsystem-for-Linux"><a href="#EMPERM-Error-Windows-Subsystem-for-Linux" class="headerlink" title="EMPERM Error (Windows Subsystem for Linux)"></a>EMPERM Error (Windows Subsystem for Linux)</h4><p>如果在Windows Subsystem for Linux,运行命令<code>$ hexo server</code> 返回这个错误: </p><figure class="highlight subunit"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">Error: </span>watch /path/to/hexo/theme/ EMPERM</span><br></pre></td></tr></table></figure><p>因为目前在Windows Subsystem for Linux中,有些内容更改时,还不能实时更新到hexo服务器。</p><p>所以需要重新编译,再启动服务器:</p><figure class="highlight routeros"><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<span class="built_in"> server </span>-s</span><br></pre></td></tr></table></figure><h4 id="Template-render-error"><a href="#Template-render-error" class="headerlink" title="Template render error"></a>Template render error</h4><p>有时运行命令<code>$ hexo generate</code> 返回一个错误: </p><figure class="highlight vbnet"><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">FATAL Something<span class="comment">'s wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html</span></span><br><span class="line">Template render <span class="keyword">error</span>: (unknown path)</span><br></pre></td></tr></table></figure><p>这意味着有些认不出来单词在你的文件,并且很可能在你的新博文,或者配置文件<code>_config.yml</code>中,比如缩进错误:</p><p>错误例子:</p><figure class="highlight avrasm"><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"><span class="symbol">plugins:</span></span><br><span class="line">hexo-generator-feed</span><br><span class="line">hexo-generator-sitemap</span><br></pre></td></tr></table></figure><p>### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之搜索服务</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-search/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-search/</id>
<published>2018-11-16T12:03:44.000Z</published>
<updated>2018-11-16T12:04:16.539Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h4 id="搜索服务"><a href="#搜索服务" class="headerlink" title="搜索服务"></a>搜索服务</h4><table><thead><tr><th></th><th>推荐指数</th><th>优点</th><th>缺点</th></tr></thead><tbody><tr><td>Local Search</td><td>4</td><td>配置方便</td><td></td></tr><tr><td>Swiftype</td><td>2</td><td></td><td>需注册</td></tr><tr><td>Algolia</td><td>2</td><td></td><td>需注册</td></tr></tbody></table><h5 id="Local-Search"><a href="#Local-Search" class="headerlink" title="Local Search"></a>Local Search</h5><p>添加百度/谷歌/本地 自定义站点内容搜索</p><ol><li><p>安装 <code>hexo-generator-searchdb</code>,在站点的根目录下执行以下命令:</p><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> npm install hexo-generator-searchdb --save</span></span><br></pre></td></tr></table></figure></li><li><p>编辑 站点配置文件,新增以下内容到任意位置:</p><figure class="highlight dts"><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"><span class="symbol">search:</span></span><br><span class="line"><span class="symbol"> path:</span> search.xml</span><br><span class="line"><span class="symbol"> field:</span> post</span><br><span class="line"><span class="symbol"> format:</span> html</span><br><span class="line"><span class="symbol"> limit:</span> <span class="number">10000</span></span><br></pre></td></tr></table></figure></li><li><p>编辑 主题配置文件,启用本地搜索功能:</p><figure class="highlight yaml"><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"><span class="comment"># Local search</span></span><br><span class="line"><span class="attr">local_search:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure></li></ol><p>### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之内容分享服务</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-share/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-share/</id>
<published>2018-11-16T12:02:23.000Z</published>
<updated>2018-11-16T12:02:53.553Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h4 id="内容分享服务"><a href="#内容分享服务" class="headerlink" title="内容分享服务"></a>内容分享服务</h4><table><thead><tr><th></th><th>推荐指数</th><th>优点</th><th>缺点</th></tr></thead><tbody><tr><td><a href="http://share.baidu.com/" target="_blank" rel="noopener">百度分享</a></td><td>4</td><td>稳定</td><td>不太美观</td></tr><tr><td><a href="https://github.com/revir/need-more-share2" target="_blank" rel="noopener">need-more-share2</a></td><td>4</td><td>美观</td><td>更新不及时(比如微信分享API)</td></tr></tbody></table><h5 id="百度分享"><a href="#百度分享" class="headerlink" title="百度分享"></a>百度分享</h5><p>编辑 主题配置文件,添加/修改字段 <code>baidushare</code>,值为 <code>true</code>即可。</p><figure class="highlight yaml"><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="comment"># 百度分享服务</span></span><br><span class="line"><span class="attr">baidushare:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure><h5 id="need-more-share2"><a href="#need-more-share2" class="headerlink" title="need-more-share2"></a>need-more-share2</h5><p>编辑 主题配置文件,添加/修改字段 <code>needmoreshare2</code>,值为 <code>true</code>即可。</p><figure class="highlight yaml"><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="attr">needmoreshare2:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之数据统计与分析</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-analysis/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-analysis/</id>
<published>2018-11-16T12:01:34.000Z</published>
<updated>2018-11-16T12:02:06.102Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h4 id="数据统计与分析"><a href="#数据统计与分析" class="headerlink" title="数据统计与分析"></a>数据统计与分析</h4><table><thead><tr><th></th><th>推荐指数</th><th>优点</th><th>缺点</th></tr></thead><tbody><tr><td><a href="http://ibruce.info/2015/04/04/busuanzi/" target="_blank" rel="noopener">不蒜子</a></td><td>4</td><td>可直接将访问次数显示在您在网页上(也可不显示)</td><td>只计数</td></tr><tr><td>百度统计</td><td>3</td><td></td><td>收录慢</td></tr></tbody></table><h5 id="不蒜子"><a href="#不蒜子" class="headerlink" title="不蒜子"></a>不蒜子</h5><p>编辑 主题配置文件 <code>themes/*/_config.yml</code>中的<code>busuanzi_count</code>的配置项即可。</p><ul><li>当<code>enable: true</code>时,代表开启全局开关。</li><li>若<code>site_uv</code>(本站访客数)、<code>site_pv</code>(本站访客数)、<code>page_pv</code>(本文总阅读量)的值均为<code>false</code>时,不蒜子仅作记录而不会在页面上显示。</li></ul><p>注意:</p><figure class="highlight stylus"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">不蒜子官方因七牛强制过期原有的『dn-lbstatics<span class="selector-class">.qbox</span><span class="selector-class">.me</span>』域名(预计<span class="number">2018</span>年<span class="number">10</span>月初),与客服沟通数次无果,即使我提出为此付费也不行,只能更换域名到『busuanzi<span class="selector-class">.ibruce</span><span class="selector-class">.info</span>』!</span><br></pre></td></tr></table></figure><p>解决办法:</p><ol><li><p>找到主题调用不蒜子的swig文件。一般在”\themes*\layout_third-party\analytics\busuanzi-counter.swig”</p></li><li><p>更改域名</p><figure class="highlight xml"><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><br><span class="line"><span class="tag"><<span class="name">script</span> <span class="attr">async</span> <span class="attr">src</span>=<span class="string">"//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"</span>></span><span class="undefined"></span><span class="tag"></<span class="name">script</span>></span></span><br><span class="line">域名改一下即可:</span><br><span class="line"><span class="tag"><<span class="name">script</span> <span class="attr">async</span> <span class="attr">src</span>=<span class="string">"//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"</span>></span><span class="undefined"></span><span class="tag"></<span class="name">script</span>></span></span><br></pre></td></tr></table></figure></li></ol><h5 id="百度统计"><a href="#百度统计" class="headerlink" title="百度统计"></a>百度统计</h5><ol><li>登录 <a href="http://tongji.baidu.com/" target="_blank" rel="noopener">百度统计</a>,定位到站点的代码获取页面</li><li>复制统计脚本 id,如图:<br> <img src="http://theme-next.iissnan.com/uploads/five-minutes-setup/analytics-baidu-id.png" alt="img"> </li><li>编辑 主题配置文件<code>themes/*/_config.yml</code>,修改字段 <code>google_analytics</code>,值设置成你的统计脚本 id。</li></ol><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之评论系统</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-comment/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-comment/</id>
<published>2018-11-16T11:59:48.000Z</published>
<updated>2018-11-16T12:00:21.303Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h4 id="评论系统"><a href="#评论系统" class="headerlink" title="评论系统"></a>评论系统</h4><table><thead><tr><th></th><th>推荐指数</th><th>优点</th><th>缺点</th></tr></thead><tbody><tr><td><a href="https://valine.js.org/" target="_blank" rel="noopener">Valine</a></td><td>4</td><td>每天30000条评论,10GB的储存</td><td>作者评论无标识</td></tr><tr><td><a href="https://livere.com/" target="_blank" rel="noopener">来必力/livere</a></td><td>4</td><td>多种账号登录</td><td>评论无法导出</td></tr><tr><td><a href="http://changyan.kuaizhan.com/" target="_blank" rel="noopener">畅言</a></td><td>3</td><td>美观</td><td>必须备案域名</td></tr><tr><td><a href="https://github.com/imsun/gitment" target="_blank" rel="noopener">gitment</a></td><td>3</td><td>简洁</td><td>只能登陆github评论</td></tr><tr><td>Disqus</td><td>1</td><td></td><td>需要翻*墙</td></tr></tbody></table><h5 id="Valine"><a href="#Valine" class="headerlink" title="Valine"></a>Valine</h5><p>1.1. 获取APP ID 和 APP Key</p><p>请先登录或注册 <a href="https://leancloud.cn/" target="_blank" rel="noopener">LeanCloud</a>, 进入控制台后点击左下角创建应用,</p><p>进入刚刚创建的应用,选择左下角的<code>设置</code>><code>应用Key</code>,然后就能看到你的<code>APP ID</code>和<code>APP Key</code>了。</p><p>1.2. 填写APP ID 和 APP Key到主题配置文件<code>_config.yml</code></p><p>1.3. 运行<code>hexo g&&hexo d</code>推送到博客。</p><h5 id="来必力-livere"><a href="#来必力-livere" class="headerlink" title="来必力/livere"></a>来必力/livere</h5><p>2.1. 登陆 <a href="https://livere.com/" target="_blank" rel="noopener">来必力</a> 获取你的 LiveRe UID。</p><p>2.2. 填写LiveRe UID到主题配置文件<code>_config.yml</code></p><h5 id="畅言"><a href="#畅言" class="headerlink" title="畅言"></a>畅言</h5><p>3.1.获取APP ID 和 APP Key</p><p>请先登录或注册 <a href="http://changyan.kuaizhan.com/" target="_blank" rel="noopener">畅言</a>, 点击“立即免费获取畅言”,</p><p>新建站点,点击管理,点击评论插件>评论管理,</p><p>点击后台总览,然后就能看到你的<code>APP ID</code>和<code>APP Key</code>了。</p><p>3.2. 填写APP ID 和 APP Key到主题配置文件<code>_config.yml</code></p><p>3.3. 运行<code>hexo g&&hexo d</code>推送到博客。</p><h5 id="gitment"><a href="#gitment" class="headerlink" title="gitment"></a>gitment</h5><p>4.1. 安装插件:</p><blockquote><p>npm i –save gitment</p></blockquote><p>4.2. 申请应用</p><p>在<a href="https://github.com/settings/applications/new" target="_blank" rel="noopener">New OAuth App</a>为你的博客应用一个密钥:</p><figure class="highlight groovy"><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">Application <span class="string">name:</span>随便写</span><br><span class="line">Homepage <span class="string">URL:</span>这个也可以随意写,就写你的博客地址就行</span><br><span class="line">Application <span class="string">description:</span>描述,也可以随意写</span><br><span class="line">Authorization callback <span class="string">URL:</span>这个必须写你的博客地址</span><br></pre></td></tr></table></figure><p>4.3. 配置</p><p>编辑主题配置文件<code>themes/*/_config.yml</code>:</p><figure class="highlight yaml"><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></pre></td><td class="code"><pre><span class="line"><span class="comment"># Gitment</span></span><br><span class="line"><span class="comment"># Introduction: https://imsun.net/posts/gitment-introduction/</span></span><br><span class="line"><span class="attr">gitment:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr"> mint:</span> <span class="literal">true</span> <span class="comment"># RECOMMEND, A mint on Gitment, to support count, language and proxy_gateway</span></span><br><span class="line"><span class="attr"> count:</span> <span class="literal">true</span> <span class="comment"># Show comments count in post meta area</span></span><br><span class="line"><span class="attr"> lazy:</span> <span class="literal">false</span> <span class="comment"># Comments lazy loading with a button</span></span><br><span class="line"><span class="attr"> cleanly:</span> <span class="literal">false</span> <span class="comment"># Hide 'Powered by ...' on footer, and more</span></span><br><span class="line"><span class="attr"> language:</span> <span class="comment"># Force language, or auto switch by theme</span></span><br><span class="line"><span class="attr"> github_user:</span> <span class="string">{you</span> <span class="string">github</span> <span class="string">user</span> <span class="string">id}</span></span><br><span class="line"><span class="attr"> github_repo:</span> <span class="string">公开的git仓库,评论会作为那个项目的issue</span></span><br><span class="line"><span class="attr"> client_id:</span> <span class="string">{刚才申请的ClientID}</span></span><br><span class="line"><span class="attr"> client_secret:</span> <span class="string">{刚才申请的Client</span> <span class="string">Secret}</span></span><br><span class="line"><span class="attr"> proxy_gateway:</span> <span class="comment"># Address of api proxy, See: https://github.com/aimingoo/intersect</span></span><br><span class="line"><span class="attr"> redirect_protocol:</span> <span class="comment"># Protocol of redirect_uri with force_redirect_pro</span></span><br></pre></td></tr></table></figure><h5 id="Disqus"><a href="#Disqus" class="headerlink" title="Disqus"></a>Disqus</h5><p>编辑 主题配置文件<code>themes/*/_config.yml</code>, 将 disqus 下的 enable 设定为 true,同时提供您的 shortname。count 用于指定是否显示评论数量。</p><figure class="highlight yaml"><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="attr">disqus:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr"> shortname:</span></span><br><span class="line"><span class="attr"> count:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之添加萌萌哒</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-live2d/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-live2d/</id>
<published>2018-11-16T11:53:44.000Z</published>
<updated>2018-11-16T11:56:30.163Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="添加萌萌哒"><a href="#添加萌萌哒" class="headerlink" title="添加萌萌哒"></a>添加萌萌哒</h5><ol><li><p>安装插件</p><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm <span class="keyword">install</span> <span class="comment">--save hexo-helper-live2d</span></span><br></pre></td></tr></table></figure></li><li><p>复制你喜欢的模型名字:</p><p>Epsilon2.1</p><p><img src="https://huaji8.top/img/live2d/Epsilon2.1.gif" alt="img"></p><p>Gantzert_Felixander</p><p><img src="https://huaji8.top/img/live2d/Gantzert_Felixander.gif" alt="img"></p><p>haru</p><p><img src="https://huaji8.top/img/live2d/haru.gif" alt="img"></p><p>miku</p><p><img src="https://huaji8.top/img/live2d/miku.gif" alt="img"></p><p>ni-j</p><p><img src="https://huaji8.top/img/live2d/ni-j.gif" alt="img"></p><p>nico</p><p><img src="https://huaji8.top/img/live2d/nico.gif" alt="img"></p><p>nietzche</p><p><img src="https://huaji8.top/img/live2d/nietzche.gif" alt="img"></p><p>nipsilon</p><p><img src="https://huaji8.top/img/live2d/nipsilon.gif" alt="img"></p><p>nito</p><p><img src="https://huaji8.top/img/live2d/nito.gif" alt="img"></p><p>shizuku</p><p><img src="https://huaji8.top/img/live2d/shizuku.gif" alt="img"></p><p>tsumiki</p><p><img src="https://huaji8.top/img/live2d/tsumiki.gif" alt="img"></p><p>wanko</p><p><img src="https://huaji8.top/img/live2d/wanko.gif" alt="img"></p><p>z16</p><p><img src="https://huaji8.top/img/live2d/z16.gif" alt="img"></p><p>hibiki</p><p><img src="https://huaji8.top/img/live2d/hibiki.gif" alt="img"></p><p>koharu</p><p><img src="https://huaji8.top/img/live2d/koharu.gif" alt="img"></p><p>haruto</p><p><img src="https://huaji8.top/img/live2d/haruto.gif" alt="img"></p><p>Unitychan</p><p><img src="https://huaji8.top/img/live2d/Unitychan.gif" alt="img"></p><p>tororo</p><p><img src="https://huaji8.top/img/live2d/tororo.gif" alt="img"></p><p>hijiki</p><p><img src="https://huaji8.top/img/live2d/hijiki.gif" alt="img"></p></li><li><p>将以下代码添加到主题配置文件<code>_config.yml</code>,修改<你喜欢的模型名字>:</p><figure class="highlight yaml"><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></pre></td><td class="code"><pre><span class="line"><span class="attr">live2d:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br><span class="line"><span class="attr"> scriptFrom:</span> <span class="string">local</span></span><br><span class="line"><span class="attr"> pluginRootPath:</span> <span class="string">live2dw/</span></span><br><span class="line"><span class="attr"> pluginJsPath:</span> <span class="string">lib/</span></span><br><span class="line"><span class="attr"> pluginModelPath:</span> <span class="string">assets/</span></span><br><span class="line"><span class="attr"> tagMode:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr"> log:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr"> model:</span></span><br><span class="line"><span class="attr"> use:</span> <span class="string">live2d-widget-model-<你喜欢的模型名字></span></span><br><span class="line"><span class="attr"> display:</span></span><br><span class="line"><span class="attr"> position:</span> <span class="string">right</span></span><br><span class="line"><span class="attr"> width:</span> <span class="number">150</span></span><br><span class="line"><span class="attr"> height:</span> <span class="number">300</span></span><br><span class="line"><span class="attr"> mobile:</span></span><br><span class="line"><span class="attr"> show:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure></li><li><p>建配置文件</p><p>4.1. 在站点目录下建文件夹<code>live2d_models</code>,</p><p>4.2. 再在<code>live2d_models</code>下建文件夹<code><你喜欢的模型名字></code>,</p><p>4.3. 再在<code><你喜欢的模型名字></code>下建json文件:<你喜欢的模型名字>.model.json</p></li><li><p>安装模型。在命令行(即Git Bash)运行以下命令即可:</p><blockquote><p>npm install –save live2d-widget-model-<你喜欢的模型名字></p></blockquote></li><li><p>在命令行(即Git Bash)运行以下命令, 在<code>http://127.0.0.1:4000/</code>查看测试结果:</p><blockquote><p>hexo clean && hexo g && hexo s</p></blockquote></li></ol><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之加入广告</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-ad/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-ad/</id>
<published>2018-11-16T11:52:40.000Z</published>
<updated>2018-11-16T11:56:08.942Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="加入-广告"><a href="#加入-广告" class="headerlink" title="加入 广告"></a>加入 广告</h5><p>主要有两种:<a href="https://ssp.baidu.com/static/register.html" target="_blank" rel="noopener">百度SSP</a>和<a href="https://www.google.com/adsense/start/#/?modal_active=none" target="_blank" rel="noopener">谷歌Adsense</a>。方法类似:</p><ol><li><p>注册,复制广告代码</p></li><li><p>部署到网站。</p><p>2.1. 新建 <code>theme/*/layout/_custom/google_ad.swig</code>,将 AdSense 上的代码粘贴进去</p><p>2.2. 头部。在 <code>theme/*/layout/_custom/head.swig</code> 中也粘贴一份</p><p>2.3. 每篇博客。在 <code>theme/*/layout/post.swig</code> 里中在希望看到的地方加上:</p><figure class="highlight django"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">include</span></span> '_custom/google_ad.swig' %}</span><span class="xml"></span></span><br></pre></td></tr></table></figure><p>例如:在 <code><div id="posts" class="posts-expand"> </div></code> 中间插入,总代码如下:</p><figure class="highlight django"><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></pre></td><td class="code"><pre><span class="line"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">block</span></span> content %}</span><span class="xml"></span></span><br><span class="line"><span class="xml"> <span class="tag"><<span class="name">div</span> <span class="attr">id</span>=<span class="string">"posts"</span> <span class="attr">class</span>=<span class="string">"posts-expand"</span>></span></span></span><br><span class="line"><span class="xml"> </span><span class="template-variable">{{ post_template.render(page) }}</span><span class="xml"></span></span><br><span class="line"><span class="xml"> </span><span class="template-tag">{% <span class="name"><span class="name">include</span></span> '_custom/google_ad.swig' %}</span><span class="xml"></span></span><br><span class="line"><span class="xml"> <span class="tag"></<span class="name">div</span>></span></span></span><br><span class="line"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">endblock</span></span> %}</span><span class="xml"></span></span><br></pre></td></tr></table></figure></li><li><p>等待审核通过。如果失败,可再次申请。</p></li></ol><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之创建分类页</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-categories/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-categories/</id>
<published>2018-11-16T11:52:01.000Z</published>
<updated>2018-11-16T11:56:16.459Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="创建分类页"><a href="#创建分类页" class="headerlink" title="创建分类页"></a>创建分类页</h5><p>在终端窗口下,定位到 <code>Hexo</code> 站点目录下,新建:</p><figure class="highlight plain"><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">$ cd <站点目录></span><br><span class="line">$ hexo new page categories</span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之显示当前浏览进度</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-process/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-process/</id>
<published>2018-11-16T11:50:49.000Z</published>
<updated>2018-11-16T11:56:39.937Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="显示当前浏览进度"><a href="#显示当前浏览进度" class="headerlink" title="显示当前浏览进度"></a>显示当前浏览进度</h5><p>修改<code>themes/*/_config.yml</code>,把 <code>false</code> 改为 <code>true</code>:</p><figure class="highlight plain"><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"># Back to top in sidebar</span><br><span class="line">b2t: true</span><br><span class="line"></span><br><span class="line"># Scroll percent label in b2t button</span><br><span class="line">scrollpercent: true</span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之主页文章添加边框阴影效果</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-shadow/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-shadow/</id>
<published>2018-11-16T11:50:03.000Z</published>
<updated>2018-11-16T11:56:42.551Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="主页文章添加边框阴影效果"><a href="#主页文章添加边框阴影效果" class="headerlink" title="主页文章添加边框阴影效果"></a>主页文章添加边框阴影效果</h5><p>打开 <code>themes/*/source/css/_custom/custom.styl</code> ,向里面加代码:</p><figure class="highlight plain"><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></pre></td><td class="code"><pre><span class="line">// 主页文章添加阴影效果</span><br><span class="line">.post {</span><br><span class="line"> margin-top: 0px;</span><br><span class="line"> margin-bottom: 60px;</span><br><span class="line"> padding: 25px;</span><br><span class="line"> -webkit-box-shadow: 0 0 5px rgba(202, 203, 203, .5);</span><br><span class="line"> -moz-box-shadow: 0 0 5px rgba(202, 203, 204, .5);</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之在右上角或者左上角实现fork me on github</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-forkMe/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-forkMe/</id>
<published>2018-11-16T11:47:45.000Z</published>
<updated>2018-11-16T11:56:20.081Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="在右上角或者左上角实现fork-me-on-github"><a href="#在右上角或者左上角实现fork-me-on-github" class="headerlink" title="在右上角或者左上角实现fork me on github"></a>在右上角或者左上角实现fork me on github</h5><ol><li>选择样式<a href="https://blog.github.com/2008-12-19-github-ribbons/" target="_blank" rel="noopener">GitHub Ribbons</a>,</li><li>修改图片跳转链接,将<code><a href="https://github.com/you"></code>中的链接换为自己Github链接: </li><li>打开 <code>themes/next/layout/_layout.swig</code> 文件,把代码复制到<code><div class="headband"></div></code>下面。</li></ol><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之修改访问URL路径</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-url/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-url/</id>
<published>2018-11-16T11:46:15.000Z</published>
<updated>2018-11-16T11:56:57.902Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="修改访问URL路径"><a href="#修改访问URL路径" class="headerlink" title="修改访问URL路径"></a>修改访问URL路径</h5><p>默认情况下访问URL路径为:<code>domain/2018/10/18/关于本站</code>,修改为 <code>domain/About/关于本站</code>。 编辑 <code>Hexo</code> 站点下的 <code>_config.yml</code> 文件,修改其中的 <code>permalink</code>字段:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">permalink: :category/:title/</span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之博文置顶</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-top/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-top/</id>
<published>2018-11-16T11:46:07.000Z</published>
<updated>2018-11-16T11:56:54.929Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="博文置顶"><a href="#博文置顶" class="headerlink" title="博文置顶"></a>博文置顶</h5><ol><li><p>安装插件</p><p>$ npm uninstall hexo-generator-index –save<br>$ npm install hexo-generator-index-pin-top –save</p></li></ol><p>然后在需要置顶的文章的Front-matter中加上top即可:</p><figure class="highlight yaml"><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"><span class="meta">---</span></span><br><span class="line"><span class="attr">title:</span> <span class="number">2018</span></span><br><span class="line"><span class="attr">date:</span> <span class="number">2018</span><span class="bullet">-10</span><span class="bullet">-25</span> <span class="number">16</span><span class="string">:10:03</span></span><br><span class="line"><span class="attr">top:</span> <span class="number">10</span></span><br><span class="line"><span class="meta">---</span></span><br></pre></td></tr></table></figure><ol><li>设置置顶标志</li></ol><p>打开:/themes/*/layout/_macro/post.swig,定位到<div class="post-meta">,插入以下代码即可:</div></p><figure class="highlight django"><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"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">if</span></span> post.top %}</span><span class="xml"></span></span><br><span class="line"><span class="xml"> <span class="tag"><<span class="name">i</span> <span class="attr">class</span>=<span class="string">"fa fa-thumb-tack"</span>></span><span class="tag"></<span class="name">i</span>></span></span></span><br><span class="line"><span class="xml"> <span class="tag"><<span class="name">font</span> <span class="attr">color</span>=<span class="string">7D26CD</span>></span>置顶<span class="tag"></<span class="name">font</span>></span></span></span><br><span class="line"><span class="xml"> <span class="tag"><<span class="name">span</span> <span class="attr">class</span>=<span class="string">"post-meta-divider"</span>></span>|<span class="tag"></<span class="name">span</span>></span></span></span><br><span class="line"><span class="xml"></span><span class="template-tag">{% <span class="name"><span class="name">endif</span></span> %}</span><span class="xml"></span></span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之静态资源压缩</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-gulp/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-gulp/</id>
<published>2018-11-16T11:44:25.000Z</published>
<updated>2018-11-16T11:56:23.161Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="静态资源压缩"><a href="#静态资源压缩" class="headerlink" title="静态资源压缩"></a>静态资源压缩</h5><p>在站点目录下:</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ npm install gulp -g</span><br></pre></td></tr></table></figure><p>安装gulp插件:</p><figure class="highlight plain"><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">npm install gulp-minify-css --save</span><br><span class="line">npm install gulp-uglify --save</span><br><span class="line">npm install gulp-htmlmin --save</span><br><span class="line">npm install gulp-htmlclean --save</span><br><span class="line">npm install gulp-imagemin --save</span><br></pre></td></tr></table></figure><p>在 <code>Hexo</code> 站点下新建 <code>gulpfile.js</code>文件,文件内容如下:</p><figure class="highlight plain"><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></pre></td><td class="code"><pre><span class="line">var gulp = require('gulp');</span><br><span class="line">var minifycss = require('gulp-minify-css');</span><br><span class="line">var uglify = require('gulp-uglify');</span><br><span class="line">var htmlmin = require('gulp-htmlmin');</span><br><span class="line">var htmlclean = require('gulp-htmlclean');</span><br><span class="line">var imagemin = require('gulp-imagemin');</span><br><span class="line">// 压缩css文件</span><br><span class="line">gulp.task('minify-css', function() {</span><br><span class="line"> return gulp.src('./public/**/*.css')</span><br><span class="line"> .pipe(minifycss())</span><br><span class="line"> .pipe(gulp.dest('./public'));</span><br><span class="line">});</span><br><span class="line">// 压缩html文件</span><br><span class="line">gulp.task('minify-html', function() {</span><br><span class="line"> return gulp.src('./public/**/*.html')</span><br><span class="line"> .pipe(htmlclean())</span><br><span class="line"> .pipe(htmlmin({</span><br><span class="line"> removeComments: true,</span><br><span class="line"> minifyJS: true,</span><br><span class="line"> minifyCSS: true,</span><br><span class="line"> minifyURLs: true,</span><br><span class="line"> }))</span><br><span class="line"> .pipe(gulp.dest('./public'))</span><br><span class="line">});</span><br><span class="line">// 压缩js文件</span><br><span class="line">gulp.task('minify-js', function() {</span><br><span class="line"> return gulp.src(['./public/**/.js','!./public/js/**/*min.js'])</span><br><span class="line"> .pipe(uglify())</span><br><span class="line"> .pipe(gulp.dest('./public'));</span><br><span class="line">});</span><br><span class="line">// 压缩 public/demo 目录内图片</span><br><span class="line">gulp.task('minify-images', function() {</span><br><span class="line"> gulp.src('./public/demo/**/*.*')</span><br><span class="line"> .pipe(imagemin({</span><br><span class="line"> optimizationLevel: 5, //类型:Number 默认:3 取值范围:0-7(优化等级)</span><br><span class="line"> progressive: true, //类型:Boolean 默认:false 无损压缩jpg图片</span><br><span class="line"> interlaced: false, //类型:Boolean 默认:false 隔行扫描gif进行渲染</span><br><span class="line"> multipass: false, //类型:Boolean 默认:false 多次优化svg直到完全优化</span><br><span class="line"> }))</span><br><span class="line"> .pipe(gulp.dest('./public/uploads'));</span><br><span class="line">});</span><br><span class="line">// 默认任务</span><br><span class="line">gulp.task('default', [</span><br><span class="line"> 'minify-html','minify-css','minify-js','minify-images'</span><br><span class="line">]);</span><br></pre></td></tr></table></figure><p>只需要每次在执行 <code>generate</code> 命令后执行 <code>gulp</code> 就可以实现对静态资源的压缩,压缩完成后执行 <code>deploy</code> 命令同步到服务器:</p><figure class="highlight plain"><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 g</span><br><span class="line">gulp</span><br><span class="line">hexo d</span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
如果你想让博客更快,那么这篇文章也许会帮到你。
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之实现点击出现桃心效果</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-heart/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-heart/</id>
<published>2018-11-16T11:43:21.000Z</published>
<updated>2018-11-16T11:56:26.463Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="实现点击出现桃心效果"><a href="#实现点击出现桃心效果" class="headerlink" title="实现点击出现桃心效果"></a>实现点击出现桃心效果</h5><ol><li>在<code>/themes/*/source/js/src</code>下新建文件<code>click.js</code>,接着把以下粘贴到<code>click.js</code>文件中。<br>代码如下:</li></ol><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">!<span class="function"><span class="keyword">function</span>(<span class="params">e,t,a</span>)</span>{<span class="function"><span class="keyword">function</span> <span class="title">n</span>(<span class="params"></span>)</span>{c(<span class="string">".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"</span>),o(),r()}<span class="function"><span class="keyword">function</span> <span class="title">r</span>(<span class="params"></span>)</span>{<span class="keyword">for</span>(<span class="keyword">var</span> e=<span class="number">0</span>;e<d.length;e++)d[e].alpha<=<span class="number">0</span>?(t.body.removeChild(d[e].el),d.splice(e,<span class="number">1</span>)):(d[e].y--,d[e].scale+=<span class="number">.004</span>,d[e].alpha-=<span class="number">.013</span>,d[e].el.style.cssText=<span class="string">"left:"</span>+d[e].x+<span class="string">"px;top:"</span>+d[e].y+<span class="string">"px;opacity:"</span>+d[e].alpha+<span class="string">";transform:scale("</span>+d[e].scale+<span class="string">","</span>+d[e].scale+<span class="string">") rotate(45deg);background:"</span>+d[e].color+<span class="string">";z-index:99999"</span>);requestAnimationFrame(r)}<span class="function"><span class="keyword">function</span> <span class="title">o</span>(<span class="params"></span>)</span>{<span class="keyword">var</span> t=<span class="string">"function"</span>==<span class="keyword">typeof</span> e.onclick&&e.onclick;e.onclick=<span class="function"><span class="keyword">function</span>(<span class="params">e</span>)</span>{t&&t(),i(e)}}<span class="function"><span class="keyword">function</span> <span class="title">i</span>(<span class="params">e</span>)</span>{<span class="keyword">var</span> a=t.createElement(<span class="string">"div"</span>);a.className=<span class="string">"heart"</span>,d.push({<span class="attr">el</span>:a,<span class="attr">x</span>:e.clientX<span class="number">-5</span>,<span class="attr">y</span>:e.clientY<span class="number">-5</span>,<span class="attr">scale</span>:<span class="number">1</span>,<span class="attr">alpha</span>:<span class="number">1</span>,<span class="attr">color</span>:s()}),t.body.appendChild(a)}<span class="function"><span class="keyword">function</span> <span class="title">c</span>(<span class="params">e</span>)</span>{<span class="keyword">var</span> a=t.createElement(<span class="string">"style"</span>);a.type=<span class="string">"text/css"</span>;<span class="keyword">try</span>{a.appendChild(t.createTextNode(e))}<span class="keyword">catch</span>(t){a.styleSheet.cssText=e}t.getElementsByTagName(<span class="string">"head"</span>)[<span class="number">0</span>].appendChild(a)}<span class="function"><span class="keyword">function</span> <span class="title">s</span>(<span class="params"></span>)</span>{<span class="keyword">return</span><span class="string">"rgb("</span>+~~(<span class="number">255</span>*<span class="built_in">Math</span>.random())+<span class="string">","</span>+~~(<span class="number">255</span>*<span class="built_in">Math</span>.random())+<span class="string">","</span>+~~(<span class="number">255</span>*<span class="built_in">Math</span>.random())+<span class="string">")"</span>}<span class="keyword">var</span> d=[];e.requestAnimationFrame=<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>{<span class="keyword">return</span> e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||<span class="function"><span class="keyword">function</span>(<span class="params">e</span>)</span>{setTimeout(e,<span class="number">1e3</span>/<span class="number">60</span>)}}(),n()}(<span class="built_in">window</span>,<span class="built_in">document</span>);</span><br></pre></td></tr></table></figure><ol><li>在<code>\themes\*\layout\_layout.swig</code>文件末尾添加:</li></ol><figure class="highlight xml"><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="comment"><!-- 页面点击小红心 --></span></span><br><span class="line"><span class="tag"><<span class="name">script</span> <span class="attr">type</span>=<span class="string">"text/javascript"</span> <span class="attr">src</span>=<span class="string">"/js/src/clicklove.js"</span>></span><span class="undefined"></span><span class="tag"></<span class="name">script</span>></span></span><br></pre></td></tr></table></figure><p>##### </p><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之文章加密访问</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-textEncoding/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-textEncoding/</id>
<published>2018-11-16T11:41:05.000Z</published>
<updated>2018-11-16T11:56:45.636Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="文章加密访问"><a href="#文章加密访问" class="headerlink" title="文章加密访问"></a>文章加密访问</h5><p>打开 <code>themes/*/layout/_partials/head.swig</code>文件,在 <code></code> 之前插入代码:</p><figure class="highlight plain"><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"><script></span><br><span class="line"> (function(){</span><br><span class="line"> if('{{ page.password }}'){</span><br><span class="line"> if (prompt('请输入密码') !== '{{ page.password }}'){</span><br><span class="line"> alert('密码错误');</span><br><span class="line"> history.back();</span><br><span class="line"> }</span><br><span class="line"> }</span><br><span class="line"> })();</span><br><span class="line"></script></span><br></pre></td></tr></table></figure><p>写文章时加上<code>password: *</code>:</p><figure class="highlight plain"><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">---</span><br><span class="line">title: 2018</span><br><span class="line">date: 2018-10-25 16:10:03</span><br><span class="line">password: 123456</span><br><span class="line">---</span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之自定义鼠标样式</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-mouse/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-mouse/</id>
<published>2018-11-16T11:39:10.000Z</published>
<updated>2018-11-16T11:56:36.175Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="自定义鼠标样式"><a href="#自定义鼠标样式" class="headerlink" title="自定义鼠标样式"></a>自定义鼠标样式</h5><p>打开 <code>themes/*/source/css/_custom/custom.styl</code> ,在里面写下如下代码:</p><figure class="highlight plain"><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></pre></td><td class="code"><pre><span class="line">// 鼠标样式</span><br><span class="line"> * {</span><br><span class="line"> cursor: url("http://om8u46rmb.bkt.clouddn.com/sword2.ico"),auto!important</span><br><span class="line"> }</span><br><span class="line"> :active {</span><br><span class="line"> cursor: url("http://om8u46rmb.bkt.clouddn.com/sword1.ico"),auto!important</span><br><span class="line"> }</span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之网站标题栏背景颜色</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-titleBarColor/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-titleBarColor/</id>
<published>2018-11-16T11:37:11.000Z</published>
<updated>2018-11-16T11:56:52.234Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="网站标题栏背景颜色"><a href="#网站标题栏背景颜色" class="headerlink" title="网站标题栏背景颜色"></a>网站标题栏背景颜色</h5><p>打开 <code>themes/*/source/css/_custom/custom.styl</code> ,在里面写下如下代码:</p><figure class="highlight plain"><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">.site-meta {</span><br><span class="line"> background: $blue; //修改为自己喜欢的颜色</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
<entry>
<title>Hexo之修改内容区域的宽度</title>
<link href="https://www.simon96.online/2018/11/16/hexo-do-textLarge/"/>
<id>https://www.simon96.online/2018/11/16/hexo-do-textLarge/</id>
<published>2018-11-16T11:34:58.000Z</published>
<updated>2018-11-16T11:56:49.222Z</updated>
<content type="html"><![CDATA[<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" class="aplayer-secondary-script-marker"></script><h5 id="修改内容区域的宽度"><a href="#修改内容区域的宽度" class="headerlink" title="修改内容区域的宽度"></a>修改内容区域的宽度</h5><p>编辑主题的 <code>source/css/_variables/custom.styl</code> 文件,新增变量:</p><figure class="highlight plain"><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">// 修改成你期望的宽度</span><br><span class="line">$content-desktop = 700px</span><br><span class="line"></span><br><span class="line">// 当视窗超过 1600px 后的宽度</span><br><span class="line">$content-desktop-large = 900px</span><br></pre></td></tr></table></figure><p><strong>如果本文对您有用,谢谢打赏。</strong></p>]]></content>
<summary type="html">
<link rel="stylesheet" class="aplayer-secondary-style-marker" href="\assets\css\APlayer.min.css"><script src="\assets\js\APlayer.min.js" cla
</summary>
<category term="hexo" scheme="https://www.simon96.online/categories/hexo/"/>
<category term="hexo" scheme="https://www.simon96.online/tags/hexo/"/>
</entry>
</feed>