88
99** [ 预览] ( http://tridiamond.me ) ** |** [ 更变日志] ( https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG_CN.md ) **
1010
11- 🇺🇸** [ English Doc] ( https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/README.md ) ** |
11+ 🇺🇸** [ English Doc] ( https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/README.md ) ** |
1212** [ ChangeLog] ( https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md ) **
1313
1414![ screenshot] ( https://res.cloudinary.com/tridiamond/image/upload/v1573323147/blog/A-Obsidian-full_ubmo0d.png )
@@ -74,7 +74,7 @@ theme: obsidian
7474# 菜单设置 | 格式 = 菜单名: 菜单url
7575menu :
7676PAGE :/page
77-
77+
7878# 分类页和标签页自定义标题配置
7979page_titles :
8080categories :" Categories"
@@ -120,7 +120,7 @@ rss: atom.xml
120120autoplay :false
121121
122122# 默认mp3文件
123- mp3 :
123+ mp3 :
124124 -statics/chengdu.mp3
125125
126126# ---------------------------------------------------------------
@@ -178,26 +178,26 @@ html_truncate:
178178keepWhitespaces :true
179179# 截取到最后的时候保留完成的字(只对英文有用)
180180reserveLastWord :true
181-
181+
182182# Busuanzi 浏览量统计插件
183183# see http://ibruce.info/2015/04/04/busuanzi/
184184busuanzi :
185185enable :true
186-
186+
187187# Sharejs 分享
188188# see https://github.com/overtrue/share.js/
189189sharejs :
190190enable :true
191191disabled :' facebook,douban,linkedin,diandian,tencent,google'
192-
192+
193193# 使用了codemirror替换了highlight.js,代码高亮更加完善,也更接近IDE的高亮样式
194194# 默认已经填入了一些语言的mode支持,如果你需要其他语言的支持,请查看codemirror官网的mode
195195# modes文档请看: https://codemirror.net/mode/
196196# codemirror官网: https://codemirror.net/
197197# 默认支持了:JS, HTML, CSS, PHP, JAVA, C, C#, C++, SHELL, PYTHON.
198198codemirror :
199199modes :['javascript', 'css', 'xml', 'htmlmixed', 'clike', 'php', 'shell', 'python']
200-
200+
201201```
202202</details >
203203
@@ -209,11 +209,11 @@ codemirror:
209209- 如果你是使用` Gitalk ` , 你可以打开` busuanzi ` 文章详情页就会显示文章浏览量统计.
210210
211211###代码块样式
212-
212+
213213> 版本` v1.3.5 ` 开始代码高亮已经用` codemirror ` 替换了` highlight.js ` ,
214214 但是Hexo默认的highlight配置还是需要关闭的。
215215 !!所以无比把Hexo默认的highlight配置改为` enable: flase ` !!
216-
216+
217217在博客根目录的` _config.yml ` 修改
218218
219219> ⚠️ 注意不是主题里面的` _config.yml ` ,在主题里面加这个是无效的哦
@@ -259,7 +259,7 @@ date: 2019-07-14 18:38:45
259259categories:
260260 - Category1
261261 - Category2
262- tags:
262+ tags:
263263 - Tag1
264264 - Tag2
265265mp3: http://domain.com/awesome.mp3
@@ -279,7 +279,7 @@ date: 2019-07-14 18:38:45
279279categories:
280280 - 分类1
281281 - 分类2
282- tags:
282+ tags:
283283 - 标签1
284284 - 标签2
285285mp3: http://domain.com/awesome.mp3
@@ -332,6 +332,31 @@ cd themes/osidian
332332git pull
333333```
334334
335+ ##使用搜索功能
336+
337+ ###安装说明:
338+
339+ NPM安装
340+
341+ ``` bash
342+ $ npm install hexo-generator-search --save
343+ ```
344+
345+ 在你的根目录配置` _config.yml ` 里面添加hexo-generator-search的配置
346+
347+ ``` yaml
348+ search :
349+ path :search.xml
350+ field :post
351+ content :true
352+ ` ` `
353+
354+ 重新生成静态文件
355+
356+ ` ` ` bash
357+ hexo clean && hexo g
358+ ```
359+
335360##相关
336361
337- 做了一个[ ` Typro ` ] ( https://typora.io/ ) 主题[ ` Obsidian ` ] ( https://github.com/TriDiamond/typro-theme-obsidian ) 专门给写博客的你们.
362+ 做了一个[ ` Typro ` ] ( https://typora.io/ ) 主题[ ` Obsidian ` ] ( https://github.com/TriDiamond/typro-theme-obsidian ) 专门给写博客的你们.