-
Notifications
You must be signed in to change notification settings - Fork 2
/
atom.xml
423 lines (254 loc) · 169 KB
/
atom.xml
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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>試毅-思伟</title>
<link href="/atom.xml" rel="self"/>
<link href="https://joeybling.github.io/"/>
<updated>2019-07-26T07:02:07.404Z</updated>
<id>https://joeybling.github.io/</id>
<author>
<name>試毅-思伟</name>
</author>
<generator uri="http://hexo.io/">Hexo</generator>
<entry>
<title>hexo主题之hexo-theme-yilia-plus</title>
<link href="https://joeybling.github.io/2019/07/25/hexo%E4%B8%BB%E9%A2%98%E4%B9%8Bhexo-theme-yilia-plus/"/>
<id>https://joeybling.github.io/2019/07/25/hexo主题之hexo-theme-yilia-plus/</id>
<published>2019-07-25T03:43:00.000Z</published>
<updated>2019-07-26T07:02:07.404Z</updated>
<content type="html"><![CDATA[<h1 id="hexo-theme-yilia-plus"><a href="#hexo-theme-yilia-plus" class="headerlink" title="hexo-theme-yilia-plus"></a>hexo-theme-yilia-plus</h1><blockquote><p>一个简洁优雅的hexo主题 ➡️ <a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">https://github.com/JoeyBling/hexo-theme-yilia-plus</a></p></blockquote><p>    此项目是根据<a href="https://github.com/litten/hexo-theme-yilia" target="_blank" rel="noopener">hexo-theme-yilia</a>主题做了一些优化和改动,写这个项目的初衷就是深入学习<code>Hexo</code>。使用<code>yilia</code>主题可以快速迁移到<code>yilia-plus</code></p><blockquote><p><strong>欢迎使用和Star支持,如使用过程中碰到问题,可以提出Issue,我会尽力完善</strong></p></blockquote><a id="more"></a><h2 id="关于hexo-theme-yilia-plus主题在原基础上做了以下功能升级"><a href="#关于hexo-theme-yilia-plus主题在原基础上做了以下功能升级" class="headerlink" title="关于hexo-theme-yilia-plus主题在原基础上做了以下功能升级"></a>关于<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题在原基础上做了以下功能升级</h2><ol><li>手机端头像添加主页跳转链接</li><li>集成不蒜子访问量统计功能</li><li>网易云音乐插件</li><li>页面点击小红心效果</li><li>增加了多个SubNav导航图标展示</li><li>添加GitHub Ribbons(Fork me)</li><li>页脚 Litten自定义</li><li>添加版权声明</li><li>添加百度站长平台主动推送</li><li>集成 gitment 评论 ➡️ <a href="https://github.com/JoeyBling/yilia-plus-demo" target="_blank" rel="noopener">https://github.com/JoeyBling/yilia-plus-demo</a></li><li><a href="https://gitee.com/zhousiwei/giteement" target="_blank" rel="noopener">集成码云评论</a> ➡️ <a href="https://gitee.com/zhousiwei/yilia-plus-demo" target="_blank" rel="noopener">https://gitee.com/zhousiwei/yilia-plus-demo</a></li><li>其他样式轻微调优</li></ol><blockquote><p>如果有小伙伴有新功能的意见或者改进欢迎给我提意见和建议~</p></blockquote><h2 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h2><ul><li>功能还很少,欢迎各位给我提意见和建议~</li><li><strong>本项目源于:<a href="https://github.com/litten/hexo-theme-yilia" title="https://github.com/litten/hexo-theme-yilia" target="_blank" rel="noopener">https://github.com/litten/hexo-theme-yilia</a>。向作者表示深深的敬意。</strong></li></ul><p><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">yilia-plus</a> 是为 <a href="https://github.com/hexojs/hexo" target="_blank" rel="noopener">hexo</a> 2.4+制作的主题。<br>崇尚简约优雅,以及极致的性能。 你可以点击 <a href="https://zhousiwei.gitee.io" target="_blank" rel="noopener">我的博客</a> 查看效果。</p><p>如果想体验手机浏览效果,可以扫一下二维码:</p><p><img src="/images/2743275-56d5b92f85bfa09f.png" alt=""></p><hr><h2 id="关于主题:"><a href="#关于主题:" class="headerlink" title="关于主题:"></a>关于主题:</h2><ol><li>崇尚简约</li><li>追求移动端体验</li><li>希望把加载速度做到极致(努力中)</li><li>让大家把注意力放到内容上。这是本主题设计初衷</li><li>主题不支持IE6,7,8。以后也不会</li></ol><h2 id="一、外观"><a href="#一、外观" class="headerlink" title="一、外观"></a>一、外观</h2><h4 id="常规"><a href="#常规" class="headerlink" title="常规"></a><strong>常规</strong></h4><p><img src="/images/2743275-f061575967d6ee49.png" alt=""></p><h2 id="二、开发者"><a href="#二、开发者" class="headerlink" title="二、开发者"></a>二、开发者</h2><p>    为了性能和开发工程化考虑,<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">yilia-plus</a> 需要使用<code>webpack</code>进行构建生成。<br>如果您对主题有一些定制化的需求,请参考wiki<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus/wiki/yilia-plus%E6%BA%90%E7%A0%81%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84%E5%8F%8A%E6%9E%84%E5%BB%BA%E9%A1%BB%E7%9F%A5" target="_blank" rel="noopener">《yilia-plus源码目录结构及构建须知》</a></p><h2 id="三、开始使用"><a href="#三、开始使用" class="headerlink" title="三、开始使用"></a>三、开始使用</h2><h4 id="1、安装"><a href="#1、安装" class="headerlink" title="1、安装"></a>1、安装</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> ./themes/</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/JoeyBling/hexo-theme-yilia-plus.git</span><br><span class="line">mv hexo-theme-yilia-plus yilia-plus</span><br></pre></td></tr></table></figure><h4 id="2、配置"><a href="#2、配置" class="headerlink" title="2、配置"></a>2、配置</h4><p>修改hexo根目录下的 <code>_config.yml</code> ➡️ <code>theme: yilia-plus</code></p><h4 id="3、更新"><a href="#3、更新" class="headerlink" title="3、更新"></a>3、更新</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> themes/yilia-plus</span><br><span class="line">git pull</span><br></pre></td></tr></table></figure><h2 id="四、配置"><a href="#四、配置" class="headerlink" title="四、配置"></a>四、配置</h2><p>    主题配置文件在主目录下的<code>_config.yml</code>,请根据自己需要修改使用。</p><blockquote><p>完整配置例子,可以参考<a href="http://github.com/JoeyBling/yilia-plus-demo" target="_blank" rel="noopener">yilia-plus博客备份</a></p></blockquote><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><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br><span class="line">162</span><br><span class="line">163</span><br><span class="line">164</span><br><span class="line">165</span><br><span class="line">166</span><br><span class="line">167</span><br><span class="line">168</span><br><span class="line">169</span><br><span class="line">170</span><br><span class="line">171</span><br><span class="line">172</span><br><span class="line">173</span><br><span class="line">174</span><br><span class="line">175</span><br><span class="line">176</span><br><span class="line">177</span><br><span class="line">178</span><br><span class="line">179</span><br><span class="line">180</span><br><span class="line">181</span><br><span class="line">182</span><br><span class="line">183</span><br><span class="line">184</span><br><span class="line">185</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Header-菜单</span></span><br><span class="line"><span class="attr">menu:</span></span><br><span class="line"> <span class="string">主页:</span> <span class="string">/</span></span><br><span class="line"> <span class="string">技术笔记:</span> <span class="attr">https://zhousiwei.gitee.io/ibooks/</span></span><br><span class="line"> <span class="string">个人简历:</span> <span class="attr">https://zhousiwei.gitee.io/cv/</span></span><br><span class="line"> <span class="string">日记本:</span> <span class="string">/tags/日记本/</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># SubNav-导航</span></span><br><span class="line"><span class="attr">subnav:</span></span><br><span class="line"><span class="attr"> github:</span> <span class="string">"https://github.com/JoeyBling"</span></span><br><span class="line"><span class="attr"> gitee:</span> <span class="string">"https://gitee.com/zhousiwei"</span> <span class="comment"># 码云</span></span><br><span class="line"><span class="attr"> jianshu:</span> <span class="string">"https://www.jianshu.com/u/02cbf31a043a"</span> <span class="comment">#简书</span></span><br><span class="line"><span class="attr"> csdn:</span> <span class="string">"https://blog.csdn.net/qq_30930805"</span></span><br><span class="line"> <span class="comment">#rss: "#"</span></span><br><span class="line"><span class="attr"> zhihu:</span> <span class="string">"https://zhihu.com/people/joeybling"</span></span><br><span class="line"><span class="attr"> qq:</span> <span class="string">"img/2434387555.jpg"</span></span><br><span class="line"><span class="attr"> weixin:</span> <span class="string">"img/weixin_.png"</span></span><br><span class="line"><span class="attr"> weibo:</span> <span class="string">"http://weibo.com/jayinfo"</span></span><br><span class="line"> <span class="comment">#douban: "#"</span></span><br><span class="line"> <span class="comment">#segmentfault: "#"</span></span><br><span class="line"> <span class="comment">#bilibili: "#"</span></span><br><span class="line"> <span class="comment">#acfun: "#"</span></span><br><span class="line"> <span class="comment">#mail: "mailto:litten225@qq.com"</span></span><br><span class="line"> <span class="comment">#facebook: "#"</span></span><br><span class="line"> <span class="comment">#google: "#"</span></span><br><span class="line"> <span class="comment">#twitter: "#"</span></span><br><span class="line"> <span class="comment">#linkedin: "#"</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># RSS订阅(关于如何配置启用:https://www.jianshu.com/p/2aaac7a19736)</span></span><br><span class="line"><span class="attr">rss:</span> <span class="string">/atom.xml</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否需要修改 root 路径</span></span><br><span class="line"><span class="comment"># 如果您的网站存放在子目录中,例如 http://yoursite.com/blog,</span></span><br><span class="line"><span class="comment"># 请将您的 url 设为 http://yoursite.com/blog 并把 / 设为 /blog/。</span></span><br><span class="line"><span class="attr">root:</span> <span class="string">/</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Content</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 文章太长,截断按钮文字</span></span><br><span class="line"><span class="attr">excerpt_link:</span> <span class="string">more</span></span><br><span class="line"><span class="comment"># 文章卡片右下角常驻链接,不需要请设置为false</span></span><br><span class="line"><span class="attr">show_all_link:</span> <span class="string">'展开全文'</span></span><br><span class="line"><span class="comment"># 数学公式</span></span><br><span class="line"><span class="attr">mathjax:</span> <span class="literal">false</span></span><br><span class="line"><span class="comment"># 是否在新窗口打开链接</span></span><br><span class="line"><span class="attr">open_in_new:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 打赏</span></span><br><span class="line"><span class="comment"># 打赏type设定:0-关闭打赏; 1-文章对应的md文件里有reward:true属性,才有打赏; 2-所有文章均有打赏</span></span><br><span class="line"><span class="attr">reward_type:</span> <span class="number">2</span></span><br><span class="line"><span class="comment"># 打赏wording</span></span><br><span class="line"><span class="attr">reward_wording:</span> <span class="string">'谢谢你请我吃糖果'</span></span><br><span class="line"><span class="comment"># 支付宝二维码图片地址,跟你设置头像的方式一样。比如:/assets/img/alipay.jpg</span></span><br><span class="line"><span class="attr">alipay:</span> <span class="string">/img/alipay.jpg</span></span><br><span class="line"><span class="comment"># 微信二维码图片地址</span></span><br><span class="line"><span class="attr">weixin:</span> <span class="string">/img/weixin.png</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 目录</span></span><br><span class="line"><span class="comment"># 目录设定:0-不显示目录; 1-文章对应的md文件里有toc:true属性,才有目录; 2-所有文章均显示目录</span></span><br><span class="line"><span class="attr">toc:</span> <span class="number">1</span></span><br><span class="line"><span class="comment"># 根据自己的习惯来设置,如果你的目录标题习惯有标号,置为true即可隐藏hexo重复的序号;否则置为false</span></span><br><span class="line"><span class="attr">toc_hide_index:</span> <span class="literal">true</span></span><br><span class="line"><span class="comment"># 目录为空时的提示</span></span><br><span class="line"><span class="attr">toc_empty_wording:</span> <span class="string">'目录,不存在的…'</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否有快速回到顶部的按钮</span></span><br><span class="line"><span class="attr">top:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Miscellaneous</span></span><br><span class="line"><span class="comment"># 百度统计</span></span><br><span class="line"><span class="attr">baidu_analytics:</span> <span class="string">''</span></span><br><span class="line"><span class="attr">google_analytics:</span> <span class="string">''</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 网站图标</span></span><br><span class="line"><span class="attr">favicon:</span> <span class="string">/favicon.ico</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 你的头像url</span></span><br><span class="line"><span class="attr">avatar:</span> <span class="string">/img/head.jpg</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否开启分享</span></span><br><span class="line"><span class="attr">share_jia:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 评论:1、畅言;2、Disqus;3、Gitment;4、Giteement</span></span><br><span class="line"><span class="comment"># 不需要使用某项,直接设置值为false,或注释掉</span></span><br><span class="line"><span class="comment"># 具体请参考wiki:https://github.com/JoeyBling/hexo-theme-yilia-plus/wiki</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 1、畅言</span></span><br><span class="line"><span class="attr">changyan_appid:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">changyan_conf:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 2、Disqus 在hexo根目录的config里也有disqus_shortname字段,优先使用yilia的</span></span><br><span class="line"><span class="attr">disqus:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 3、Gitment----基于GitHub的评论系统(关闭请设置gitment_owner为false)</span></span><br><span class="line"><span class="comment"># 关于如何集成:https://www.jianshu.com/p/ac7658cc912f</span></span><br><span class="line"><span class="comment">#gitment_owner: false #你的 GitHub ID</span></span><br><span class="line"><span class="attr">gitment_owner:</span> <span class="string">JoeyBling</span> <span class="comment">#你的 GitHub ID</span></span><br><span class="line"><span class="attr">gitment_remote:</span> <span class="literal">false</span> <span class="comment"># 是否使用官方js(false可以提升访问速度)</span></span><br><span class="line"><span class="attr">gitment_repo:</span> <span class="string">'yilia-plus-demo'</span> <span class="comment">#存储评论的 repo</span></span><br><span class="line"><span class="attr">gitment_oauth:</span></span><br><span class="line"><span class="attr"> client_id:</span> <span class="string">'1062039060f4021e8ae2'</span> <span class="comment">#client ID</span></span><br><span class="line"><span class="attr"> client_secret:</span> <span class="string">'6ffbfcbd49ef5b123d524664657145a662179f34'</span> <span class="comment">#client secret</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 4、Giteement----【国内用户建议使用这个,相对比较快】</span></span><br><span class="line"><span class="comment"># 关于如何集成:https://www.jianshu.com/p/f5c4633524c7</span></span><br><span class="line"><span class="comment"># 基于码云的评论系统(https://gitee.com/zhousiwei/giteement)</span></span><br><span class="line"><span class="attr">giteement:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">false</span> <span class="comment"># 是否启用码云评论系统</span></span><br><span class="line"> <span class="comment"># 是否使用官方js(false可以提升访问速度)</span></span><br><span class="line"><span class="attr"> remote:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr"> redirect_uri:</span> <span class="attr">https://zhousiwei.gitee.io/</span> <span class="comment"># 应用回调地址(请和配置的第三方应用保持一致)</span></span><br><span class="line"> <span class="comment"># oauth_uri: https://zhousiwei.gitee.io/</span></span><br><span class="line"> <span class="comment"># 不能更改(网上开源项目https://github.com/Rob--W/cors-anywhere作者提供的专门用来跨域服务器的配置)</span></span><br><span class="line"><span class="attr"> oauth_uri:</span> <span class="attr">https://cors-anywhere.herokuapp.com/https://gitee.com/oauth/token</span></span><br><span class="line"><span class="attr"> giteeID:</span> <span class="string">zhousiwei</span> <span class="comment"># 你的码云账号英文名</span></span><br><span class="line"> <span class="comment"># 存储评论的 repo</span></span><br><span class="line"><span class="attr"> repo:</span> <span class="string">zhousiwei</span></span><br><span class="line"><span class="attr"> gitment_oauth:</span></span><br><span class="line"><span class="attr"> client_id:</span> <span class="string">''</span> <span class="comment">#client ID</span></span><br><span class="line"><span class="attr"> client_secret:</span> <span class="string">''</span> <span class="comment">#client secret</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 是否开启访问量统计功能(不蒜子)</span></span><br><span class="line"><span class="attr">busuanzi:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 网易云音乐插件</span></span><br><span class="line"><span class="attr">music:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">false</span></span><br><span class="line"> <span class="comment">#id: 1332647902 # 网易云分享的ID</span></span><br><span class="line"><span class="attr"> autoplay:</span> <span class="literal">true</span> <span class="comment"># 是否开启自动播放</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 页面点击小红心</span></span><br><span class="line"><span class="attr">clicklove:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># GitHub Ribbons(https://github.blog/2008-12-19-github-ribbons/)</span></span><br><span class="line"><span class="attr">github:</span></span><br><span class="line"><span class="attr"> url:</span> <span class="attr">https://github.com/JoeyBling/hexo-theme-yilia-plus</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 页脚 Litten</span></span><br><span class="line"><span class="attr">pagefooter:</span></span><br><span class="line"><span class="attr"> litten:</span> <span class="attr">GitHub:<a</span> <span class="string">href="https://github.com/JoeyBling/hexo-theme-yilia-plus"</span> <span class="string">target="_blank">hexo-theme-yilia-plus</a></span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 开启百度站长平台主动推送(https://ziyuan.baidu.com/linksubmit/index)</span></span><br><span class="line"><span class="attr">baidu_push:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 版权声明</span></span><br><span class="line"><span class="comment"># 版权声明type设定:0-关闭版权声明; 1-文章对应的md文件里有copyright: true属性,才有版权声明; 2-所有文章均有版权声明</span></span><br><span class="line"><span class="attr">copyright_type:</span> <span class="number">2</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 样式定制 - 一般不需要修改,除非有很强的定制欲望…</span></span><br><span class="line"><span class="attr">style:</span></span><br><span class="line"> <span class="comment"># 头像上面的背景颜色</span></span><br><span class="line"> <span class="comment"># header: '#D3D1DC'</span></span><br><span class="line"><span class="attr"> header:</span> <span class="string">'#4d4d4d'</span></span><br><span class="line"> <span class="comment"># 右滑板块背景</span></span><br><span class="line"><span class="attr"> slider:</span> <span class="string">'linear-gradient(200deg,#a0cfe4,#e8c37e)'</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># slider的设置</span></span><br><span class="line"><span class="attr">slider:</span></span><br><span class="line"> <span class="comment"># 是否默认展开tags板块</span></span><br><span class="line"><span class="attr"> showTags:</span> <span class="literal">false</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 智能菜单</span></span><br><span class="line"><span class="comment"># 如不需要,将该对应项置为false</span></span><br><span class="line"><span class="comment"># 比如</span></span><br><span class="line"><span class="comment">#smart_menu:</span></span><br><span class="line"><span class="comment"># friends: false</span></span><br><span class="line"><span class="attr">smart_menu:</span></span><br><span class="line"><span class="attr"> innerArchive:</span> <span class="string">'所有文章'</span></span><br><span class="line"><span class="attr"> friends:</span> <span class="string">'友链'</span></span><br><span class="line"><span class="attr"> aboutme:</span> <span class="string">'关于我'</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 友情链接</span></span><br><span class="line"><span class="attr">friends:</span></span><br><span class="line"> <span class="string">技术笔记:</span> <span class="attr">https://zhousiwei.gitee.io/ibooks/</span></span><br><span class="line"><span class="attr"> GitHub:</span> <span class="attr">https://github.com/JoeyBling</span></span><br><span class="line"> <span class="string">码云:</span> <span class="attr">https://gitee.com/zhousiwei</span></span><br><span class="line"> <span class="string">简书:</span> <span class="attr">https://www.jianshu.com/u/02cbf31a043a</span></span><br><span class="line"><span class="attr"> CSDN:</span> <span class="attr">https://blog.csdn.net/qq_30930805</span></span><br><span class="line"> <span class="string">知乎:</span> <span class="attr">https://www.zhihu.com/people/joeybling</span></span><br><span class="line"> <span class="string">微博:</span> <span class="attr">http://weibo.com/jayinfo</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 关于我</span></span><br><span class="line"><span class="attr">aboutme:</span> <span class="string">主要涉及技术:<br>Java后端开发、聚合支付、<br>公众号开发、开源爱好者、Linux<br><br>联系QQ:2434387555<br><br>很惭愧<br><br>只做了一点微小的工作<br>谢谢大家</span></span><br></pre></td></tr></table></figure><h3 id="Hexo博客优化"><a href="#Hexo博客优化" class="headerlink" title="Hexo博客优化"></a>Hexo博客优化</h3><ul><li><a href="https://www.jianshu.com/p/f5c4633524c7" target="_blank" rel="noopener">Hexo博客集成码云评论系统</a></li><li><a href="https://www.jianshu.com/p/ac7658cc912f" target="_blank" rel="noopener">Hexo博客集成Gitment评论</a></li><li><a href="https://www.jianshu.com/p/2aaac7a19736" target="_blank" rel="noopener">Hexo博客配置RSS插件</a></li><li><a href="https://www.jianshu.com/p/1123c89c491a" target="_blank" rel="noopener">Hexo博客使用gulp压缩静态资源</a></li><li><a href="https://www.jianshu.com/p/a0afac70afc8" target="_blank" rel="noopener">新增Hexo博客文章置顶功能</a></li><li><a href="https://www.jianshu.com/p/a7f4a42e4b49" target="_blank" rel="noopener">Hexo博客添加helper-live2d动态模型插件</a></li><li><a href="https://www.jianshu.com/p/c9f83d5b893a" target="_blank" rel="noopener">Hexo博客添加访问量统计</a></li><li><a href="https://www.jianshu.com/p/f3fe5cb74d32" target="_blank" rel="noopener">Hexo博客yilia主题添加背景音乐 (网易云音乐)</a></li><li><a href="https://www.jianshu.com/p/efebead840b2" target="_blank" rel="noopener">使用Hexo+GitHub搭建免费个人博客</a></li></ul>]]></content>
<summary type="html">
hexo主题之hexo-theme-yilia-plus
</summary>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>Hexo博客集成码云评论系统</title>
<link href="https://joeybling.github.io/2019/07/25/Hexo%E5%8D%9A%E5%AE%A2%E9%9B%86%E6%88%90%E7%A0%81%E4%BA%91%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F/"/>
<id>https://joeybling.github.io/2019/07/25/Hexo博客集成码云评论系统/</id>
<published>2019-07-25T02:39:00.000Z</published>
<updated>2019-07-26T07:02:09.040Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-前导必备"><a href="#Tips-前导必备" class="headerlink" title="Tips:前导必备"></a>Tips:前导必备</h5><ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li><li>博主使用的是<strong><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a></strong>主题</li></ul><h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><blockquote><p>giteement系统是基于<a href="https://github.com/imsun/gitment" target="_blank" rel="noopener">gitment</a>的源码开发和扩展的 ➡️ <a href="https://gitee.com/zhousiwei/giteement" target="_blank" rel="noopener">https://gitee.com/zhousiwei/giteement</a><br><a href="https://gitee.com/zhousiwei/giteement" target="_blank" rel="noopener">giteement</a>还在继续维护优化中…欢迎小伙伴们加入一起维护</p></blockquote><a id="more"></a><h6 id="目前实现以下功能:"><a href="#目前实现以下功能:" class="headerlink" title="目前实现以下功能:"></a>目前实现以下功能:</h6><ol><li>基于<a href="https://gitee.com/zhousiwei" target="_blank" rel="noopener">码云</a>的issues来进行评论的,所以需要有码云账号。</li><li>实现了类似码云issues的回复功能,评论开头用@符号选择你要回复的人,回复完毕,如果你要回复的人登录码云,会有消息提示。</li></ol><blockquote><p>效果展示 ➡️ <a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">https://zhousiwei.gitee.io/</a></p></blockquote><hr><h3 id="1、配置第三方应用"><a href="#1、配置第三方应用" class="headerlink" title="1、配置第三方应用"></a>1、配置第三方应用</h3><p>    使用码云的issues作为评论系统,就要使用码云来登录评论,所以需要在码云上配置第三方应用。</p><blockquote><p>注册一个新的第三方应用 ➡️ <a href="https://gitee.com/oauth/applications/new" target="_blank" rel="noopener">https://gitee.com/oauth/applications/new</a></p></blockquote><ul><li>应用名称(根据实际来填写)</li><li>应用描述(根据实际来填写)</li><li>应用主页(应用程序主页的完整URL)</li><li>应用回调地址(一般是博客的域名)</li><li><strong>权限请选择<code>issues</code>、<code>notes</code></strong></li></ul><p><img src="/images/2743275-7a58969acdd07ef4.png" alt=""></p><h3 id="2、配置hexo-theme-yilia-plus主题"><a href="#2、配置hexo-theme-yilia-plus主题" class="headerlink" title="2、配置hexo-theme-yilia-plus主题"></a>2、配置<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题</h3><h6 id="注册完成后得到Client-ID和Client-Secret"><a href="#注册完成后得到Client-ID和Client-Secret" class="headerlink" title="注册完成后得到Client ID和Client Secret"></a>注册完成后得到Client ID和Client Secret</h6><p><img src="/images/2743275-fa10cedf90482f2f.png" alt=""></p><h5 id="修改hexo-theme-yilia-plus主题的配置文件-config-yml"><a href="#修改hexo-theme-yilia-plus主题的配置文件-config-yml" class="headerlink" title="修改hexo-theme-yilia-plus主题的配置文件_config.yml"></a>修改<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题的配置文件<code>_config.yml</code></h5><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></pre></td><td class="code"><pre><span class="line"><span class="attr">giteement:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span> <span class="comment"># 是否启用码云评论系统</span></span><br><span class="line"> <span class="comment"># 是否使用官方js(false可以提升访问速度)</span></span><br><span class="line"><span class="attr"> remote:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr"> redirect_uri:</span> <span class="attr">https://zhousiwei.gitee.io/yilia-plus-demo</span> <span class="comment"># 应用回调地址(请和配置的第三方应用保持一致)</span></span><br><span class="line"> <span class="comment"># 不能更改(网上开源项目https://github.com/Rob--W/cors-anywhere作者提供的专门用来跨域服务器的配置)</span></span><br><span class="line"><span class="attr"> oauth_uri:</span> <span class="attr">https://cors-anywhere.herokuapp.com/https://gitee.com/oauth/token</span></span><br><span class="line"><span class="attr"> giteeID:</span> <span class="string">zhousiwei</span> <span class="comment"># 你的码云账号英文名</span></span><br><span class="line"> <span class="comment"># 存储评论的 repo</span></span><br><span class="line"><span class="attr"> repo:</span> <span class="string">yilia-plus-demo</span></span><br><span class="line"><span class="attr"> gitment_oauth:</span></span><br><span class="line"><span class="attr"> client_id:</span> <span class="string">'*********'</span> <span class="comment">#client ID</span></span><br><span class="line"><span class="attr"> client_secret:</span> <span class="string">'*********'</span> <span class="comment">#client secret</span></span><br></pre></td></tr></table></figure><h3 id="3、重新编译运行即可查看效果"><a href="#3、重新编译运行即可查看效果" class="headerlink" title="3、重新编译运行即可查看效果"></a>3、重新编译运行即可查看效果</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo s -g</span><br></pre></td></tr></table></figure><blockquote><p>针对不同文章的date属性生成id,只要保证每篇文章有date属性并且不重复即可</p></blockquote><blockquote><p><strong>hexo-theme-yilia-plus配置Demo ➡️ <a href="https://gitee.com/zhousiwei/yilia-plus-demo" target="_blank" rel="noopener">https://gitee.com/zhousiwei/yilia-plus-demo</a></strong></p></blockquote><h3 id="4、待解决问题"><a href="#4、待解决问题" class="headerlink" title="4、待解决问题"></a>4、待解决问题</h3><ol><li>giteement的UI是直接使用gitment的UI,不是很好看,后期准备优化。</li><li>新增文章的时候需要登录自己的gitee账号,点击评论初始化按钮。(后面考虑实现自动初始化 Gitment 评论脚本)</li></ol><p><img src="/images/2743275-e96101fc56ce6182.png" alt=""></p><p><img src="/images/2743275-d966b9a3f1fcd776.png" alt=""></p><h3 id="效果图"><a href="#效果图" class="headerlink" title="效果图"></a>效果图</h3><h4 id="1、整体UI"><a href="#1、整体UI" class="headerlink" title="1、整体UI"></a>1、整体UI</h4><p><img src="/images/2743275-f139337ae5992f82.png" alt=""></p><h4 id="2、-回复功能"><a href="#2、-回复功能" class="headerlink" title="2、@回复功能"></a>2、@回复功能</h4><p><img src="/images/2743275-6b437e4be899016a.png" alt=""></p><h3 id="其他主题例子"><a href="#其他主题例子" class="headerlink" title="其他主题例子"></a>其他主题例子</h3><h4 id="1、主题landscape中使用"><a href="#1、主题landscape中使用" class="headerlink" title="1、主题landscape中使用"></a>1、主题<a href="https://github.com/hexojs/hexo-theme-landscape" target="_blank" rel="noopener">landscape</a>中使用</h4><h6 id="修改themes-landscape-layout-index-ejs文件"><a href="#修改themes-landscape-layout-index-ejs文件" class="headerlink" title="修改themes/landscape/layout/index.ejs文件"></a>修改<code>themes/landscape/layout/index.ejs</code>文件</h6><p><img src="/images/2743275-6896ffbdbf941c3a.png" alt=""></p><h6 id="修改themes-landscape-layout-partial-article-ejs文件"><a href="#修改themes-landscape-layout-partial-article-ejs文件" class="headerlink" title="修改themes/landscape/layout/_partial/article.ejs文件"></a>修改<code>themes/landscape/layout/_partial/article.ejs</code>文件</h6><p><img src="/images/2743275-b5bc10f5b793da13.png" alt=""></p><h6 id="增加themes-landscape-layout-partial-comment-ejs"><a href="#增加themes-landscape-layout-partial-comment-ejs" class="headerlink" title="增加themes/landscape/layout/_partial/comment.ejs"></a>增加themes/landscape/layout/_partial/comment.ejs</h6><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></pre></td><td class="code"><pre><span class="line"><% if (!index && post.comments && theme.giteement && theme.giteement.enable){ %></span><br><span class="line"> <div id="giteement-ctn"></div></span><br><span class="line"> <% if (theme.giteement && theme.giteement.remote){ %></span><br><span class="line"> <!-- <link rel="stylesheet" href="https://giteement.oss-cn-beijing.aliyuncs.com/wd-discuss.css"> --></span><br><span class="line"> <!-- <script src="https://giteement.oss-cn-beijing.aliyuncs.com/discuss_hexo.js"></script> --></span><br><span class="line"> <link rel="stylesheet" href="https://giteement.oss-cn-beijing.aliyuncs.com/default.css"></span><br><span class="line"> <script src="https://giteement.oss-cn-beijing.aliyuncs.com/giteement.browser.js"></script></span><br><span class="line"> <% } else { %></span><br><span class="line"> <link rel="stylesheet" href="<%=config.root%>assets/default.css"></span><br><span class="line"> <script src="<%=config.root%>assets/giteement.browser.js"></script></span><br><span class="line"> <% } %></span><br><span class="line"> <script></span><br><span class="line"> var giteement = new Giteement({</span><br><span class="line"> id: '<%=page.date.format('YYYYMMDDHHmmss')%>',</span><br><span class="line"> owner: '<%=theme.giteement.giteeID%>',</span><br><span class="line"> repo: '<%=theme.giteement.repo%>',</span><br><span class="line"> backcall_uri: '<%=theme.giteement.redirect_uri%>',</span><br><span class="line"> oauth_uri: '<%=theme.giteement.oauth_uri%>',</span><br><span class="line"> oauth: {</span><br><span class="line"> client_id: '<%=theme.giteement.gitment_oauth.client_id%>',</span><br><span class="line"> client_secret: '<%=theme.giteement.gitment_oauth.client_secret%>'</span><br><span class="line"> },</span><br><span class="line"> })</span><br><span class="line"> giteement.render('giteement-ctn')</span><br><span class="line"> </script></span><br><span class="line"><% } %></span><br></pre></td></tr></table></figure><h4 id="2、主题next中使用"><a href="#2、主题next中使用" class="headerlink" title="2、主题next中使用"></a>2、主题<a href="https://github.com/theme-next/hexo-theme-next" target="_blank" rel="noopener">next</a>中使用</h4><h6 id="修改themes-next-layout-index-swig文件"><a href="#修改themes-next-layout-index-swig文件" class="headerlink" title="修改themes/next/layout/index.swig文件"></a>修改<code>themes/next/layout/index.swig</code>文件</h6><p><img src="/images/2743275-8d0e237f78f50a61.png" alt=""></p><h6 id="修改themes-next-layout-partials-comments-swig文件"><a href="#修改themes-next-layout-partials-comments-swig文件" class="headerlink" title="修改themes/next/layout/_partials/comments.swig文件"></a>修改<code>themes/next/layout/_partials/comments.swig</code>文件</h6><blockquote><p>把<code>theme.giteement.ClientID</code>和<code>theme.giteement.ClientSecret</code>改为<code>theme.giteement.gitment_oauth.client_id</code>和<code>theme.giteement.gitment_oauth.client_secret</code></p></blockquote><p><img src="/images/2743275-01b6301e3e5947c0.png" alt=""></p><blockquote><p>转载自原作者<a href="https://eillott.gitee.io/2018/08/29/Hexo%E6%8E%A5%E5%85%A5%E7%A0%81%E4%BA%91%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F/" target="_blank" rel="noopener">eillott</a>的文章,进行修改了一部分,并且集成了<strong><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a></strong>主题</p></blockquote>]]></content>
<summary type="html">
Hexo博客集成码云评论系统
</summary>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>Hexo博客集成Gitment评论</title>
<link href="https://joeybling.github.io/2019/07/24/Hexo%E5%8D%9A%E5%AE%A2%E9%9B%86%E6%88%90Gitment%E8%AF%84%E8%AE%BA/"/>
<id>https://joeybling.github.io/2019/07/24/Hexo博客集成Gitment评论/</id>
<published>2019-07-24T08:52:00.000Z</published>
<updated>2019-07-26T07:02:07.223Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-前导必备"><a href="#Tips-前导必备" class="headerlink" title="Tips:前导必备"></a>Tips:前导必备</h5><ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li><li>博主使用的是<strong><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a></strong>主题</li></ul><blockquote><p>Gitment 是一位作者实现的一款基于 GitHub Issues 的评论系统。支持在前端直接引入,不需要任何后端代码。可以在页面进行登录、查看、评论、点赞等操作,同时有完整的 <code>Markdown</code> / <code>GFM</code> 和代码高亮支持。尤为适合各种基于 GitHub Pages 的静态博客或项目页面。</p></blockquote><a id="more"></a><hr><h3 id="1、注册-OAuth-Application"><a href="#1、注册-OAuth-Application" class="headerlink" title="1、注册 OAuth Application"></a>1、注册 OAuth Application</h3><blockquote><p>注册一个新的 OAuth Application ➡️ <a href="https://github.com/settings/applications/new" target="_blank" rel="noopener">OAuth Application</a></p></blockquote><ul><li><code>Application name</code> 应用名称(根据实际来填写)</li><li><code>Homepage URL</code> 主页网址(应用程序主页的完整URL)</li><li><code>Application description</code> 应用说明(应用描述)</li><li><code>Authorization callback URL</code> 授权回调URL(一般是博客的域名)</li></ul><p><img src="/images/2743275-850f640ca28522cf.png" alt=""></p><h3 id="2、配置hexo-theme-yilia-plus主题"><a href="#2、配置hexo-theme-yilia-plus主题" class="headerlink" title="2、配置hexo-theme-yilia-plus主题"></a>2、配置<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题</h3><h6 id="注册完成后得到Client-ID和Client-Secret"><a href="#注册完成后得到Client-ID和Client-Secret" class="headerlink" title="注册完成后得到Client ID和Client Secret"></a>注册完成后得到Client ID和Client Secret</h6><p><img src="/images/2743275-79e9217bf5e1e2b2.png" alt=""></p><h5 id="修改hexo-theme-yilia-plus主题的配置文件-config-yml"><a href="#修改hexo-theme-yilia-plus主题的配置文件-config-yml" class="headerlink" title="修改hexo-theme-yilia-plus主题的配置文件_config.yml"></a>修改<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题的配置文件<code>_config.yml</code></h5><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></pre></td><td class="code"><pre><span class="line"><span class="attr">gitment_owner:</span> <span class="string">JoeyBling</span> <span class="comment">#你的 GitHub ID</span></span><br><span class="line"><span class="attr">gitment_remote:</span> <span class="literal">false</span> <span class="comment"># 是否使用官方js(false可以提升访问速度)</span></span><br><span class="line"><span class="attr">gitment_repo:</span> <span class="string">'yilia-plus-demo'</span> <span class="comment">#存储评论的 repo</span></span><br><span class="line"><span class="attr">gitment_oauth:</span></span><br><span class="line"><span class="attr"> client_id:</span> <span class="string">'*********'</span> <span class="comment">#client ID</span></span><br><span class="line"><span class="attr"> client_secret:</span> <span class="string">'*********'</span> <span class="comment">#client secret</span></span><br></pre></td></tr></table></figure><h3 id="3、重新编译运行即可查看效果"><a href="#3、重新编译运行即可查看效果" class="headerlink" title="3、重新编译运行即可查看效果"></a>3、重新编译运行即可查看效果</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo s -g</span><br></pre></td></tr></table></figure><blockquote><p><strong>hexo-theme-yilia-plus配置Demo ➡️ <a href="https://joeybling.github.io/yilia-plus-demo">https://joeybling.github.io/yilia-plus-demo</a></strong></p></blockquote><p><img src="/images/2743275-9bd93b4ded42a272.png" alt=""></p>]]></content>
<summary type="html">
Hexo博客集成Gitment评论
</summary>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>Hexo博客配置RSS插件</title>
<link href="https://joeybling.github.io/2019/07/23/Hexo%E5%8D%9A%E5%AE%A2%E9%85%8D%E7%BD%AERSS%E6%8F%92%E4%BB%B6/"/>
<id>https://joeybling.github.io/2019/07/23/Hexo博客配置RSS插件/</id>
<published>2019-07-23T07:49:00.000Z</published>
<updated>2019-07-26T07:02:07.223Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-前导必备"><a href="#Tips-前导必备" class="headerlink" title="Tips:前导必备"></a>Tips:前导必备</h5><ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li><li>博主使用的是<strong><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a></strong>主题</li></ul><hr><h3 id="1、安装rss插件"><a href="#1、安装rss插件" class="headerlink" title="1、安装rss插件"></a>1、安装rss插件</h3><blockquote><p>在站点根目录下安装</p></blockquote><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-generator-feed</span><br></pre></td></tr></table></figure><a id="more"></a><h3 id="2、配置-config-yml文件,启用插件"><a href="#2、配置-config-yml文件,启用插件" class="headerlink" title="2、配置_config.yml文件,启用插件"></a>2、配置<code>_config.yml</code>文件,启用插件</h3><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></pre></td><td class="code"><pre><span class="line"><span class="comment"># Extensions</span></span><br><span class="line"><span class="attr">plugins:</span></span><br><span class="line"> <span class="string">hexo-generator-feed</span></span><br><span class="line"><span class="comment">#Feed Atom</span></span><br><span class="line"><span class="attr">feed:</span></span><br><span class="line"><span class="attr"> type:</span> <span class="string">atom</span></span><br><span class="line"><span class="attr"> path:</span> <span class="string">atom.xml</span></span><br><span class="line"><span class="attr"> limit:</span> <span class="number">20</span></span><br></pre></td></tr></table></figure><h3 id="3、在hexo-theme-yilia-plus主题添加RSS订阅配置-可以跳过此步骤"><a href="#3、在hexo-theme-yilia-plus主题添加RSS订阅配置-可以跳过此步骤" class="headerlink" title="3、在hexo-theme-yilia-plus主题添加RSS订阅配置(可以跳过此步骤)"></a>3、在<a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a>主题添加RSS订阅配置<code>(可以跳过此步骤)</code></h3><blockquote><p>theme-yilia-plus</p></blockquote><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"># RSS订阅</span></span><br><span class="line"><span class="attr">rss:</span> <span class="string">/atom.xml</span></span><br></pre></td></tr></table></figure><h3 id="4、生成RSS订阅文件"><a href="#4、生成RSS订阅文件" class="headerlink" title="4、生成RSS订阅文件"></a>4、生成RSS订阅文件</h3><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">hexo g</span><br></pre></td></tr></table></figure><p><img src="/images/2743275-b19c2b7b98555d4d.png" alt=""></p>]]></content>
<summary type="html">
Hexo博客配置RSS插件
</summary>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>gulp-babel 取消严格模式("use strict")</title>
<link href="https://joeybling.github.io/2019/07/23/gulp-babel%E5%8F%96%E6%B6%88%E4%B8%A5%E6%A0%BC%E6%A8%A1%E5%BC%8Fuse%20strict/"/>
<id>https://joeybling.github.io/2019/07/23/gulp-babel取消严格模式use strict/</id>
<published>2019-07-23T01:38:00.000Z</published>
<updated>2019-07-26T07:02:06.320Z</updated>
<content type="html"><![CDATA[<blockquote><p>插件地址 ➡️ <a href="https://github.com/genify/babel-plugin-transform-remove-strict-mode" target="_blank" rel="noopener">https://github.com/genify/babel-plugin-transform-remove-strict-mode</a></p></blockquote><h3 id="1、安装"><a href="#1、安装" class="headerlink" title="1、安装"></a>1、安装</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install babel-plugin-transform-remove-strict-mode</span><br></pre></td></tr></table></figure><a id="more"></a><h3 id="2、使用"><a href="#2、使用" class="headerlink" title="2、使用"></a>2、使用</h3><blockquote><p><strong>添加内容到<code>.babelrc</code>文件</strong></p></blockquote><figure class="highlight javascript"><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><br><span class="line"> <span class="string">"plugins"</span>: [<span class="string">"transform-remove-strict-mode"</span>]</span><br><span class="line">}</span><br></pre></td></tr></table></figure><blockquote><p>重新执行打包命令即可</p></blockquote>]]></content>
<summary type="html">
gulp-babel 取消严格模式("use strict")
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Hexo博客使用gulp压缩静态资源</title>
<link href="https://joeybling.github.io/2019/07/22/Hexo%E5%8D%9A%E5%AE%A2%E4%BD%BF%E7%94%A8gulp%E5%8E%8B%E7%BC%A9%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90/"/>
<id>https://joeybling.github.io/2019/07/22/Hexo博客使用gulp压缩静态资源/</id>
<published>2019-07-22T08:35:00.000Z</published>
<updated>2019-07-26T07:02:09.597Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-前导必备"><a href="#Tips-前导必备" class="headerlink" title="Tips:前导必备"></a>Tips:前导必备</h5><ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li><li>博主使用的是<strong><a href="https://github.com/JoeyBling/hexo-theme-yilia-plus" target="_blank" rel="noopener">hexo-theme-yilia-plus</a></strong>主题</li></ul><hr><h3 id="1、全局安装gulp"><a href="#1、全局安装gulp" class="headerlink" title="1、全局安装gulp"></a>1、全局安装gulp</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">npm install gulp -g</span><br><span class="line"><span class="comment"># 查看版本</span></span><br><span class="line">gulp -v</span><br></pre></td></tr></table></figure><a id="more"></a><h3 id="2、安装gulp插件"><a href="#2、安装gulp插件" class="headerlink" title="2、安装gulp插件"></a>2、安装gulp插件</h3><blockquote><p>在站点根目录下安装</p></blockquote><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><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">npm install gulp --save</span><br><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><span class="line"><span class="comment"># 解决【Gulp打包问题】 GulpUglifyError: unable to minify JavaScript</span></span><br><span class="line"><span class="comment"># 解决 gulp-uglify 压缩JavaScript 不兼容 es5 语法的问题</span></span><br><span class="line">npm install babel-core@6.26.3 --save</span><br><span class="line">npm install gulp-babel@7.0.1 --save</span><br><span class="line">npm install babel-preset-es2015@6.24.1 --save</span><br><span class="line"><span class="comment"># gulp-babel 取消严格模式方法("use strict")</span></span><br><span class="line">npm install babel-plugin-transform-remove-strict-mode --save</span><br></pre></td></tr></table></figure><blockquote><p>问题:如果安装<code>gulp-imagemin</code>错误请执行以下语句<br><code>sudo npm i gulp-imagemin --unsafe-perms</code></p></blockquote><h3 id="3、创建gulpfile-js文件"><a href="#3、创建gulpfile-js文件" class="headerlink" title="3、创建gulpfile.js文件"></a>3、创建<code>gulpfile.js</code>文件</h3><blockquote><p>在 Hexo 站点下新建<code>gulpfile.js</code>文件,文件内容如下:</p></blockquote><figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">var</span> gulp = <span class="built_in">require</span>(<span class="string">'gulp'</span>);</span><br><span class="line"><span class="keyword">var</span> minifycss = <span class="built_in">require</span>(<span class="string">'gulp-minify-css'</span>);</span><br><span class="line"><span class="keyword">var</span> uglify = <span class="built_in">require</span>(<span class="string">'gulp-uglify'</span>);</span><br><span class="line"><span class="keyword">var</span> htmlmin = <span class="built_in">require</span>(<span class="string">'gulp-htmlmin'</span>);</span><br><span class="line"><span class="keyword">var</span> htmlclean = <span class="built_in">require</span>(<span class="string">'gulp-htmlclean'</span>);</span><br><span class="line"><span class="keyword">var</span> imagemin = <span class="built_in">require</span>(<span class="string">'gulp-imagemin'</span>);</span><br><span class="line"><span class="keyword">var</span> babel = <span class="built_in">require</span>(<span class="string">'gulp-babel'</span>);</span><br><span class="line"></span><br><span class="line"><span class="comment">// 压缩css文件</span></span><br><span class="line">gulp.task(<span class="string">'minify-css'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">done</span>) </span>{</span><br><span class="line"> <span class="keyword">return</span> gulp.src(<span class="string">'./public/**/*.css'</span>)</span><br><span class="line"> .pipe(minifycss())</span><br><span class="line"> .pipe(gulp.dest(<span class="string">'./public'</span>));</span><br><span class="line"> done();</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="comment">// 压缩html文件</span></span><br><span class="line">gulp.task(<span class="string">'minify-html'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">done</span>) </span>{</span><br><span class="line"> <span class="keyword">return</span> gulp.src(<span class="string">'./public/**/*.html'</span>)</span><br><span class="line"> .pipe(htmlclean())</span><br><span class="line"> .pipe(htmlmin({</span><br><span class="line"> removeComments: <span class="literal">true</span>,</span><br><span class="line"> minifyJS: <span class="literal">true</span>,</span><br><span class="line"> minifyCSS: <span class="literal">true</span>,</span><br><span class="line"> minifyURLs: <span class="literal">true</span>,</span><br><span class="line"> }))</span><br><span class="line"> .pipe(gulp.dest(<span class="string">'./public'</span>));</span><br><span class="line"> done();</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="comment">// 压缩js文件</span></span><br><span class="line">gulp.task(<span class="string">'minify-js'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">done</span>) </span>{</span><br><span class="line"> <span class="keyword">return</span> gulp.src([<span class="string">'./public/**/*.js'</span>, <span class="string">'!./public/**/*.min.js'</span>])</span><br><span class="line"> .pipe(babel({</span><br><span class="line"> <span class="comment">//将ES6代码转译为可执行的JS代码</span></span><br><span class="line"> presets: [<span class="string">'es2015'</span>] <span class="comment">// es5检查机制</span></span><br><span class="line"> }))</span><br><span class="line"> .pipe(uglify())</span><br><span class="line"> .pipe(gulp.dest(<span class="string">'./public'</span>));</span><br><span class="line"> done();</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="comment">// 压缩 public/images 目录内图片(Version<3)</span></span><br><span class="line"><span class="comment">// gulp.task('minify-images', function () {</span></span><br><span class="line"><span class="comment">// gulp.src('./public/images/**/*.*')</span></span><br><span class="line"><span class="comment">// .pipe(imagemin({</span></span><br><span class="line"><span class="comment">// optimizationLevel: 5, //类型:Number 默认:3 取值范围:0-7(优化等级)</span></span><br><span class="line"><span class="comment">// progressive: true, //类型:Boolean 默认:false 无损压缩jpg图片</span></span><br><span class="line"><span class="comment">// interlaced: false, //类型:Boolean 默认:false 隔行扫描gif进行渲染</span></span><br><span class="line"><span class="comment">// multipass: false, //类型:Boolean 默认:false 多次优化svg直到完全优化</span></span><br><span class="line"><span class="comment">// }))</span></span><br><span class="line"><span class="comment">// .pipe(gulp.dest('./public/images'));</span></span><br><span class="line"><span class="comment">// });</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// 压缩 public/images 目录内图片(Version>3)</span></span><br><span class="line">gulp.task(<span class="string">'minify-images'</span>, <span class="function"><span class="keyword">function</span> (<span class="params">done</span>) </span>{</span><br><span class="line"> gulp.src(<span class="string">'./public/images/**/*.*'</span>)</span><br><span class="line"> .pipe(imagemin([</span><br><span class="line"> imagemin.gifsicle({<span class="attr">interlaced</span>: <span class="literal">true</span>}),</span><br><span class="line"> imagemin.jpegtran({<span class="attr">progressive</span>: <span class="literal">true</span>}),</span><br><span class="line"> imagemin.optipng({<span class="attr">optimizationLevel</span>: <span class="number">5</span>}),</span><br><span class="line"> imagemin.svgo({</span><br><span class="line"> plugins: [</span><br><span class="line"> {<span class="attr">removeViewBox</span>: <span class="literal">true</span>},</span><br><span class="line"> {<span class="attr">cleanupIDs</span>: <span class="literal">false</span>}</span><br><span class="line"> ]</span><br><span class="line"> })</span><br><span class="line"> ]))</span><br><span class="line"> .pipe(gulp.dest(<span class="string">'./public/images'</span>));</span><br><span class="line"> done();</span><br><span class="line">});</span><br><span class="line"></span><br><span class="line"><span class="comment">//4.0以前的写法 </span></span><br><span class="line"><span class="comment">//gulp.task('default', [</span></span><br><span class="line"><span class="comment">// 'minify-html', 'minify-css', 'minify-js', 'minify-images'</span></span><br><span class="line"><span class="comment">//]);</span></span><br><span class="line"><span class="comment">//4.0以后的写法</span></span><br><span class="line"><span class="comment">// 执行 gulp 命令时执行的任务</span></span><br><span class="line">gulp.task(<span class="string">'default'</span>, gulp.series(gulp.parallel(<span class="string">'minify-html'</span>, <span class="string">'minify-css'</span>, <span class="string">'minify-js'</span>, <span class="string">'minify-images'</span>)), <span class="function"><span class="keyword">function</span> (<span class="params"></span>) </span>{</span><br><span class="line"> <span class="built_in">console</span>.log(<span class="string">"----------gulp Finished----------"</span>);</span><br><span class="line"> <span class="comment">// Do something after a, b, and c are finished.</span></span><br><span class="line">});</span><br></pre></td></tr></table></figure><h3 id="4、创建-babelrc文件"><a href="#4、创建-babelrc文件" class="headerlink" title="4、创建.babelrc文件"></a>4、创建<code>.babelrc</code>文件</h3><blockquote><p>在 Hexo 站点下新建<code>.babelrc</code>文件,文件内容如下:</p></blockquote><figure class="highlight javascript"><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="string">'presets'</span>: [<span class="string">'es2015'</span>],</span><br><span class="line"> <span class="string">"plugins"</span>: [<span class="string">"transform-remove-strict-mode"</span>]</span><br><span class="line">}</span><br></pre></td></tr></table></figure><h3 id="5、静态资源压缩"><a href="#5、静态资源压缩" class="headerlink" title="5、静态资源压缩"></a>5、静态资源压缩</h3><blockquote><p>只需要每次在执行 <code>generate</code> 命令后执行 <code>gulp</code> 就可以实现对静态资源的压缩<br><figure class="highlight shell"><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 g</span><br><span class="line">gulp</span><br></pre></td></tr></table></figure></p></blockquote>]]></content>
<summary type="html">
Hexo博客使用gulp压缩静态资源
</summary>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>IDEA多个model下有同名的class,debug进错了</title>
<link href="https://joeybling.github.io/2019/07/19/IDEA%E5%A4%9A%E4%B8%AAmodel%E4%B8%8B%E6%9C%89%E5%90%8C%E5%90%8D%E7%9A%84class%EF%BC%8Cdebug%E8%BF%9B%E9%94%99%E4%BA%86/"/>
<id>https://joeybling.github.io/2019/07/19/IDEA多个model下有同名的class,debug进错了/</id>
<published>2019-07-19T07:33:00.000Z</published>
<updated>2019-07-26T07:02:09.890Z</updated>
<content type="html"><![CDATA[<h5 id="1、打开设置"><a href="#1、打开设置" class="headerlink" title="1、打开设置"></a>1、打开设置</h5><blockquote><p>File ➡️ Settings ➡️ Build, Execution, Deployment ➡️ Debugger</p></blockquote><h6 id="选中show-alternative-source-switcher"><a href="#选中show-alternative-source-switcher" class="headerlink" title="选中show alternative source switcher"></a>选中<strong>show alternative source switcher</strong></h6><a id="more"></a><p><img src="https://upload-images.jianshu.io/upload_images/2743275-bf0aa0b192c415fc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/800" alt=""></p><h5 id="2、再执行debug模式,在编辑界面有下拉选项,选择你要debug的model"><a href="#2、再执行debug模式,在编辑界面有下拉选项,选择你要debug的model" class="headerlink" title="2、再执行debug模式,在编辑界面有下拉选项,选择你要debug的model"></a>2、再执行debug模式,在编辑界面有下拉选项,选择你要debug的model</h5><p><img src="https://upload-images.jianshu.io/upload_images/2743275-99b91a54ea810206.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt=""></p>]]></content>
<summary type="html">
IDEA多个model下有同名的class,debug进错了
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Vue配置marked链接添加target="_blank"</title>
<link href="https://joeybling.github.io/2019/07/19/Vue%E9%85%8D%E7%BD%AEmarked%E9%93%BE%E6%8E%A5%E6%B7%BB%E5%8A%A0target=_blank/"/>
<id>https://joeybling.github.io/2019/07/19/Vue配置marked链接添加target=_blank/</id>
<published>2019-07-19T02:07:00.000Z</published>
<updated>2019-07-26T07:02:06.546Z</updated>
<content type="html"><![CDATA[<ol><li>引入<code>marked</code><br><strong>package.json</strong><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></pre></td><td class="code"><pre><span class="line">"dependencies": {</span><br><span class="line"> "marked": "^0.3.9"</span><br><span class="line">}</span><br></pre></td></tr></table></figure></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="keyword">import</span> marked <span class="keyword">from</span> <span class="string">"marked"</span>;</span><br></pre></td></tr></table></figure><a id="more"></a><ol start="2"><li>修改生成的HTML的方法<figure class="highlight javascript"><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 class="keyword">const</span> renderer = <span class="keyword">new</span> marked.Renderer();</span><br><span class="line"><span class="comment">//https://github.com/markedjs/marked/issues/655#issuecomment-383226346</span></span><br><span class="line"><span class="keyword">const</span> linkRenderer = renderer.link;</span><br><span class="line">renderer.link = <span class="function">(<span class="params">href, title, text</span>) =></span> {</span><br><span class="line"> <span class="keyword">const</span> html = linkRenderer.call(renderer, href, title, text);</span><br><span class="line"> <span class="keyword">return</span> html.replace(<span class="regexp">/^<a /</span>, <span class="string">'<a target="_blank" rel="nofollow" '</span>);</span><br><span class="line">};</span><br><span class="line"><span class="keyword">const</span> html = marked(markdown, { renderer });</span><br></pre></td></tr></table></figure></li></ol><h5 id="Tips-marked参数配置"><a href="#Tips-marked参数配置" class="headerlink" title="Tips:marked参数配置"></a>Tips:marked参数配置</h5><figure class="highlight javascript"><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 class="keyword">const</span> renderer = <span class="keyword">new</span> marked.Renderer();</span><br><span class="line"><span class="comment">//基本设置</span></span><br><span class="line">marked.setOptions({</span><br><span class="line">renderer: renderer,</span><br><span class="line">gfm: <span class="literal">true</span>, <span class="comment">//允许 Git Hub标准的markdown.</span></span><br><span class="line">tables: <span class="literal">true</span>, <span class="comment">//允许支持表格语法(该选项要求 gfm 为true)</span></span><br><span class="line">breaks: <span class="literal">true</span>, <span class="comment">//允许回车换行(该选项要求 gfm 为true)</span></span><br><span class="line">pedantic: <span class="literal">false</span>, <span class="comment">//不纠正原始模型任何的不良行为和错误(默认为false)</span></span><br><span class="line">sanitize: <span class="literal">false</span>, <span class="comment">//对输出进行过滤(清理),将忽略任何已经输入的html代码(标签)</span></span><br><span class="line">smartLists: <span class="literal">true</span>, <span class="comment">//使用比原生markdown更时髦的列表</span></span><br><span class="line">smartypants: <span class="literal">false</span> <span class="comment">//使用更为时髦的标点</span></span><br><span class="line">});</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Vue配置marked链接添加target="_blank"
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>GitBook生成pdf出现中文不显示或乱码</title>
<link href="https://joeybling.github.io/2019/07/02/GitBook%E7%94%9F%E6%88%90pdf%E5%87%BA%E7%8E%B0%E4%B8%AD%E6%96%87%E4%B8%8D%E6%98%BE%E7%A4%BA%E6%88%96%E4%B9%B1%E7%A0%81/"/>
<id>https://joeybling.github.io/2019/07/02/GitBook生成pdf出现中文不显示或乱码/</id>
<published>2019-07-02T09:44:00.000Z</published>
<updated>2019-07-26T07:02:08.584Z</updated>
<content type="html"><![CDATA[<h5 id="1、在book-json文件plugins属性上添加yahei插件"><a href="#1、在book-json文件plugins属性上添加yahei插件" class="headerlink" title="1、在book.json文件plugins属性上添加yahei插件"></a>1、在<code>book.json</code>文件<code>plugins</code>属性上添加<code>yahei</code>插件</h5><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">"plugins": ["yahei"]</span><br></pre></td></tr></table></figure><h5 id="2、配置pluginsConfig下fontSettings属性,使用msyh-gt-微软雅黑字体"><a href="#2、配置pluginsConfig下fontSettings属性,使用msyh-gt-微软雅黑字体" class="headerlink" title="2、配置pluginsConfig下fontSettings属性,使用msyh > 微软雅黑字体"></a>2、配置<code>pluginsConfig</code>下<code>fontSettings</code>属性,使用<code>msyh</code> > 微软雅黑字体</h5><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></pre></td><td class="code"><pre><span class="line">"pluginsConfig": {</span><br><span class="line"> "fontSettings": {</span><br><span class="line"> "family": "msyh",</span><br><span class="line"> "size": 2</span><br><span class="line"> }</span><br><span class="line">}</span><br></pre></td></tr></table></figure><a id="more"></a><h5 id="3、手动从windows系统的Fonts目录下复制msyh-ttc文件或msyh-ttf文件上传到Linux的-usr-share-fonts-truetype目录下"><a href="#3、手动从windows系统的Fonts目录下复制msyh-ttc文件或msyh-ttf文件上传到Linux的-usr-share-fonts-truetype目录下" class="headerlink" title="3、手动从windows系统的Fonts目录下复制msyh.ttc文件或msyh.ttf文件上传到Linux的/usr/share/fonts/truetype目录下"></a>3、手动从windows系统的Fonts目录下复制<code>msyh.ttc</code>文件或<code>msyh.ttf</code>文件上传到Linux的<code>/usr/share/fonts/truetype</code>目录下</h5><p><strong>找不到<code>msyh.ttc</code>文件可以从 控制面板 > 外观和个性化 > 字体 中复制对应的字体文件到<code>/usr/share/fonts/truetype</code>目录下</strong></p><ul><li>也可以使用其他的字体文件,记得同步更改配置文件中<code>fontSettings</code>的属性值</li></ul><figure class="highlight shell"><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">--- 不存在truetype文件夹则新建</span><br><span class="line"><span class="meta">#</span> mkdir -p /usr/share/fonts/truetype</span><br></pre></td></tr></table></figure><h5 id="4、重新生成pdf"><a href="#4、重新生成pdf" class="headerlink" title="4、重新生成pdf"></a>4、重新生成pdf</h5><figure class="highlight shell"><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">--- 生成PDF文件</span><br><span class="line"><span class="meta">#</span> gitbook pdf ./ ./mybook.pdf</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
GitBook生成pdf出现中文不显示或乱码
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Linux下安装GLIBC_2.18和libstdc++.so</title>
<link href="https://joeybling.github.io/2019/07/02/Linux%E4%B8%8B%E5%AE%89%E8%A3%85GLIBC_2.18%E5%92%8Clibstdc++.so/"/>
<id>https://joeybling.github.io/2019/07/02/Linux下安装GLIBC_2.18和libstdc++.so/</id>
<published>2019-07-02T08:55:00.000Z</published>
<updated>2019-07-26T07:02:07.860Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-如果不装libstdc-so会报错:ImportError-usr-lib64-libstdc-so-6-version-39-GLIBCXX-3-4-15-39-not-found-required-by-opt-calibre-lib-libQt5WebKit-so-5"><a href="#Tips-如果不装libstdc-so会报错:ImportError-usr-lib64-libstdc-so-6-version-39-GLIBCXX-3-4-15-39-not-found-required-by-opt-calibre-lib-libQt5WebKit-so-5" class="headerlink" title="Tips:如果不装libstdc++.so会报错:ImportError: /usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found (required by /opt/calibre/lib/libQt5WebKit.so.5)"></a>Tips:如果不装libstdc++.so会报错:<code>ImportError: /usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found (required by /opt/calibre/lib/libQt5WebKit.so.5)</code></h5><ul><li><code>GLIBC_2.18</code>,<code>GLIBCXX_3.4.19</code></li></ul><a id="more"></a><figure class="highlight shell"><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></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> yum install libstdc++.so.6 -y</span></span><br><span class="line">--- 查看动态库版本有哪些</span><br><span class="line"><span class="meta">#</span><span class="bash"> strings /usr/lib64/libstdc++.so.6 | grep GLIBC</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> wget http://ftp.de.debian.org/debian/pool/main/g/gcc-4.8/libstdc++6-4.8-dbg_4.8.4-1_amd64.deb</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ar -x libstdc++6-4.8-dbg_4.8.4-1_amd64.deb</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tar -xvf data.tar.xz</span></span><br><span class="line">-- 拷贝至/usr/lib64下</span><br><span class="line"><span class="meta">#</span><span class="bash"> cp ./usr/lib/x86_64-linux-gnu/debug/libstdc++.so.6.0.19 /usr/lib64</span></span><br><span class="line">-- 授权</span><br><span class="line"><span class="meta">#</span><span class="bash"> chmod +x /usr/lib64/libstdc++.so.6.0.19</span></span><br><span class="line">-- 删除低版本库的软连接</span><br><span class="line"><span class="meta">#</span><span class="bash"> rm /usr/lib64/libstdc++.so.6</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ln -s /usr/lib64/libstdc++.so.6.0.19 /usr/lib64/libstdc++.so.6</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /usr/<span class="built_in">local</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tar -xzvf glibc-2.18.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> glibc-2.18</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> mkdir build && <span class="built_in">cd</span> build/</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ../configure --prefix=/usr --<span class="built_in">disable</span>-profile --<span class="built_in">enable</span>-add-ons --with-headers=/usr/include --with-binutils=/usr/bin</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make -j4</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make install</span></span><br><span class="line">--- 解决中文乱码问题</span><br><span class="line"><span class="meta">#</span><span class="bash"> make localedata/install-locales</span></span><br><span class="line">--- 检查验证</span><br><span class="line"><span class="meta">#</span><span class="bash"> ll /lib64/libc*</span></span><br><span class="line">--- 查看系统glibc支持的版本</span><br><span class="line"><span class="meta">#</span><span class="bash"> strings /lib64/libc.so.6 |grep GLIBC</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> /lib64/libc.so.6</span></span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Linux下安装GLIBC_2.18和libstdc++.so
</summary>
<category term="Linux" scheme="https://joeybling.github.io/tags/Linux/"/>
</entry>
<entry>
<title>Git分支的创建、删除、切换</title>
<link href="https://joeybling.github.io/2019/07/01/Git%E5%88%86%E6%94%AF%E7%9A%84%E5%88%9B%E5%BB%BA%E3%80%81%E5%88%A0%E9%99%A4%E3%80%81%E5%88%87%E6%8D%A2/"/>
<id>https://joeybling.github.io/2019/07/01/Git分支的创建、删除、切换/</id>
<published>2019-07-01T02:06:00.000Z</published>
<updated>2019-07-26T07:02:07.004Z</updated>
<content type="html"><![CDATA[<h5 id="1、本地创建新分支并切换到新分支"><a href="#1、本地创建新分支并切换到新分支" class="headerlink" title="1、本地创建新分支并切换到新分支"></a>1、本地创建新分支并切换到新分支</h5><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> git checkout -b 分支名</span><br></pre></td></tr></table></figure><h5 id="2、提交分支到远程仓库"><a href="#2、提交分支到远程仓库" class="headerlink" title="2、提交分支到远程仓库"></a>2、提交分支到远程仓库</h5><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> git push origin 分支名</span><br></pre></td></tr></table></figure><h5 id="3、切换分支"><a href="#3、切换分支" class="headerlink" title="3、切换分支"></a>3、切换分支</h5><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> git checkout 分支名</span><br></pre></td></tr></table></figure><a id="more"></a><h5 id="4、删除远程分支"><a href="#4、删除远程分支" class="headerlink" title="4、删除远程分支"></a>4、删除远程分支</h5><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> git push origin --delete 分支名</span><br></pre></td></tr></table></figure><h5 id="5、删除本地分支"><a href="#5、删除本地分支" class="headerlink" title="5、删除本地分支"></a>5、删除本地分支</h5><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> git branch -D 分支名</span><br></pre></td></tr></table></figure><blockquote><p>Tips:其他分支命令</p></blockquote><ul><li>查看当前分支 <code>git branch</code></li><li>查看所属分支 <code>git branch -a</code></li></ul>]]></content>
<summary type="html">
Git分支的创建、删除、切换
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Linux安装python2.7.9</title>
<link href="https://joeybling.github.io/2019/06/24/Linux%E5%AE%89%E8%A3%85python2.7.9/"/>
<id>https://joeybling.github.io/2019/06/24/Linux安装python2.7.9/</id>
<published>2019-06-24T09:55:00.000Z</published>
<updated>2019-07-26T07:02:09.984Z</updated>
<content type="html"><![CDATA[<blockquote><p>官网地址:<a href="https://www.python.org/downloads/" target="_blank" rel="noopener">https://www.python.org/downloads/</a></p></blockquote><h3 id="1、Linux下安装-其他系统请自行前往官网安装"><a href="#1、Linux下安装-其他系统请自行前往官网安装" class="headerlink" title="1、Linux下安装(其他系统请自行前往官网安装)"></a>1、Linux下安装<code>(其他系统请自行前往官网安装)</code></h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line">--- 安装依赖包</span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /usr/<span class="built_in">local</span></span></span><br><span class="line"><span class="meta">#</span><span class="bash"> yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make -y</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tar -xzvf Python-2.7.9.tgz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> Python-2.7.9</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ./configure --prefix=/usr/<span class="built_in">local</span>/Python2.7.9 --<span class="built_in">enable</span>-shared -<span class="built_in">enable</span>-unicode=ucs4</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make install</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> python -V</span></span><br></pre></td></tr></table></figure><a id="more"></a><h3 id="2、python解释器指向python2-7-9"><a href="#2、python解释器指向python2-7-9" class="headerlink" title="2、python解释器指向python2.7.9"></a>2、python解释器指向python2.7.9</h3><figure class="highlight shell"><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 class="bash"> <span class="built_in">which</span> python</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /usr/bin</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> rm python</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ln -s /usr/<span class="built_in">local</span>/Python2.7.9/bin/python python</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> python -V --执行报错</span></span><br></pre></td></tr></table></figure><h3 id="3、解决python-V执行报错"><a href="#3、解决python-V执行报错" class="headerlink" title="3、解决python -V执行报错"></a>3、解决python -V执行报错</h3><figure class="highlight shell"><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="meta">#</span><span class="bash"> <span class="built_in">cd</span> /etc/ld.so.conf.d/</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">echo</span> <span class="string">"/usr/local/Python2.7.9/lib"</span> > python2.7.conf</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ldconfig</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> python -V</span></span><br></pre></td></tr></table></figure><h3 id="4、由于yum使用了原来python2-6的一些脚本,需要将yum重新导向原来的python2-6解释器才可以使用"><a href="#4、由于yum使用了原来python2-6的一些脚本,需要将yum重新导向原来的python2-6解释器才可以使用" class="headerlink" title="4、由于yum使用了原来python2.6的一些脚本,需要将yum重新导向原来的python2.6解释器才可以使用"></a>4、由于yum使用了原来python2.6的一些脚本,需要将yum重新导向原来的python2.6解释器才可以使用</h3><figure class="highlight shell"><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="meta">#</span><span class="bash"> <span class="built_in">which</span> yum</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> vi /usr/bin/yum</span></span><br><span class="line">----修改第一行路径为: #!/usr/bin/python2.6</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Linux安装python2.7.9
</summary>
<category term="Linux" scheme="https://joeybling.github.io/tags/Linux/"/>
</entry>
<entry>
<title>GitBook相关配置及优化</title>
<link href="https://joeybling.github.io/2019/06/24/GitBook%E7%9B%B8%E5%85%B3%E9%85%8D%E7%BD%AE%E5%8F%8A%E4%BC%98%E5%8C%96/"/>
<id>https://joeybling.github.io/2019/06/24/GitBook相关配置及优化/</id>
<published>2019-06-24T08:58:00.000Z</published>
<updated>2019-07-26T07:02:10.059Z</updated>
<content type="html"><![CDATA[<h3 id="1、GitBook配置说明"><a href="#1、GitBook配置说明" class="headerlink" title="1、GitBook配置说明"></a>1、GitBook配置说明</h3><h6 id="1-1、目录结构"><a href="#1-1、目录结构" class="headerlink" title="1.1、目录结构"></a>1.1、目录结构</h6><figure class="highlight lua"><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">├── book.json</span><br><span class="line">├── README.md</span><br><span class="line">├── SUMMARY.md</span><br><span class="line">├── chapter<span class="number">-1</span>/</span><br><span class="line">| ├── README.md</span><br><span class="line">| ├── something.md</span><br><span class="line">├── chapter<span class="number">-2</span>/</span><br><span class="line">| ├── README.md</span><br></pre></td></tr></table></figure><a id="more"></a><h6 id="1-2、GitBook-特殊文件的功能:"><a href="#1-2、GitBook-特殊文件的功能:" class="headerlink" title="1.2、GitBook 特殊文件的功能:"></a>1.2、GitBook 特殊文件的功能:</h6><table><thead><tr><th style="text-align:center">文件名</th><th style="text-align:center">描述</th></tr></thead><tbody><tr><td style="text-align:center">book.json</td><td style="text-align:center">配置数据 (optional)</td></tr><tr><td style="text-align:center">README.md</td><td style="text-align:center">电子书的前言或简介 (required)</td></tr><tr><td style="text-align:center">SUMMARY.md</td><td style="text-align:center">电子书目录 (optional)</td></tr><tr><td style="text-align:center">GLOSSARY.md</td><td style="text-align:center">词汇/注释术语列表 (optional)</td></tr></tbody></table><h6 id="1-3、book-json的配置说明"><a href="#1-3、book-json的配置说明" class="headerlink" title="1.3、book.json的配置说明"></a>1.3、book.json的配置说明</h6><table><thead><tr><th style="text-align:center">变量</th><th style="text-align:center">描述</th></tr></thead><tbody><tr><td style="text-align:center">root</td><td style="text-align:center">包含所有图书文件的根文件夹的路径,除了 book.json</td></tr><tr><td style="text-align:center">structure</td><td style="text-align:center">指定自述文件,摘要,词汇表等的路径</td></tr><tr><td style="text-align:center">title</td><td style="text-align:center">您的书名,默认值是从 README 中提取出来的。在 GitBook.com 上,这个字段是预填的。</td></tr><tr><td style="text-align:center">description</td><td style="text-align:center">您的书籍的描述,默认值是从 README 中提取出来的。在 GitBook.com 上,这个字段是预填的。</td></tr><tr><td style="text-align:center">author</td><td style="text-align:center">作者名。在GitBook.com上,这个字段是预填的。</td></tr><tr><td style="text-align:center">isbn</td><td style="text-align:center">国际标准书号 ISBN</td></tr><tr><td style="text-align:center">language</td><td style="text-align:center">本书的语言类型 —— <a href="https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes" target="_blank" rel="noopener">ISO code</a> 。默认值是 <code>en</code></td></tr><tr><td style="text-align:center">direction</td><td style="text-align:center">文本阅读顺序。可以是 rtl (从右向左)或 ltr (从左向右),默认值依赖于 language 的值。</td></tr><tr><td style="text-align:center">gitbook</td><td style="text-align:center">应该使用的GitBook版本,并接受类似于 <code>>=3.0.0</code> 的条件。</td></tr><tr><td style="text-align:center">links</td><td style="text-align:center">在左侧导航栏添加链接信息</td></tr><tr><td style="text-align:center">plugins</td><td style="text-align:center">要加载的插件列表(<a href="https://docs.gitbook.com/v2-changes/important-differences#plugins" target="_blank" rel="noopener">官网插件列表</a>)</td></tr><tr><td style="text-align:center">pluginsConfig</td><td style="text-align:center">插件的配置</td></tr></tbody></table><h6 id="1-4、Gitbook-默认带有-5-个插件:"><a href="#1-4、Gitbook-默认带有-5-个插件:" class="headerlink" title="1.4、Gitbook 默认带有 5 个插件:"></a>1.4、Gitbook 默认带有 5 个插件:</h6><ul><li><code>highlight - 语法高亮插件</code>、<code>search - 搜索插件</code>、<code>sharing - 分享插件</code>、<code>font-settings - 字体设置插件</code>、<code>livereload - 热加载插件</code></li></ul><h6 id="1-5、去除自带插件"><a href="#1-5、去除自带插件" class="headerlink" title="1.5、去除自带插件"></a>1.5、去除自带插件</h6><p><strong>可以在插件名称前面加 <code>-</code></strong><br><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></pre></td><td class="code"><pre><span class="line">"plugins": [</span><br><span class="line"> <span class="string">"-search"</span></span><br><span class="line">]</span><br></pre></td></tr></table></figure></p><p><strong>Tips:添加插件后要进行安装 <code>gitbook install</code></strong></p><h6 id="1-6、设置PDF输出格式"><a href="#1-6、设置PDF输出格式" class="headerlink" title="1.6、设置PDF输出格式"></a>1.6、设置PDF输出格式</h6><table><thead><tr><th style="text-align:center">变量</th><th style="text-align:center">描述</th></tr></thead><tbody><tr><td style="text-align:center">pdf.pageNumbers</td><td style="text-align:center">是否添加页码,默认是true</td></tr><tr><td style="text-align:center">pdf.fontSize</td><td style="text-align:center">字体大小,默认是12</td></tr><tr><td style="text-align:center">pdf.fontFamily</td><td style="text-align:center">字体,默认字体是Arial</td></tr><tr><td style="text-align:center">pdf.paperSize</td><td style="text-align:center">Paper size, options are <code>a0</code>,<code>a1</code>,<code>a2</code>,<code>a3</code>,<code>a4</code>,<code>a5</code>,<code>a6</code>,<code>b0</code>,<code>b1</code>,<code>b2</code>,<code>b3</code>,<code>b4</code>,<code>b5</code>,<code>b6</code>,<code>legal</code>,<code>letter</code>(default is <code>a4</code>)</td></tr><tr><td style="text-align:center">pdf.margin.top</td><td style="text-align:center">Top margin (default is 56)</td></tr><tr><td style="text-align:center">pdf.margin.bottom</td><td style="text-align:center">Bottom margin (default is 56)</td></tr><tr><td style="text-align:center">pdf.margin.right</td><td style="text-align:center">Right margin (default is 62)</td></tr><tr><td style="text-align:center">pdf.margin.left</td><td style="text-align:center">Left margin (default is 62)</td></tr></tbody></table><hr><h3 id="2、GitBook生成电子书"><a href="#2、GitBook生成电子书" class="headerlink" title="2、GitBook生成电子书"></a>2、GitBook生成电子书</h3><ul><li>需要有calibre-ebook环境 ➡️ <a href="https://www.jianshu.com/p/244c2b4632d9" target="_blank" rel="noopener">Linux下安装calibre-ebook</a></li><li><a href="https://www.jianshu.com/p/e08eb95f79c7" target="_blank" rel="noopener">GitBook生成pdf出现中文不显示或乱码</a></li></ul><figure class="highlight shell"><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">--- 生成PDF文件</span><br><span class="line"><span class="meta">#</span> gitbook pdf ./ ./mybook.pdf</span><br><span class="line">--- 生成ePub文件</span><br><span class="line"><span class="meta">#</span> gitbook epub ./ ./mybook.epub</span><br><span class="line">--- 生成Mobi文件</span><br><span class="line"><span class="meta">#</span> gitbook mobi ./ ./mybook.mobi</span><br></pre></td></tr></table></figure><hr><h3 id="3、使用gitbook-convert"><a href="#3、使用gitbook-convert" class="headerlink" title="3、使用gitbook-convert"></a>3、使用gitbook-convert</h3><blockquote><p>说明:把<code>docx</code>、<code>xml</code>、<code>html</code>、<code>odt</code>文档转成<code>GitBook</code></p></blockquote><ul><li><strong>官网地址:<a href="https://github.com/GitbookIO/gitbook-convert" target="_blank" rel="noopener">https://github.com/GitbookIO/gitbook-convert</a></strong></li></ul><figure class="highlight shell"><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> npm install gitbook-convert -g</span><br><span class="line">--- 如果需要做软链</span><br><span class="line"><span class="meta">#</span> ln -s /usr/local/node-v8.11.2-linux-x64/bin/gitbook-convert /usr/local/bin/gitbook-convert</span><br><span class="line">--- 如何使用</span><br><span class="line"><span class="meta">#</span> gitbook-convert [options] <file> [export-directory]</span><br></pre></td></tr></table></figure><hr><h3 id="4、GitBook插件列表"><a href="#4、GitBook插件列表" class="headerlink" title="4、GitBook插件列表"></a>4、GitBook插件列表</h3><ul><li><code>mygitalk</code> 基于gitalk的评论插件 ➡️ <a href="https://github.com/snowdreams1006/gitbook-plugin-mygitalk" target="_blank" rel="noopener">https://github.com/snowdreams1006/gitbook-plugin-mygitalk</a></li><li><code>theme-default</code> GitBook的默认主题 ➡️ <a href="https://github.com/GitbookIO/theme-default" target="_blank" rel="noopener">https://github.com/GitbookIO/theme-default</a></li><li><code>autotheme</code> 自动换肤插件 ➡️ <a href="https://github.com/willin/gitbook-plugin-autotheme" target="_blank" rel="noopener">https://github.com/willin/gitbook-plugin-autotheme</a></li><li><code>sharing</code> 默认的分享插件 ➡️ <a href="https://github.com/GitbookIO/plugin-sharing" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-sharing</a></li><li><code>fontsettings</code> 默认的字体、字号、颜色设置插件 ➡️ <a href="https://github.com/GitbookIO/plugin-fontsettings" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-fontsettings</a></li><li><code>highlight</code> 默认的代码高亮插件,通常会使用 prism 来替换 ➡️ <a href="https://github.com/GitbookIO/plugin-highlight" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-highlight</a></li><li><code>search</code> 默认搜索插件 ➡️ <a href="https://github.com/GitbookIO/plugin-search" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-search</a></li><li><code>search-plus</code> 支持中文搜索插件 ➡️ <a href="https://github.com/lwdgit/gitbook-plugin-search-plus" target="_blank" rel="noopener">https://github.com/lwdgit/gitbook-plugin-search-plus</a></li><li><code>prism</code> 基于 <a href="http://prismjs.com/" target="_blank" rel="noopener">Prism</a> 的代码高亮 ➡️ <a href="https://github.com/gaearon/gitbook-plugin-prism" target="_blank" rel="noopener">https://github.com/gaearon/gitbook-plugin-prism</a></li><li><code>favicon</code> 更改网站的 favicon.ico ➡️ <a href="https://github.com/menduo/gitbook-plugin-favicon" target="_blank" rel="noopener">https://github.com/menduo/gitbook-plugin-favicon</a></li><li><code>github</code> 在右上角显示 github 仓库的图标链接 ➡️ <a href="https://github.com/GitbookIO/plugin-github" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-github</a></li><li><code>github-buttons</code> 显示 github 仓库的<strong>star</strong>和<strong>fork</strong>按钮 ➡️ <a href="https://github.com/azu/gitbook-plugin-github-buttons" target="_blank" rel="noopener">https://github.com/azu/gitbook-plugin-github-buttons</a></li><li><code>splitter</code> 在左侧目录和右侧内容之间添加一个可以拖拽的栏,用来调整两边的宽度 ➡️ <a href="https://github.com/yoshidax/gitbook-plugin-splitter" target="_blank" rel="noopener">https://github.com/yoshidax/gitbook-plugin-splitter</a></li><li><code>copy-code-button</code> 为代码块添加复制的按钮 ➡️ <a href="https://github.com/WebEngage/gitbook-plugin-copy-code-button" target="_blank" rel="noopener">https://github.com/WebEngage/gitbook-plugin-copy-code-button</a></li><li><code>tbfed-pagefooter</code> 自定义页脚,显示版权和最后修订时间 ➡️ <a href="https://github.com/zhj3618/gitbook-plugin-tbfed-pagefooter" target="_blank" rel="noopener">https://github.com/zhj3618/gitbook-plugin-tbfed-pagefooter</a></li><li><code>expandable-chapters</code> 收起或展开章节目录中的父节点 ➡️ <a href="https://github.com/DomainDrivenArchitecture/gitbook-plugin-expandable-chapters" target="_blank" rel="noopener">https://github.com/DomainDrivenArchitecture/gitbook-plugin-expandable-chapters</a></li><li><code>expandable-chapters-small</code> 比较好的折叠侧边栏 ➡️ <a href="https://github.com/lookdczar/gitbook-plugin-expandable-chapters-small-auto" target="_blank" rel="noopener">https://github.com/lookdczar/gitbook-plugin-expandable-chapters-small-auto</a></li><li><code>book-summary-scroll-position-saver</code> 自动保存左侧目录区域导航条的位置 ➡️ <a href="https://github.com/yoshidax/gitbook-plugin-book-summary-scroll-position-saver" target="_blank" rel="noopener">https://github.com/yoshidax/gitbook-plugin-book-summary-scroll-position-saver</a></li><li><code>ga</code> 添加 Google 统计代码 ➡️ <a href="https://github.com/GitbookIO/plugin-ga" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-ga</a></li><li><code>sitemap</code> 生成站点地图 ➡️ <a href="https://github.com/GitbookIO/plugin-sitemap" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-sitemap</a></li><li><code>baidu</code> 使用百度统计 ➡️ <a href="https://github.com/poppinlp/gitbook-plugin-baidu" target="_blank" rel="noopener">https://github.com/poppinlp/gitbook-plugin-baidu</a></li><li><code>Donate</code> Gitbook 捐赠打赏插件 ➡️ <a href="https://github.com/willin/gitbook-plugin-donate" target="_blank" rel="noopener">https://github.com/willin/gitbook-plugin-donate</a></li><li><code>anchors</code> 标题带有 github 样式的锚点 ➡️ <a href="https://github.com/rlmv/gitbook-plugin-anchors" target="_blank" rel="noopener">https://github.com/rlmv/gitbook-plugin-anchors</a></li><li><code>anchor-navigation-ex</code> 插件锚导航-EX ➡️ <a href="https://github.com/zq99299/gitbook-plugin-anchor-navigation-ex" target="_blank" rel="noopener">https://github.com/zq99299/gitbook-plugin-anchor-navigation-ex</a></li><li><code>theme-api</code> 编写 API 文档 ➡️ <a href="https://github.com/GitbookIO/theme-api" target="_blank" rel="noopener">https://github.com/GitbookIO/theme-api</a></li><li><code>katex</code> 使用KaTex进行数学排版 ➡️ <a href="https://github.com/GitbookIO/plugin-katex" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-katex</a></li><li><code>editlink</code> 内容顶部显示<strong>编辑本页</strong>链接 ➡️ <a href="https://github.com/zhaoda/gitbook-plugin-editlink" target="_blank" rel="noopener">https://github.com/zhaoda/gitbook-plugin-editlink</a></li><li><code>ad</code> 在每个页面顶部和底部添加广告或任何自定义内容 ➡️ <a href="https://github.com/zhaoda/gitbook-plugin-ad" target="_blank" rel="noopener">https://github.com/zhaoda/gitbook-plugin-ad</a></li><li><code>image-captions</code> 抓取内容中图片的<code>alt</code>或<code>title</code>属性,在图片下面显示标题 ➡️ <a href="https://github.com/todvora/gitbook-plugin-image-captions" target="_blank" rel="noopener">https://github.com/todvora/gitbook-plugin-image-captions</a></li><li><code>chart</code> 使用 C3.js 图表 ➡️ <a href="https://github.com/csbun/gitbook-plugin-chart" target="_blank" rel="noopener">https://github.com/csbun/gitbook-plugin-chart</a></li><li><code>styles-sass</code> 使用 SASS 替换 CSS ➡️ <a href="https://github.com/GitbookIO/plugin-styles-sass" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-styles-sass</a></li><li><code>styles-less</code> 使用 LESS 替换 CSS ➡️ <a href="https://github.com/GitbookIO/plugin-styles-less" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-styles-less</a></li><li><code>disqus</code> 添加 disqus 评论插件 ➡️ <a href="https://github.com/GitbookIO/plugin-disqus" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-disqus</a></li><li><code>latex-codecogs</code> 使用数学方程式 ➡️ <a href="https://github.com/GitbookIO/plugin-latex-codecogs" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-latex-codecogs</a></li><li><code>mermaid</code> 使用流程图 ➡️ <a href="https://github.com/JozoVilcek/gitbook-plugin-mermaid" target="_blank" rel="noopener">https://github.com/JozoVilcek/gitbook-plugin-mermaid</a></li><li><code>atoc</code> 插入 TOC 目录 ➡️ <a href="https://github.com/willin/gitbook-plugin-atoc" target="_blank" rel="noopener">https://github.com/willin/gitbook-plugin-atoc</a></li><li><code>ace</code> 插入代码高亮编辑器 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-ace" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-ace</a></li><li><code>sectionx</code> 分离各个段落,并提供一个展开收起的按钮 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-sectionx" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-sectionx</a></li><li><code>mcqx</code> 交互式多选插件 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-mcqx" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-mcqx</a></li><li><code>include-codeblock</code> 通过引用文件插入代码 ➡️ <a href="https://github.com/azu/gitbook-plugin-include-codeblock" target="_blank" rel="noopener">https://github.com/azu/gitbook-plugin-include-codeblock</a></li><li><code>fbqx</code> 使用填空题 ➡️ <a href="https://github.com/Erwin-Chan/gitbook-plugin-fbqx" target="_blank" rel="noopener">https://github.com/Erwin-Chan/gitbook-plugin-fbqx</a></li><li><code>spoiler</code> 隐藏答案,当鼠标划过时才显示 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-spoiler" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-spoiler</a></li><li><code>anchor-navigation</code> 锚点导航 ➡️ <a href="https://github.com/yaneryou/gitbook-plugin-anchor-navigation" target="_blank" rel="noopener">https://github.com/yaneryou/gitbook-plugin-anchor-navigation</a></li><li><code>youtubex</code> 插入 YouTube 视频 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-youtubex" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-youtubex</a></li><li><code>redirect</code> 重定向页面跳转 ➡️ <a href="https://github.com/ketan/gitbook-plugin-redirect" target="_blank" rel="noopener">https://github.com/ketan/gitbook-plugin-redirect</a></li><li><code>duoshuo</code> 使用多说评论 ➡️ <a href="https://github.com/codepiano/gitbook-plugin-duoshuo" target="_blank" rel="noopener">https://github.com/codepiano/gitbook-plugin-duoshuo</a></li><li><code>jsfiddle</code> 插入 JSFiddle 组件 ➡️ <a href="https://github.com/Mavrin/gitbook-plugin-jsfiddle" target="_blank" rel="noopener">https://github.com/Mavrin/gitbook-plugin-jsfiddle</a></li><li><code>jsbin</code> 插入 JSBin 组件 ➡️ <a href="https://github.com/jcouyang/gitbook-plugin-jsbin" target="_blank" rel="noopener">https://github.com/jcouyang/gitbook-plugin-jsbin</a></li><li><code>Advanced Emoji</code> 支持emoji表情 ➡️ <a href="https://github.com/codeclou/gitbook-plugin-advanced-emoji" target="_blank" rel="noopener">https://github.com/codeclou/gitbook-plugin-advanced-emoji</a></li><li><code>Puml</code> 使用 PlantUML 展示 uml 图 ➡️ <a href="https://github.com/GitbookIO/plugin-puml" target="_blank" rel="noopener">https://github.com/GitbookIO/plugin-puml</a></li><li><code>Graph</code> 使用 function-plot 绘制数学函数图 ➡️ <a href="https://github.com/cjam/gitbook-plugin-graph" target="_blank" rel="noopener">https://github.com/cjam/gitbook-plugin-graph</a></li><li><code>Todo</code> 添加 Todo 功能 ➡️ <a href="https://github.com/ly-tools/gitbook-plugin-todo" target="_blank" rel="noopener">https://github.com/ly-tools/gitbook-plugin-todo</a></li><li><code>include-csv</code> 展示 csv 文件内容 ➡️ <a href="https://github.com/TakuroFukamizu/gitbook-plugin-include-csv" target="_blank" rel="noopener">https://github.com/TakuroFukamizu/gitbook-plugin-include-csv</a></li><li><code>musicxml</code> 支持 musicxml 格式的乐谱渲染 ➡️ <a href="https://github.com/ymcatar/gitbook-plugin-musicxml" target="_blank" rel="noopener">https://github.com/ymcatar/gitbook-plugin-musicxml</a></li><li><code>versions-select</code> 添加版本选择的下拉菜单,针对文档有多个版本的情况 ➡️ <a href="https://github.com/prescottprue/gitbook-plugin-versions-select" target="_blank" rel="noopener">https://github.com/prescottprue/gitbook-plugin-versions-select</a></li><li><code>rss</code> 添加 rss 订阅功能 ➡️ <a href="https://github.com/denysdovhan/gitbook-plugin-rss" target="_blank" rel="noopener">https://github.com/denysdovhan/gitbook-plugin-rss</a></li><li><code>multipart</code> 将书籍分成几个部分 ➡️ <a href="https://github.com/citizenmatt/gitbook-plugin-multipart" target="_blank" rel="noopener">https://github.com/citizenmatt/gitbook-plugin-multipart</a></li><li><code>url-embed</code> 嵌入动态内容 ➡️ <a href="https://github.com/basilvetas/gitbook-plugin-url-embed" target="_blank" rel="noopener">https://github.com/basilvetas/gitbook-plugin-url-embed</a></li></ul><h3 id="5、博主示例book-json配置"><a href="#5、博主示例book-json配置" class="headerlink" title="5、博主示例book.json配置"></a>5、博主示例book.json配置</h3><figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br></pre></td><td class="code"><pre><span class="line">{</span><br><span class="line"><span class="attr">"gitbook"</span>: <span class="string">"3.x.x"</span>,</span><br><span class="line"><span class="attr">"plugins"</span>: [<span class="string">"favicon"</span>, <span class="string">"yahei"</span>, <span class="string">"github"</span>, <span class="string">"autotheme"</span>, <span class="string">"-lunr"</span>, <span class="string">"-search"</span>,</span><br><span class="line"><span class="string">"search-plus"</span>, <span class="string">"prism"</span>, <span class="string">"-highlight"</span>, <span class="string">"github-buttons"</span>, <span class="string">"splitter"</span>,</span><br><span class="line"><span class="string">"-sharing"</span>, <span class="string">"sharing-plus"</span>, <span class="string">"tbfed-pagefooter"</span>, <span class="string">"expandable-chapters-small"</span>,</span><br><span class="line"><span class="string">"book-summary-scroll-position-saver"</span>, <span class="string">"ga"</span>, <span class="string">"baidu"</span>, <span class="string">"donate"</span>,</span><br><span class="line"><span class="string">"anchors"</span>, <span class="string">"anchor-navigation-ex"</span>, <span class="string">"sitemap-general"</span>,</span><br><span class="line"><span class="string">"copy-code-button"</span>, <span class="string">"mygitalk"</span>, <span class="string">"multipart"</span></span><br><span class="line">],</span><br><span class="line"><span class="attr">"pluginsConfig"</span>: {</span><br><span class="line"><span class="attr">"theme-default"</span>: {</span><br><span class="line"><span class="attr">"showLevel"</span>: <span class="literal">true</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"fontSettings"</span>: {</span><br><span class="line"><span class="attr">"family"</span>: <span class="string">"serif"</span>,</span><br><span class="line"><span class="attr">"size"</span>: <span class="number">2</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"github"</span>: {</span><br><span class="line"><span class="attr">"url"</span>: <span class="string">"https://github.com/JoeyBling"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"autotheme"</span>: {</span><br><span class="line"><span class="attr">"white"</span>: [<span class="number">9</span>, <span class="number">10</span>, <span class="number">11</span>, <span class="number">12</span>, <span class="number">13</span>, <span class="number">14</span>, <span class="number">15</span>, <span class="number">16</span>, <span class="number">17</span>],</span><br><span class="line"><span class="attr">"sepia"</span>: [<span class="number">6</span>, <span class="number">7</span>, <span class="number">8</span>, <span class="number">18</span>, <span class="number">19</span>],</span><br><span class="line"><span class="attr">"night"</span>: [<span class="number">20</span>, <span class="number">21</span>, <span class="number">22</span>, <span class="number">23</span>, <span class="number">0</span>, <span class="number">1</span>, <span class="number">2</span>, <span class="number">3</span>, <span class="number">4</span>, <span class="number">5</span>]</span><br><span class="line">},</span><br><span class="line"><span class="attr">"prism"</span>: {</span><br><span class="line"><span class="attr">"css"</span>: [</span><br><span class="line"><span class="string">"prismjs/themes/prism-tomorrow.css"</span></span><br><span class="line">]</span><br><span class="line">},</span><br><span class="line"><span class="attr">"github-buttons"</span>: {</span><br><span class="line"><span class="attr">"buttons"</span>: [{</span><br><span class="line"><span class="attr">"user"</span>: <span class="string">"JoeyBling"</span>,</span><br><span class="line"><span class="attr">"repo"</span>: <span class="string">"myBook"</span>,</span><br><span class="line"><span class="attr">"type"</span>: <span class="string">"star"</span>,</span><br><span class="line"><span class="attr">"size"</span>: <span class="string">"small"</span>,</span><br><span class="line"><span class="attr">"count"</span>: <span class="literal">true</span></span><br><span class="line">}]</span><br><span class="line">},</span><br><span class="line"><span class="attr">"sharing"</span>: {</span><br><span class="line"><span class="attr">"douban"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"facebook"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"google"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"hatenaBookmark"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"instapaper"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"line"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"linkedin"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"messenger"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"pocket"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"qq"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"qzone"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"stumbleupon"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"twitter"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"viber"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"vk"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"weibo"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"whatsapp"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"all"</span>: [</span><br><span class="line"><span class="string">"facebook"</span>, <span class="string">"google"</span>, <span class="string">"twitter"</span>,</span><br><span class="line"><span class="string">"weibo"</span>, <span class="string">"instapaper"</span>, <span class="string">"linkedin"</span>,</span><br><span class="line"><span class="string">"pocket"</span>, <span class="string">"stumbleupon"</span></span><br><span class="line">]</span><br><span class="line">},</span><br><span class="line"><span class="attr">"tbfed-pagefooter"</span>: {</span><br><span class="line"><span class="attr">"copyright"</span>: <span class="string">"Copyright &copy <a href='https://zhousiwei.gitee.io' target='_blank'>試毅-思伟</a> 2019"</span>,</span><br><span class="line"><span class="attr">"modify_label"</span>: <span class="string">"修订时间:"</span>,</span><br><span class="line"><span class="attr">"modify_format"</span>: <span class="string">"YYYY-MM-DD HH:mm:ss"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"ga"</span>: {</span><br><span class="line"><span class="attr">"token"</span>: <span class="string">"UA-142790104-1"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"baidu"</span>: {</span><br><span class="line"><span class="attr">"token"</span>: <span class="string">"f1f256f18b7899e11647d6ec1f3ded2f"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"donate"</span>: {</span><br><span class="line"><span class="attr">"wechat"</span>: <span class="string">"/assets/weixin.png"</span>,</span><br><span class="line"><span class="attr">"alipay"</span>: <span class="string">"/assets/alipay.jpeg"</span>,</span><br><span class="line"><span class="attr">"title"</span>: <span class="string">""</span>,</span><br><span class="line"><span class="attr">"button"</span>: <span class="string">"赏"</span>,</span><br><span class="line"><span class="attr">"alipayText"</span>: <span class="string">"支付宝打赏"</span>,</span><br><span class="line"><span class="attr">"wechatText"</span>: <span class="string">"微信打赏"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"anchor-navigation-ex"</span>: {</span><br><span class="line"><span class="attr">"showLevel"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"associatedWithSummary"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"printLog"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"multipleH1"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"mode"</span>: <span class="string">"float"</span>,</span><br><span class="line"><span class="attr">"showGoTop"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"float"</span>: {</span><br><span class="line"><span class="attr">"floatIcon"</span>: <span class="string">"fa fa-navicon"</span>,</span><br><span class="line"><span class="attr">"showLevelIcon"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"level1Icon"</span>: <span class="string">"fa fa-hand-o-right"</span>,</span><br><span class="line"><span class="attr">"level2Icon"</span>: <span class="string">"fa fa-hand-o-right"</span>,</span><br><span class="line"><span class="attr">"level3Icon"</span>: <span class="string">"fa fa-hand-o-right"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"pageTop"</span>: {</span><br><span class="line"><span class="attr">"showLevelIcon"</span>: <span class="literal">false</span>,</span><br><span class="line"><span class="attr">"level1Icon"</span>: <span class="string">"fa fa-hand-o-right"</span>,</span><br><span class="line"><span class="attr">"level2Icon"</span>: <span class="string">"fa fa-hand-o-right"</span>,</span><br><span class="line"><span class="attr">"level3Icon"</span>: <span class="string">"fa fa-hand-o-right"</span></span><br><span class="line">}</span><br><span class="line">},</span><br><span class="line"><span class="attr">"sitemap-general"</span>: {</span><br><span class="line"><span class="attr">"prefix"</span>: <span class="string">"https://zhousiwei.gitee.io/myBook/"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"favicon"</span>: {</span><br><span class="line"><span class="attr">"shortcut"</span>: <span class="string">"/assets/images/favicon.ico"</span>,</span><br><span class="line"><span class="attr">"bookmark"</span>: <span class="string">"/assets/images/favicon.ico"</span>,</span><br><span class="line"><span class="attr">"appleTouch"</span>: <span class="string">"/assets/images/apple-touch-icon.png"</span>,</span><br><span class="line"><span class="attr">"appleTouchMore"</span>: {</span><br><span class="line"><span class="attr">"120x120"</span>: <span class="string">"/assets/images/apple-touch-icon-120x120.png"</span>,</span><br><span class="line"><span class="attr">"180x180"</span>: <span class="string">"/assets/images/apple-touch-icon-180x180.png"</span></span><br><span class="line">}</span><br><span class="line">},</span><br><span class="line"><span class="attr">"mygitalk"</span>: {</span><br><span class="line"><span class="attr">"clientID"</span>: <span class="string">"608e351b48e4d0a3a528"</span>,</span><br><span class="line"><span class="attr">"clientSecret"</span>: <span class="string">"***加密***"</span>,</span><br><span class="line"><span class="attr">"repo"</span>: <span class="string">"myBook"</span>,</span><br><span class="line"><span class="attr">"owner"</span>: <span class="string">"JoeyBling"</span>,</span><br><span class="line"><span class="attr">"admin"</span>: [<span class="string">"JoeyBling"</span>],</span><br><span class="line"><span class="attr">"distractionFreeMode"</span>: <span class="literal">false</span></span><br><span class="line">}</span><br><span class="line">},</span><br><span class="line"><span class="attr">"pdf"</span>: {</span><br><span class="line"><span class="attr">"pageNumbers"</span>: <span class="literal">true</span>,</span><br><span class="line"><span class="attr">"fontFamily"</span>: <span class="string">"Arial"</span>,</span><br><span class="line"><span class="attr">"fontSize"</span>: <span class="number">12</span>,</span><br><span class="line"><span class="attr">"paperSize"</span>: <span class="string">"a4"</span>,</span><br><span class="line"><span class="attr">"margin"</span>: {</span><br><span class="line"><span class="attr">"right"</span>: <span class="number">62</span>,</span><br><span class="line"><span class="attr">"left"</span>: <span class="number">62</span>,</span><br><span class="line"><span class="attr">"top"</span>: <span class="number">56</span>,</span><br><span class="line"><span class="attr">"bottom"</span>: <span class="number">56</span></span><br><span class="line">}</span><br><span class="line">},</span><br><span class="line"><span class="attr">"title"</span>: <span class="string">"試毅-思伟_开源项目"</span>,</span><br><span class="line"><span class="attr">"description"</span>: <span class="string">"試毅-思伟_开源项目"</span>,</span><br><span class="line"><span class="attr">"author"</span>: <span class="string">"試毅-思伟"</span>,</span><br><span class="line"><span class="attr">"language"</span>: <span class="string">"zh-hans"</span>,</span><br><span class="line"><span class="attr">"root"</span>: <span class="string">"."</span>,</span><br><span class="line"><span class="attr">"structure"</span>: {</span><br><span class="line"><span class="attr">"readme"</span>: <span class="string">"introduction.md"</span></span><br><span class="line">},</span><br><span class="line"><span class="attr">"links"</span>: {</span><br><span class="line"><span class="attr">"sidebar"</span>: {</span><br><span class="line"><span class="attr">"GitHub"</span>: <span class="string">"https://github.com/JoeyBling"</span>,</span><br><span class="line"><span class="attr">"个人博客"</span>: <span class="string">"https://zhousiwei.gitee.io"</span></span><br><span class="line">}</span><br><span class="line">}</span><br><span class="line">}</span><br></pre></td></tr></table></figure><p><strong>Tips:添加插件后要进行安装 <code>gitbook install</code></strong></p>]]></content>
<summary type="html">
GitBook相关配置及优化
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Linux下安装calibre-ebook</title>
<link href="https://joeybling.github.io/2019/06/24/Linux%E4%B8%8B%E5%AE%89%E8%A3%85calibre-ebook/"/>
<id>https://joeybling.github.io/2019/06/24/Linux下安装calibre-ebook/</id>
<published>2019-06-24T08:57:00.000Z</published>
<updated>2019-07-26T07:02:08.166Z</updated>
<content type="html"><![CDATA[<blockquote><p>官网地址:<a href="https://calibre-ebook.com/download" target="_blank" rel="noopener">https://calibre-ebook.com/download</a></p></blockquote><ul><li><strong>需要有python环境 ➡️ <a href="https://www.jianshu.com/p/f42cdca948de" target="_blank" rel="noopener">Linux安装python2.7.9</a></strong></li><li><strong>需要支持GLIBC_2.17和libstdc++.so ➡️ <a href="https://www.jianshu.com/p/f23129adb8c4" target="_blank" rel="noopener">Linux下安装GLIBC_2.18和libstdc++.so</a></strong></li></ul><blockquote><p>官网的说法:- <strong>You need GLIBC 2.17 or higher and libstdc++.so.6.0.17 (from gcc 4.7.0) or higher to run calibre</strong><br><a id="more"></a></p></blockquote><h3 id="1、Linux下安装-其他系统请自行前往官网安装"><a href="#1、Linux下安装-其他系统请自行前往官网安装" class="headerlink" title="1、Linux下安装(其他系统请自行前往官网安装)"></a>1、Linux下安装<code>(其他系统请自行前往官网安装)</code></h3><figure class="highlight shell"><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 class="meta">#</span><span class="bash"> yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make xdg-utils wget qt4 qt4-devel qt4-x11 libpcap-devel xz-devel -y</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /usr/bin</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ln -s qmake-qt4 qmake</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> qmake -v</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /opt</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin</span></span><br></pre></td></tr></table></figure><h3 id="2、如果安装失败需要执行卸载操作"><a href="#2、如果安装失败需要执行卸载操作" class="headerlink" title="2、如果安装失败需要执行卸载操作"></a>2、如果安装失败需要执行卸载操作</h3><figure class="highlight shell"><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">//卸载calibre</span><br><span class="line"><span class="meta">#</span><span class="bash"> sudo rm -rf /opt/calibre/*</span></span><br><span class="line">//清除失效的软连接</span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> /usr/bin/</span></span><br><span class="line">rm -rf ./calibre*</span><br><span class="line">rm -rf ./ebook*</span><br><span class="line">rm -rf fetch-ebook-metadata</span><br><span class="line">rm -rf lrf2lrs</span><br><span class="line">rm -rf lrfviewer</span><br><span class="line">rm -rf lrs2lrf</span><br><span class="line">rm -rf markdown-calibre</span><br><span class="line">rm -rf web2disk</span><br></pre></td></tr></table></figure><h3 id="3、安装sip-如果使用过程中有报错再安装"><a href="#3、安装sip-如果使用过程中有报错再安装" class="headerlink" title="3、安装sip(如果使用过程中有报错再安装)"></a>3、安装sip(<code>如果使用过程中有报错再安装</code>)</h3><figure class="highlight shell"><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></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> wget https://excellmedia.dl.sourceforge.net/project/pyqt/sip/sip-4.16.8/sip-4.16.8.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tar -xzvf sip-4.16.8.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> sip-4.16.8</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> python configure.py</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> sudo make install</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> ln -s /usr/<span class="built_in">local</span>/Python2.7.9/bin/sip /usr/bin/sip</span></span><br><span class="line">--- 终端查看sip版本</span><br><span class="line"><span class="meta">#</span><span class="bash"> sip -V</span></span><br></pre></td></tr></table></figure><h3 id="4、PyQt5编译安装-如果使用过程中有报错再安装"><a href="#4、PyQt5编译安装-如果使用过程中有报错再安装" class="headerlink" title="4、PyQt5编译安装(如果使用过程中有报错再安装)"></a>4、PyQt5编译安装(<code>如果使用过程中有报错再安装</code>)</h3><figure class="highlight shell"><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="meta">#</span><span class="bash"> wget https://excellmedia.dl.sourceforge.net/project/pyqt/PyQt5/PyQt-5.2.1/PyQt-gpl-5.2.1.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> tar -xzvf PyQt-gpl-5.2.1.tar.gz</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> <span class="built_in">cd</span> PyQt-gpl-5.2.1</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> python configure.py --sip-incdir=/usr/<span class="built_in">local</span>/Python2.9</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> make -j4</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> sudo make install</span></span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Linux下安装calibre-ebook
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
<category term="Linux" scheme="https://joeybling.github.io/tags/Linux/"/>
</entry>
<entry>
<title>GitBook的安装、卸载、常见问题</title>
<link href="https://joeybling.github.io/2019/06/20/GitBook%E7%9A%84%E5%AE%89%E8%A3%85%E3%80%81%E5%8D%B8%E8%BD%BD%E3%80%81%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98/"/>
<id>https://joeybling.github.io/2019/06/20/GitBook的安装、卸载、常见问题/</id>
<published>2019-06-20T06:27:00.000Z</published>
<updated>2019-07-26T07:02:09.156Z</updated>
<content type="html"><![CDATA[<h5 id="Tips-博主使用的版本"><a href="#Tips-博主使用的版本" class="headerlink" title="Tips:博主使用的版本"></a>Tips:博主使用的版本</h5><ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li><li><a href="https://zhousiwei.gitee.io/myBook" target="_blank" rel="noopener">博主Gitbook</a></li><li><strong><code>Node v8.11.2</code> <code>npm v6.9.0</code> <code>gitbook v3.2.3</code> <code>服务器 CentOS6.5</code></strong><blockquote><p>官方GitHub:<a href="https://github.com/GitbookIO/gitbook-cli" target="_blank" rel="noopener">https://github.com/GitbookIO/gitbook-cli</a></p></blockquote></li></ul><blockquote><p><a href="https://www.jianshu.com/p/53fccf623f1c" target="_blank" rel="noopener">GitBook相关配置及优化</a></p></blockquote><hr><a id="more"></a><h2 id="一、卸载GitBook-没有安装的跳过此步骤"><a href="#一、卸载GitBook-没有安装的跳过此步骤" class="headerlink" title="一、卸载GitBook(没有安装的跳过此步骤)"></a>一、卸载GitBook<code>(没有安装的跳过此步骤)</code></h2><h6 id="Tips-前导摘要:记得有一次不小心卸载了一个东西,后面执行gitbook-init报错:Cannot-find-module-39-internal-util-types"><a href="#Tips-前导摘要:记得有一次不小心卸载了一个东西,后面执行gitbook-init报错:Cannot-find-module-39-internal-util-types" class="headerlink" title="Tips:前导摘要:记得有一次不小心卸载了一个东西,后面执行gitbook init报错:Cannot find module 'internal/util/types"></a>Tips:前导摘要:记得有一次不小心卸载了一个东西,后面执行gitbook init报错:<code>Cannot find module 'internal/util/types</code></h6><blockquote><p>找到<code>C:\Users\{User}\.gitbook</code> 找到并删除此文件夹</p></blockquote><p>删除后执行命令<br><figure class="highlight shell"><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="meta">#</span> npm uninstall -g gitbook</span><br><span class="line"><span class="meta">#</span> npm uninstall -g gitbook-cli</span><br><span class="line">--- 清除npm缓存</span><br><span class="line"><span class="meta">#</span> npm cache clean --force</span><br></pre></td></tr></table></figure></p><hr><h2 id="二、安装GitBook"><a href="#二、安装GitBook" class="headerlink" title="二、安装GitBook"></a>二、安装GitBook</h2><blockquote><p>需要node环境 ➡️ <a href="https://www.jianshu.com/p/f8b0a4f7a822" target="_blank" rel="noopener">Linux或Win下安装node和npm</a><br>需要Git环境 ➡️ <a href="https://www.jianshu.com/p/f2da5e76a588" target="_blank" rel="noopener">https://www.jianshu.com/p/f2da5e76a588</a></p></blockquote><figure class="highlight shell"><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="meta">#</span> npm install gitbook -g</span><br><span class="line"><span class="meta">#</span> npm install -g gitbook-cli</span><br><span class="line">--- 如果没有安装gitbook,此命令会默认同时安装 GitBook</span><br><span class="line"><span class="meta">#</span> gitbook -V</span><br><span class="line">--- 列出本地所有的gitbook版本</span><br><span class="line"><span class="meta">#</span> gitbook ls</span><br></pre></td></tr></table></figure><h5 id="Tips-GitBook常用命令"><a href="#Tips-GitBook常用命令" class="headerlink" title="Tips:GitBook常用命令"></a>Tips:GitBook常用命令</h5><ul><li><code>gitbook -V</code> 查看版本号</li><li><code>gitbook ls</code> 列出本地所有的gitbook版本</li><li><code>gitbook init</code> 初始化</li><li><code>gitbook install</code> 安装插件</li><li><code>gitbook serve</code> 预览</li><li><code>gitbook build</code> 生成</li><li><code>gitbook build --gitbook=2.6.7</code> 生成时指定gitbook的版本, 本地没有会先下载</li><li><code>gitbook uninstall 2.6.7</code> 卸载指定版本号的gitbook</li><li><code>gitbook fetch [version]</code> 获取[版本]下载并安装<版本></li><li><code>gitbook --help</code> 显示gitbook-cli帮助文档</li><li><code>gitbook help</code> 列出 gitbook 所有的命令</li><li><code>gitbook ls-remote</code> 列出NPM上的可用版本:</li></ul><hr><h2 id="三、GitBook插件"><a href="#三、GitBook插件" class="headerlink" title="三、GitBook插件"></a>三、<a href="https://www.jianshu.com/p/53fccf623f1c" target="_blank" rel="noopener">GitBook插件</a></h2><hr><h2 id="五、作者寄语"><a href="#五、作者寄语" class="headerlink" title="五、作者寄语"></a>五、作者寄语</h2><blockquote><p>Everything is ok. But you have to do by yourself.</p></blockquote>]]></content>
<summary type="html">
GitBook的安装、卸载、常见问题
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Git彻底删除历史提交记录的方法</title>
<link href="https://joeybling.github.io/2019/06/05/Git%E5%BD%BB%E5%BA%95%E5%88%A0%E9%99%A4%E5%8E%86%E5%8F%B2%E6%8F%90%E4%BA%A4%E8%AE%B0%E5%BD%95%E7%9A%84%E6%96%B9%E6%B3%95/"/>
<id>https://joeybling.github.io/2019/06/05/Git彻底删除历史提交记录的方法/</id>
<published>2019-06-05T02:22:00.000Z</published>
<updated>2019-07-26T07:02:09.489Z</updated>
<content type="html"><![CDATA[<h6 id="1、查看Git提交记录"><a href="#1、查看Git提交记录" class="headerlink" title="1、查看Git提交记录"></a>1、查看Git提交记录</h6><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> git log</span><br></pre></td></tr></table></figure><hr><h6 id="2、找到需要回滚到的提交点,复制它的hash值"><a href="#2、找到需要回滚到的提交点,复制它的hash值" class="headerlink" title="2、找到需要回滚到的提交点,复制它的hash值"></a>2、找到需要回滚到的提交点,复制它的hash值</h6><p><img src="/images/2743275-f79de5b6d7280d81.png" alt=""><br><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> git reset --hard 你复制的hash值</span><br></pre></td></tr></table></figure></p><a id="more"></a><hr><h6 id="3、将当前指向的head推到git"><a href="#3、将当前指向的head推到git" class="headerlink" title="3、将当前指向的head推到git"></a>3、将当前指向的head推到git</h6><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> git push --force</span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Git彻底删除历史提交记录的方法
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>BitComet服务器列表</title>
<link href="https://joeybling.github.io/2019/05/13/BitComet%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%88%97%E8%A1%A8/"/>
<id>https://joeybling.github.io/2019/05/13/BitComet服务器列表/</id>
<published>2019-05-13T06:56:00.000Z</published>
<updated>2019-07-26T07:02:07.849Z</updated>
<content type="html"><![CDATA[<blockquote><p>udp://mgtracker.org:2710/announce<br><a href="http://share.camoe.cn:8080/announce" target="_blank" rel="noopener">http://share.camoe.cn:8080/announce</a><br>udp://11.rarbg.me:80/announce<br><a href="http://tracker.tfile.me/announce" target="_blank" rel="noopener">http://tracker.tfile.me/announce</a><br><a href="http://open.acgtracker.com:1096/announce" target="_blank" rel="noopener">http://open.acgtracker.com:1096/announce</a><br><a href="http://mgtracker.org:2710/announce" target="_blank" rel="noopener">http://mgtracker.org:2710/announce</a><br>udp://tracker.ex.ua:80/announce<br><a href="http://tracker.longwangbt.com:2710/announce" target="_blank" rel="noopener">http://tracker.longwangbt.com:2710/announce</a><br>udp://tracker.openbittorrent.com:80/announce<br><a href="http://tracker.publicbt.com/announce" target="_blank" rel="noopener">http://tracker.publicbt.com/announce</a><br><a href="http://tracker.prq.to/announce" target="_blank" rel="noopener">http://tracker.prq.to/announce</a></p></blockquote><a id="more"></a><blockquote><p>udp://9.rarbg.me:2710/announce<br><a href="http://tracker1.wasabii.com.tw:6969/anno" target="_blank" rel="noopener">http://tracker1.wasabii.com.tw:6969/anno</a><br><a href="http://tracker2.wasabii.com.tw:6969/announce" target="_blank" rel="noopener">http://tracker2.wasabii.com.tw:6969/announce</a><br>udp://explodie.org:6969/announce<br>udp://shadowshq.eddie4.nl:6969/announce<br>udp://shadowshq.yi.org:6969/announce<br>udp://eddie4.nl:6969/announce<br>udp://tracker.publicbt.com:80/announce<br>udp://tracker.istole.it:80/announce<br><a href="http://trackers.ibzu.me/announce.php" target="_blank" rel="noopener">http://trackers.ibzu.me/announce.php</a><br><a href="http://tracker1.torrentino.com/announce" target="_blank" rel="noopener">http://tracker1.torrentino.com/announce</a><br><a href="http://tracker2.torrentino.com/announce" target="_blank" rel="noopener">http://tracker2.torrentino.com/announce</a><br><a href="http://tracker3.torrentino.com/announce" target="_blank" rel="noopener">http://tracker3.torrentino.com/announce</a><br><a href="http://bt.careland.com.cn:6969/announce" target="_blank" rel="noopener">http://bt.careland.com.cn:6969/announce</a><br><a href="http://bt2.careland.com.cn:6969/announce" target="_blank" rel="noopener">http://bt2.careland.com.cn:6969/announce</a><br><a href="http://bt3.careland.com.cn:6969/announce" target="_blank" rel="noopener">http://bt3.careland.com.cn:6969/announce</a><br><a href="http://94.228.192.98/announce" target="_blank" rel="noopener">http://94.228.192.98/announce</a><br><a href="http://121.14.98.151:9090/announce" target="_blank" rel="noopener">http://121.14.98.151:9090/announce</a><br><a href="http://henbt.com:2710/announce" target="_blank" rel="noopener">http://henbt.com:2710/announce</a><br><a href="http://server1.9sheng.cn:6969/announce" target="_blank" rel="noopener">http://server1.9sheng.cn:6969/announce</a><br><a href="http://anisaishuu.de:2710/announce" target="_blank" rel="noopener">http://anisaishuu.de:2710/announce</a><br>udp://tracker.leechers-paradise.org:6969/announce<br><a href="http://tracker.shuntv.net/announce.php" target="_blank" rel="noopener">http://tracker.shuntv.net/announce.php</a><br><a href="http://tracker.tvunderground.org.ru:3218/announce" target="_blank" rel="noopener">http://tracker.tvunderground.org.ru:3218/announce</a><br>udp://10.rarbg.me:80/announce<br>udp://9.rarbg.com:2710/announce<br>udp://tracker.yify-torrents.com/announce<br>udp://tracker.coppersurfer.tk:6969/announce<br><a href="http://siambit.org/announce.php" target="_blank" rel="noopener">http://siambit.org/announce.php</a><br>udp://open.demonii.com:1337/announce<br>udp://tracker.torrenty.org:6969/announce<br><a href="http://tracker.torrenty.org:6969/announce" target="_blank" rel="noopener">http://tracker.torrenty.org:6969/announce</a><br>udp://tracker.publichd.eu:80/announce<br><a href="http://tracker.pimp4003.net/announce" target="_blank" rel="noopener">http://tracker.pimp4003.net/announce</a><br><a href="http://tracker.xfsub.com:6868/announce" target="_blank" rel="noopener">http://tracker.xfsub.com:6868/announce</a><br><a href="http://mgtracker.org:6969/announce" target="_blank" rel="noopener">http://mgtracker.org:6969/announce</a><br><a href="http://tr.cili001.com:6666/announce" target="_blank" rel="noopener">http://tr.cili001.com:6666/announce</a><br>udp://tr.cili001.com:6666/announce<br><a href="http://tracker.openbittorrent.com/announce" target="_blank" rel="noopener">http://tracker.openbittorrent.com/announce</a><br>udp://tracker.opentrackr.org:1337/announce<br>udp://open.demonii.com:1337<br>udp://9.rarbg.com:2720/announce<br><a href="http://tracker1.wasabii.com.tw:6969/announce" target="_blank" rel="noopener">http://tracker1.wasabii.com.tw:6969/announce</a></p></blockquote>]]></content>
<summary type="html">
BitComet服务器列表
</summary>
<category term="日记本" scheme="https://joeybling.github.io/tags/%E6%97%A5%E8%AE%B0%E6%9C%AC/"/>
</entry>
<entry>
<title>Hexo博客yilia主题添加背景音乐 (网易云音乐)</title>
<link href="https://joeybling.github.io/2019/05/09/Hexo%E5%8D%9A%E5%AE%A2yilia%E4%B8%BB%E9%A2%98%E6%B7%BB%E5%8A%A0%E8%83%8C%E6%99%AF%E9%9F%B3%E4%B9%90(%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90)/"/>
<id>https://joeybling.github.io/2019/05/09/Hexo博客yilia主题添加背景音乐(网易云音乐)/</id>
<published>2019-05-09T06:29:00.000Z</published>
<updated>2019-07-26T07:02:09.744Z</updated>
<content type="html"><![CDATA[<ul><li><a href="https://zhousiwei.gitee.io/" target="_blank" rel="noopener">博主博客地址</a></li></ul><h5 id="1、打开网易云音乐首页,复制选择的背景音乐分享外链"><a href="#1、打开网易云音乐首页,复制选择的背景音乐分享外链" class="headerlink" title="1、打开网易云音乐首页,复制选择的背景音乐分享外链"></a>1、打开网易云音乐首页,复制选择的背景音乐分享外链</h5><blockquote><p><a href="http://music.163.com/" target="_blank" rel="noopener">网易云音乐</a></p></blockquote><hr><h5 id="2、引入播放器代码"><a href="#2、引入播放器代码" class="headerlink" title="2、引入播放器代码"></a>2、引入播放器代码</h5><p>    在<code>themes/yilia/layout/_partial/left-col.ejs</code>文件<code>nav</code>标签中添加代码<br><a id="more"></a></p><blockquote><p>注:放在<code><nav></code>和<code></nav></code>之内</p></blockquote><p>    <strong>笔者添加了一些判断和表达式</strong><br><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></pre></td><td class="code"><pre><span class="line"><!-- 网易云音乐插件 --></span><br><span class="line"><% if (theme.music && theme.music.enable){ %></span><br><span class="line"><div style="position:absolute; bottom:120px left:auto; width:85%"></span><br><span class="line"><iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width="240" height="52" src="//music.163.com/outchain/player?type=2&id=<%=theme.music.id||1334445174%>&auto=<%=theme.music.autoplay?1:0%>&height=32"></iframe></span><br><span class="line"></div></span><br><span class="line"><% } %></span><br></pre></td></tr></table></figure></p><p><img src="/images/2743275-2ab65289007dd3ba.png" alt=""></p><hr><h5 id="3、在yilia主题配置文件中添加属性"><a href="#3、在yilia主题配置文件中添加属性" class="headerlink" title="3、在yilia主题配置文件中添加属性"></a>3、在yilia主题配置文件中添加属性</h5><figure class="highlight yml"><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="comment"># 网易云音乐插件</span></span><br><span class="line"><span class="attr">music:</span></span><br><span class="line"><span class="attr"> enable:</span> <span class="literal">true</span></span><br><span class="line"> <span class="comment">#id: 1332647902 # 网易云分享的ID</span></span><br><span class="line"><span class="attr"> autoplay:</span> <span class="literal">true</span> <span class="comment"># 是否开启自动播放</span></span><br></pre></td></tr></table></figure>]]></content>
<summary type="html">
Hexo博客yilia主题添加背景音乐 (网易云音乐)
</summary>
<category term="Linux" scheme="https://joeybling.github.io/tags/Linux/"/>
<category term="Hexo" scheme="https://joeybling.github.io/tags/Hexo/"/>
</entry>
<entry>
<title>玩转MySQL优化命令</title>
<link href="https://joeybling.github.io/2019/05/06/%E7%8E%A9%E8%BD%ACMySQL%E4%BC%98%E5%8C%96%E5%91%BD%E4%BB%A4/"/>
<id>https://joeybling.github.io/2019/05/06/玩转MySQL优化命令/</id>
<published>2019-05-06T10:05:00.000Z</published>
<updated>2019-07-26T07:02:08.697Z</updated>
<content type="html"><![CDATA[<h5 id="1、MySQL更改为只能本地登录"><a href="#1、MySQL更改为只能本地登录" class="headerlink" title="1、MySQL更改为只能本地登录"></a>1、MySQL更改为只能本地登录</h5><figure class="highlight shell"><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="meta">#</span><span class="bash"> use mysql;</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> select user,host,Password from user <span class="built_in">where</span> user=<span class="string">'root'</span>;</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> delete from user <span class="built_in">where</span> user=<span class="string">'root'</span> and host=<span class="string">'%'</span>;</span></span><br></pre></td></tr></table></figure><a id="more"></a><hr><h5 id="2、MySQL授予外网登陆权限"><a href="#2、MySQL授予外网登陆权限" class="headerlink" title="2、MySQL授予外网登陆权限"></a>2、MySQL授予外网登陆权限</h5><p><code>grant all privileges on *.* to 授予外网登陆的用户名@'%' identified by '密码' WITH GRANT OPTION;</code><br><figure class="highlight shell"><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="meta">#</span><span class="bash"> grant all privileges on *.* to root@<span class="string">'%'</span> identified by <span class="string">'root'</span> WITH GRANT OPTION;</span></span><br><span class="line"><span class="meta">#</span><span class="bash"> flush privileges;</span></span><br></pre></td></tr></table></figure></p><hr><h5 id="3、更改MySQL的存储目录"><a href="#3、更改MySQL的存储目录" class="headerlink" title="3、更改MySQL的存储目录"></a>3、<a href="https://www.jianshu.com/p/81b253355ffd" target="_blank" rel="noopener">更改MySQL的存储目录</a></h5>]]></content>
<summary type="html">
玩转MySQL优化命令
</summary>
<category term="MySQL" scheme="https://joeybling.github.io/tags/MySQL/"/>
</entry>
<entry>
<title>IDEA+JRebel全自动热部署</title>
<link href="https://joeybling.github.io/2019/05/05/IDEA+JRebel%E5%85%A8%E8%87%AA%E5%8A%A8%E7%83%AD%E9%83%A8%E7%BD%B2/"/>
<id>https://joeybling.github.io/2019/05/05/IDEA+JRebel全自动热部署/</id>
<published>2019-05-05T10:48:00.000Z</published>
<updated>2019-07-26T07:02:08.896Z</updated>
<content type="html"><![CDATA[<ul><li>链接:<a href="https://pan.baidu.com/s/1ZE5cv1vhFQhdaj91dFD-GA" target="_blank" rel="noopener">https://pan.baidu.com/s/1ZE5cv1vhFQhdaj91dFD-GA</a> 密码:b2k8<br>下载后解压</li></ul><p><img src="/images/2743275-5eeeee6b3feaff69.png" alt=""></p><a id="more"></a><hr><h5 id="1、打开IDEA离线安装插件,选择刚刚下载的ZIP就行了"><a href="#1、打开IDEA离线安装插件,选择刚刚下载的ZIP就行了" class="headerlink" title="1、打开IDEA离线安装插件,选择刚刚下载的ZIP就行了"></a>1、打开IDEA离线安装插件,选择刚刚下载的ZIP就行了</h5><p><img src="/images/2743275-c7cdb60d9a56ee2f.png" alt=""></p><hr><h5 id="2、激活JRebel"><a href="#2、激活JRebel" class="headerlink" title="2、激活JRebel"></a>2、激活JRebel</h5><p>装完以后打开 IDEA ➡️ Help ➡️ JRebel ➡️ Activation<br><img src="/images/2743275-0a44e8b787e2c562.png" alt=""></p><p><strong>运行激活程序</strong></p><p><img src="/images/2743275-f0bd9dcec80e343b.png" alt=""><br><img src="/images/2743275-73ef269d494b1b8b.png" alt=""></p><p>地址填写 <code>http://127.0.0.1:8888/Zephyr</code> 邮箱随便填</p><p><img src="/images/2743275-d49e3b733d596be2.png" alt=""></p><hr><h5 id="3、使用及自动部署"><a href="#3、使用及自动部署" class="headerlink" title="3、使用及自动部署"></a>3、使用及自动部署</h5><p>依次打开 View ➡️ Tool Windows ➡️ JRebel</p><p><img src="/images/2743275-dd461e0e86e12543.png" alt=""></p><p>这时候已经实现热部署了,不过需要每次修改源码后手动执行UPDATE操作,我们可以结合Idea自身的Debug Hot swap功能,在<code>运行和调试配置</code>中,配置自动执行UPDATE操作</p><p><img src="/images/2743275-42171ad8fe868096.png" alt=""></p><hr><h5 id="4、勾选自动编译功能"><a href="#4、勾选自动编译功能" class="headerlink" title="4、勾选自动编译功能"></a>4、勾选自动编译功能</h5><p><img src="/images/2743275-60b58a6f0de5110d.png" alt=""></p>]]></content>
<summary type="html">
IDEA+JRebel全自动热部署
</summary>
<category term="Java" scheme="https://joeybling.github.io/tags/Java/"/>
</entry>
</feed>