Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc1d825

Browse files
committed
🚀 Shipped version 1.4.3
1 parent9b18541 commitfc1d825

File tree

11 files changed

+1433
-1260
lines changed

11 files changed

+1433
-1260
lines changed

‎CHANGELOG.md‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11
#Changelog
22
[中文更变日志](https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG_CN.md)
33

4+
##🚀 v1.4.3 (Nov 13, 2019)
5+
6+
Added`MathJax` support! Also fixed a few issues here and there, smoothen the animation on article pages.
7+
8+
###Features
9+
10+
- Added`MathJax` support.
11+
12+
###Changes
13+
14+
- TOC now only loads up to level 3, this changes fixed the bug when TOC goes over 3 levels the content will overflowing out of the container. ([#20](https://github.com/TriDiamond/hexo-theme-obsidian/issues/20))
15+
- Smoothen the animations for article pages.
16+
417
##🚀 v1.4.2 (Nov 11, 2019)
518

619
🎉 Obsidian theme now comes with search feature! Horray!
720
Hope you guys love this update!
821

9-
###Features
22+
###Features
23+
1024
- Added the mostly requested feature, local site search!
1125

1226
>The search feature is base on the index generated by[`hexo-generator-search`](https://github.com/wzpan/hexo-generator-search),

‎CHANGELOG_CN.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
#Changelog
22

3+
##🚀 v1.4.3 (Nov 13, 2019)
4+
5+
添加了`MathJax` 支持! 文章的特效更加顺滑了.
6+
7+
###✨新功能
8+
9+
- 添加了`MathJax` 支持.
10+
11+
###更变
12+
13+
- 目录现在只展示到三级,可以解决超过三级后的文字会超出内容框外。 ([#20](https://github.com/TriDiamond/hexo-theme-obsidian/issues/20))
14+
- 文章的特效更加顺滑了。
15+
316
##🚀 v1.4.2 (2019-11-11)
417

518
🎉 Obsidian 主题加添了等待已久的搜索功能!希望大家喜欢!

‎README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ sharejs:
202202
codemirror:
203203
modes:['javascript', 'css', 'xml', 'htmlmixed', 'clike', 'php', 'shell', 'python']
204204

205+
# Enabling mathjax support
206+
mathjax:true
207+
205208
```
206209
</details>
207210
@@ -328,6 +331,15 @@ type: "tags"
328331
329332
> Theme will auto generate tags contents.
330333
334+
### MathJax Support
335+
336+
Default enables mathjax support, can change it to `false` to turn it off.
337+
338+
```yaml
339+
# Enabling mathjax support
340+
mathjax: true
341+
```
342+
331343
##Update Theme
332344

333345
>Please backup your`_config.yml` file before update
@@ -365,3 +377,13 @@ hexo clean && hexo g
365377
##Related
366378

367379
I have made a[`Typro`](https://typora.io/) theme[`Obsidian`](https://github.com/TriDiamond/typro-theme-obsidian) especially for this blog theme.
380+
381+
##Feedback
382+
383+
>Please check the[ISSUES](https://github.com/TriDiamond/hexo-theme-obsidian/issues) before try to use the following contact methods!
384+
>Maybe the question you have had being asked by others or it's already being answered. Thanks!
385+
386+
You can give me feedback or issue you have through the following methods:
387+
388+
-[Create a issue!](https://github.com/TriDiamond/hexo-theme-obsidian/issues/new)
389+
- Joint QQGroup`909955326`

‎README_CN.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ sharejs:
200200
codemirror:
201201
modes:['javascript', 'css', 'xml', 'htmlmixed', 'clike', 'php', 'shell', 'python']
202202

203+
# 启用 mathjax 支持
204+
mathjax:true
205+
203206
```
204207
</details>
205208
@@ -325,6 +328,15 @@ type: "tags"
325328

326329
> 主题会自动生成标签内容,模版里面留空不用改动就可以了。
327330

331+
### MathJax 支持
332+
333+
默认是启用MathJax支持的, 如果需要关闭改变主题配置为 `false`。
334+
335+
```yaml
336+
# 启用 mathjax 支持
337+
mathjax: true
338+
```
339+
328340
## 更新主题
329341

330342
> 更新前请先备份主题里的 `_config.yml` 文件
@@ -362,3 +374,13 @@ hexo clean && hexo g
362374
## 相关
363375

364376
做了一个 [`Typro`](https://typora.io/) 主题 [`Obsidian`](https://github.com/TriDiamond/typro-theme-obsidian) 专门给写博客的你们.
377+
378+
## 反馈
379+
380+
> 大家记得先看一下[ISSUE](https://github.com/TriDiamond/hexo-theme-obsidian/issues)里面有没有你的问题,已经解答了的。
381+
> 很有可能你的问题已经被问过了,或者可以在Issue里面就找到答案了!谢谢配合!
382+
383+
可以通过以下方式反馈问题:
384+
385+
-[创建新 issue!](https://github.com/TriDiamond/hexo-theme-obsidian/issues/new)
386+
-加入QQ群 `909955326`

‎_config.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
#! ---------------------------------------------------------------
2+
#! ▄▀▄ █▀▄ ▄▀▀ ▀ █▀▄ ▀ ▄▀▄ █▄░█
3+
#! █░█ █▀█ ░▀▄ █ █░█ █ █▀█ █░▀█
4+
#! ░▀░ ▀▀░ ▀▀░ ▀ ▀▀░ ▀ ▀░▀ ▀░░▀
5+
#! ᴅᴇsɪɢɴᴇᴅ & ᴄᴏᴅᴇᴅ ʙʏ ᴛʀɪᴅɪᴀᴍᴏɴᴅ
6+
#! ---------------------------------------------------------------
27
#! Theme Obsidian - A dark Hexo theme, it's responsive, simple but elegant.
8+
#! Thanks to and inspirated by CSS-Tricks
39
#! @author: TriDiamond
410
#! @github: https://github.com/TriDiamond
11+
#! @changelogs: https://github.com/TriDiamond/hexo-theme-obsidian/blob/master/CHANGELOG.md
12+
#! @feedbacks: https://github.com/TriDiamond/hexo-theme-obsidian/issues/new
513
#! ---------------------------------------------------------------
614

15+
#! ---------------------------------------------------------------
16+
#! █▄░█ ▄▀▄ ▀█▀ █▀▀ ▄▀▀
17+
#! █░▀█ █░█ ░█░ █▀▀ ░▀▄
18+
#! ▀░░▀ ░▀░ ░▀░ ▀▀▀ ▀▀░ v1.x
719
#! ---------------------------------------------------------------
820
#! Since version `v1.3.5` code block highlight has changed from `highlight.js` to
921
#! `codemirror`, but the Hexo default highlight still need to be disabled to take affect.
@@ -20,7 +32,7 @@
2032
#! ---------------------------------------------------------------
2133

2234
# Theme version
23-
version:"1.4.2"
35+
version:"1.4.3"
2436

2537
# ---------------------------------------------------------------
2638
# Theme default settings
@@ -159,3 +171,6 @@ sharejs:
159171
# see https://codemirror.net/
160172
codemirror:
161173
modes:['javascript', 'css', 'xml', 'htmlmixed', 'clike', 'php', 'shell', 'python']
174+
175+
# Enabling mathjax support
176+
mathjax:true

‎layout/_partial/mathjax.ejs‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<%if (theme.mathjax){%>
2+
<script type="text/javascript" src="https://cdn.bootcss.com/mathjax/2.7.6/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
3+
</script>
4+
<script>
5+
MathJax.Hub.Config({
6+
"HTML-CSS": {
7+
preferredFont:"TeX",
8+
availableFonts: ["STIX","TeX"],
9+
linebreaks: {
10+
automatic:true
11+
},
12+
EqnChunk: (MathJax.Hub.Browser.isMobile?10:50)
13+
},
14+
tex2jax: {
15+
inlineMath: [
16+
["$","$"],
17+
["\\(","\\)"]
18+
],
19+
processEscapes:true,
20+
ignoreClass:"tex2jax_ignore|dno",
21+
skipTags: ['script','noscript','style','textarea','pre','code']
22+
},
23+
TeX: {
24+
noUndefined: {
25+
attributes: {
26+
mathcolor:"red",
27+
mathbackground:"#FFEEEE",
28+
mathsize:"90%"
29+
}
30+
},
31+
Macros: {
32+
href:"{}"
33+
}
34+
},
35+
messageStyle:"none"
36+
});
37+
</script>
38+
<script>
39+
functioninitialMathJax() {
40+
MathJax.Hub.Queue(function () {
41+
var all=MathJax.Hub.getAllJax(),
42+
i;
43+
// console.log(all);
44+
for (i=0; i<all.length; i+=1) {
45+
console.log(all[i].SourceElement().parentNode)
46+
all[i].SourceElement().parentNode.className+=' has-jax';
47+
}
48+
});
49+
}
50+
51+
functionreprocessMathJax() {
52+
if (typeof MathJax!=='undefined') {
53+
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
54+
}
55+
}
56+
</script>
57+
<% }%>

‎layout/_partial/post/article.ejs‎

Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<divclass=article-header-wrapper>
1+
<divclass=article-header-wrapper>
22
<divclass="article-header">
33
<divclass="article-cover animated fadeIn"style="
44
animation-delay:600ms;
@@ -10,48 +10,50 @@
1010
<divclass="else">
1111
<pclass="animated fadeInDown">
1212
<%if (page.categories.data[0]) {%>
13-
<a href="<%- '/categories/' + page.categories.data[0].name %>"><b></b><%-page.categories.data[0].name.toUpperCase()%><b></b></a>
13+
<a href="<%- '/categories/' + page.categories.data[0].name %>"><b>
14+
</b><%-page.categories.data[0].name.toUpperCase()%><b></b></a>
1415
<% }else {%>
15-
<a href="#"><b></b><%=__('default_category')%><b></b></a>
16+
<a href="#"><b></b><%=__('default_category')%><b></b></a>
1617
<% }%>
1718
<%-page.date.locale(config.language||'').format("MMMM DD, YYYY")%>
1819
</p>
19-
<h3class="post-title animated fadeInDown"><%-link_to(page.path,page.title||"Untitled", {class:""})%></h3>
20+
<h3class="post-title animated fadeInDown"><%-link_to(page.path,page.title||"Untitled", {class:""})%>
21+
</h3>
2022
<%if (theme.symbols_count_time.enable) {%>
21-
<pclass="post-count animated fadeInDown">
22-
<%if (theme.symbols_count_time.wordCount) {%>
23-
<span>
24-
<bclass="iconfont icon-text2"></b><i><%=__('word_count')%></i>
25-
<%=symbolsCount(page.content)%>
26-
</span>
27-
<% }%>
28-
<%if (theme.symbols_count_time.readCount) {%>
29-
<span>
30-
<bclass="iconfont icon-timer__s"></b><i><%=__('read_time')%></i>
31-
<%=symbolsTime(
23+
<pclass="post-count animated fadeInDown">
24+
<%if (theme.symbols_count_time.wordCount) {%>
25+
<span>
26+
<bclass="iconfont icon-text2"></b><i><%=__('word_count')%></i>
27+
<%=symbolsCount(page.content)%>
28+
</span>
29+
<% }%>
30+
<%if (theme.symbols_count_time.readCount) {%>
31+
<span>
32+
<bclass="iconfont icon-timer__s"></b><i><%=__('read_time')%></i>
33+
<%=symbolsTime(
3234
page.content,
3335
theme.symbols_count_time.awl,
3436
theme.symbols_count_time.wpm,
3537
theme.symbols_count_time.suffix
3638
)%>
37-
</span>
38-
<% }%>
39-
<%if (theme.valine.enable==true&&theme.valine.visitor==true) {%>
40-
<span id="<%- '/' + page.path %>"class="leancloud_visitors" data-flag-title="<%- page.title %>">
41-
<bclass="iconfont icon-read"></b><i><%=__('read_count')%></i>
42-
<iclass="leancloud-visitors-count">1000000</i>
43-
</span>
44-
<% }%>
45-
<%if (theme.busuanzi.enable==true&&theme.valine.enable==false) {%>
46-
<span id="busuanzi_container_page_pv">
47-
<bclass="iconfont icon-read"></b><i><%=__('read_count')%></i>
48-
<span id="busuanzi_value_page_pv">0</span>
49-
</span>
50-
<% }%>
51-
</p>
39+
</span>
40+
<% }%>
41+
<%if (theme.valine.enable==true&&theme.valine.visitor==true) {%>
42+
<span id="<%- '/' + page.path %>"class="leancloud_visitors" data-flag-title="<%- page.title %>">
43+
<bclass="iconfont icon-read"></b><i><%=__('read_count')%></i>
44+
<iclass="leancloud-visitors-count">1000000</i>
45+
</span>
46+
<% }%>
47+
<%if (theme.busuanzi.enable==true&&theme.valine.enable==false) {%>
48+
<span id="busuanzi_container_page_pv">
49+
<bclass="iconfont icon-read"></b><i><%=__('read_count')%></i>
50+
<span id="busuanzi_value_page_pv">0</span>
51+
</span>
52+
<% }%>
53+
</p>
5254
<% }%>
5355
<%if (page.tags&&page.tags.length){%>
54-
<%-list_tags(page.tags, {
56+
<%-list_tags(page.tags, {
5557
show_count:false,
5658
class:'animated fadeInDown post-tags'
5759
})%>
@@ -74,28 +76,29 @@
7476

7577
<divclass="article">
7678
<divclass='main'>
77-
<divclass="content markdown animated fadeIn slower">
79+
<divclass="content markdown animated fadeIn">
7880
<%-page.content%>
7981
<!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
80-
<audioid="audio"loop="1"preload="auto"controls="controls"data-autoplay="<%- theme.autoplay || page.autoplay ||"false" %>">
82+
<audioid="audio"loop="1"preload="auto"controls="controls"
83+
data-autoplay="<%- theme.autoplay || page.autoplay ||"false" %>">
8184
<sourcetype="audio/mpeg"src="<%- page.mp3 %>">
8285
</audio>
8386
<%if (page.mp3==''|page.mp3==null){%>
84-
<ul id="audio-list" style="display:none">
85-
<%for (var iintheme.mp3){%>
86-
<%if (theme.mp3[i].indexOf('http')==0){%>
87-
<li title='<%- i %>' data-url='<%- theme.mp3[i] %>'></li>
88-
<%}else {%>
89-
<li title='<%- i %>' data-url='<%- config.root + theme.mp3[i] %>'></li>
90-
<%}%>
87+
<ul id="audio-list" style="display:none">
88+
<%for (var iintheme.mp3){%>
89+
<%if (theme.mp3[i].indexOf('http')==0){%>
90+
<li title='<%- i %>' data-url='<%- theme.mp3[i] %>'></li>
91+
<%}else {%>
92+
<li title='<%- i %>' data-url='<%- config.root + theme.mp3[i] %>'></li>
93+
<%}%>
9194
<%}%>
92-
</ul>
95+
</ul>
9396
<%}%>
9497
<%if (theme.gitalk.enable==true){%>
95-
<%-partial('gitalk', {post: page})%>
98+
<%-partial('gitalk', {post: page})%>
9699
<% }%>
97100
<%if (theme.valine.enable==true){%>
98-
<div id="vcomments"></div>
101+
<div id="vcomments"></div>
99102
<% }%>
100103
</div>
101104
<divclass="sidebar">
@@ -105,9 +108,12 @@
105108
<p><%-config.author%></p>
106109
<span><%-theme.descriptionOne%></span>
107110
<dl>
108-
<dd><ahref="<%- theme.socials.github %>"target="_blank"><spanclass=" iconfont icon-github"></span></a></dd>
109-
<dd><ahref="<%- theme.socials.twitter %>"target="_blank"><spanclass=" iconfont icon-twitter"></span></a></dd>
110-
<dd><ahref="<%- theme.socials.stackoverflow %>"target="_blank"><spanclass=" iconfont icon-stack-overflow"></span></a></dd>
111+
<dd><ahref="<%- theme.socials.github %>"target="_blank"><span
112+
class=" iconfont icon-github"></span></a></dd>
113+
<dd><ahref="<%- theme.socials.twitter %>"target="_blank"><span
114+
class=" iconfont icon-twitter"></span></a></dd>
115+
<dd><ahref="<%- theme.socials.stackoverflow %>"target="_blank"><span
116+
class=" iconfont icon-stack-overflow"></span></a></dd>
111117
</dl>
112118
</div>
113119
<ul>
@@ -117,17 +123,16 @@
117123
</ul>
118124
</div>
119125
<%if (theme.TOC==true) {%>
120-
<% toc=toc(page.content, {list_number:true})%>
121-
<%if (toc.length>1) {%>
122-
<divclass="box sticky animated fadeInRight faster">
123-
<div id="toc"class="subbox">
124-
<h4><%=__('toc')%></h4>
125-
<%- toc%>
126-
</div>
127-
</div>
128-
<%}%>
126+
<% toc=toc(page.content, {list_number:true, max_depth:3})%>
127+
<%if (toc.length>1) {%>
128+
<divclass="box sticky animated fadeInRight faster">
129+
<div id="toc"class="subbox">
130+
<h4><%=__('toc')%></h4>
131+
<%- toc%>
132+
</div>
133+
</div>
134+
<%}%>
129135
<%}%>
130136
</div>
131137
</div>
132138
</div>
133-

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp