jekyll-theme-minimalism 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +21 -0
- data/README.md +74 -0
- data/_includes/baidu.html +11 -0
- data/_includes/cnzz.html +6 -0
- data/_includes/content.html +132 -0
- data/_includes/copyright.html +7 -0
- data/_includes/favicon.html +12 -0
- data/_includes/footer.html +1 -0
- data/_includes/google.html +11 -0
- data/_includes/header.html +3 -0
- data/_includes/header_title.html +10 -0
- data/_includes/statistics_body.html +3 -0
- data/_includes/statistics_head.html +4 -0
- data/_layouts/about.html +47 -0
- data/_layouts/archive.html +64 -0
- data/_layouts/articles.html +55 -0
- data/_layouts/categories.html +79 -0
- data/_layouts/index.html +64 -0
- data/_layouts/post.html +69 -0
- data/_sass/_about.scss +17 -0
- data/_sass/_archive.scss +312 -0
- data/_sass/_articles.scss +136 -0
- data/_sass/_categories.scss +104 -0
- data/_sass/_common.scss +408 -0
- data/_sass/_index.scss +133 -0
- data/_sass/_markdown.scss +219 -0
- data/_sass/_post.scss +51 -0
- data/_sass/_prism-line-numbers.scss +43 -0
- data/assets/css/about.scss +4 -0
- data/assets/css/archive.scss +4 -0
- data/assets/css/articles.scss +4 -0
- data/assets/css/categories.scss +4 -0
- data/assets/css/index.scss +4 -0
- data/assets/css/markdown.scss +4 -0
- data/assets/css/post.scss +4 -0
- data/assets/css/prism-line-numbers.scss +4 -0
- data/assets/css/prism.css +124 -0
- data/assets/img/avatar.webp +0 -0
- data/assets/img/favicon.ico +0 -0
- data/assets/js/copy_with_declaration.js +33 -0
- data/assets/js/link_target.js +6 -0
- data/assets/js/lock_copy.js +1 -0
- data/assets/js/lock_menu.js +1 -0
- data/assets/js/prism-line-numbers.js +117 -0
- data/assets/js/prism.js +50 -0
- data/assets/js/timeline.js +33 -0
- metadata +48 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 252b919297e84a343b403888318d65bbb02b85f66b01a43bbe978b36ac394519
|
4
|
+
data.tar.gz: '085be19266ac939c6f647319d6aea343e7520bb1129620b6b34bbe9af2e7be3e'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f304d336eddb03e40cef7c3b26acc5df1d1abceb7617eab5f461450f3fda1295ef6e8d3ebb6fbb7751205b71c55c1e9940c01f9f0541b6821af77e2f1063010
|
7
|
+
data.tar.gz: 8812ef8952a1b8d894c18ad1d4547773e5a485ac2d2ce2ab99c9eb3ec93a33ed99daf09569defde1108a34b5c2f665b64327c2d0d5144a500392d42840ecee49
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 showzeng
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Minimalism
|
2
|
+
|
3
|
+

|
4
|
+
|
5
|
+
Minimalism 是一款基于 Jekyll 为极简主义者打造的极简主题。你可以访问 [我的博客][blog] 或者 [主题 demo][demo] 来预览一下。
|
6
|
+
|
7
|
+
## 特性
|
8
|
+
|
9
|
+
**V0.1.0**
|
10
|
+
- 这款主题采用响应式布局,对各大主流浏览器做了兼容,对移动客户端做了适配
|
11
|
+
- 支持 RSS 订阅
|
12
|
+
- SEO 优化
|
13
|
+
- 文章默认采用 [CC BY-NC-ND 4.0][license] 协议对著作权进行保护,支持 emoji 表情
|
14
|
+
- 支持禁止复制、禁止右键菜单、复制附带版权声明等多种功能
|
15
|
+
- 支持文章打赏 (微信、支付宝)
|
16
|
+
- 支持评论功能 (目前支持来必力、gitment)
|
17
|
+
- 支持站点统计 (目前支持谷歌统计、百度统计、友盟 cnzz 统计)
|
18
|
+
- 最后且最重要的当然还是对博客文章极度的阅读体验优化
|
19
|
+
|
20
|
+
## 安装
|
21
|
+
|
22
|
+
在你的 `Gemfile` 文件中加入下面这一行:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
gem "jekyll-theme-minimalism"
|
26
|
+
```
|
27
|
+
|
28
|
+
在你的配置文件 `_config.yml` 中修改启用主题:
|
29
|
+
|
30
|
+
```yaml
|
31
|
+
theme: jekyll-theme-minimalism
|
32
|
+
```
|
33
|
+
|
34
|
+
然后使用 bundle 执行安装:
|
35
|
+
|
36
|
+
$ bundle install
|
37
|
+
|
38
|
+
或者你也可以手动下载安装:
|
39
|
+
|
40
|
+
$ gem install jekyll-theme-minimalism
|
41
|
+
|
42
|
+
## 使用
|
43
|
+
|
44
|
+
移步 [wiki] 或者查看 [demo]。
|
45
|
+
|
46
|
+
## 支持
|
47
|
+
|
48
|
+
如果你觉得这个主题还不错,欢迎 star 或使用。你也可以自由的 fork,基于本主题打造你自己的主题,当然,希望最好是能署名或提及本博客主题。
|
49
|
+
|
50
|
+
此外你有什么好的建议、需求或者是碰到什么问题,欢迎提交 [issue],本主题还会不断完善。
|
51
|
+
|
52
|
+
## 打赏
|
53
|
+
|
54
|
+
如果主题对你有帮助,并帮你节省了一些折腾的时间,可以考虑打赏,这是对我所做工作的最大肯定。
|
55
|
+
|
56
|
+

|
57
|
+
|
58
|
+
## Change log
|
59
|
+
|
60
|
+
**V0.1.2 (2018/08/12 22:46)**
|
61
|
+
- 修复空 gem 包的 bug
|
62
|
+
|
63
|
+
**V0.1.1 (2018/08/12 20:24)**
|
64
|
+
- 修复缺少插件依赖配置
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
69
|
+
|
70
|
+
[blog]: https://showzeng.itscoder.com
|
71
|
+
[demo]: https://showzeng.github.io
|
72
|
+
[license]: https://creativecommons.org/licenses/by-nc-nd/4.0/
|
73
|
+
[wiki]: https://github.com/showzeng/Minimalism/wiki
|
74
|
+
[issue]: https://github.com/showzeng/Minimalism/issues/new
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{% if site.baidu_id %}
|
2
|
+
<script>
|
3
|
+
var _hmt = _hmt || [];
|
4
|
+
(function() {
|
5
|
+
var hm = document.createElement("script");
|
6
|
+
hm.src = "https://hm.baidu.com/hm.js?{{ site.baidu_id }}";
|
7
|
+
var s = document.getElementsByTagName("script")[0];
|
8
|
+
s.parentNode.insertBefore(hm, s);
|
9
|
+
})();
|
10
|
+
</script>
|
11
|
+
{% endif %}
|
data/_includes/cnzz.html
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
<div class="page-content">
|
2
|
+
<div class="content" id="post-content">
|
3
|
+
<p>{{ content }}</p>
|
4
|
+
|
5
|
+
<div class="licenses">
|
6
|
+
<hr>
|
7
|
+
<p>本作品采用<a rel="license"
|
8
|
+
href="http://creativecommons.org/licenses/by-nc-nd/4.0/"
|
9
|
+
target="_blank">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a>进行许可。</p>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
{% if site.reward and site.reward == true %}
|
13
|
+
{% unless page.reward != null and page.reward == false %}
|
14
|
+
<div class="reward">
|
15
|
+
<hr>
|
16
|
+
<div class="reward-qr-code" style="display: none">
|
17
|
+
{% assign image_files = site.static_files | where: "image", true %}
|
18
|
+
{% for image in image_files %}
|
19
|
+
{% if image.basename == 'alipay' or image.basename == 'wechat' %}
|
20
|
+
<div class="{{ image.basename }}">
|
21
|
+
<img src="{{ image.path }}" alt="{{ image.basename }} reward qr code">
|
22
|
+
{% case image.basename %}
|
23
|
+
{% when 'alipay' %}
|
24
|
+
<span>支付宝打赏</span>
|
25
|
+
{% when 'wechat' %}
|
26
|
+
<span>微信打赏</span>
|
27
|
+
{% endcase %}
|
28
|
+
</div>
|
29
|
+
{% endif %}
|
30
|
+
{% endfor %}
|
31
|
+
</div>
|
32
|
+
|
33
|
+
{% if site.reward_description %}
|
34
|
+
<p>{{ site.reward_description }}</p>
|
35
|
+
{% endif %}
|
36
|
+
<div id="btn-show-reward">
|
37
|
+
<div onclick="showReward()">赏</div>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
{% endunless %}
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
{% if site.comment and site.comment == true %}
|
44
|
+
{% unless page.comment != null and page.comment == false %}
|
45
|
+
|
46
|
+
{% if site.gitment_client_id and site.gitment_secret %}
|
47
|
+
<hr>
|
48
|
+
<div id="btn-show-comment">
|
49
|
+
<div onclick="showComment()">显示评论</div>
|
50
|
+
</div>
|
51
|
+
<div id="comment" style="display: none">
|
52
|
+
<!-- gitment 代码 -->
|
53
|
+
<div id="container"></div>
|
54
|
+
<link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
|
55
|
+
<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
|
56
|
+
<script>
|
57
|
+
const myTheme = {
|
58
|
+
render(state, instance) {
|
59
|
+
const container = document.createElement('div')
|
60
|
+
container.lang = "en-US"
|
61
|
+
container.className = 'gitment-container gitment-root-container'
|
62
|
+
container.appendChild(instance.renderHeader(state, instance))
|
63
|
+
container.appendChild(instance.renderEditor(state, instance))
|
64
|
+
container.appendChild(instance.renderComments(state, instance))
|
65
|
+
container.appendChild(instance.renderFooter(state, instance))
|
66
|
+
return container
|
67
|
+
},
|
68
|
+
}
|
69
|
+
|
70
|
+
const gitment = new Gitment({
|
71
|
+
owner: '{{ site.gitment_owner }}',
|
72
|
+
repo: '{{ gitment_repo }}',
|
73
|
+
oauth: {
|
74
|
+
client_id: '{{ gitment_client_id }}',
|
75
|
+
client_secret: '{{ gitment_secret }}',
|
76
|
+
},
|
77
|
+
theme: myTheme,
|
78
|
+
})
|
79
|
+
|
80
|
+
gitment.render('container')
|
81
|
+
</script>
|
82
|
+
<!-- gitment 代码 -->
|
83
|
+
</div>
|
84
|
+
{% endif %}
|
85
|
+
|
86
|
+
{% if site.livere_uid %}
|
87
|
+
<hr>
|
88
|
+
<div id="btn-show-comment">
|
89
|
+
<div onclick="showComment()">显示评论</div>
|
90
|
+
</div>
|
91
|
+
<div id="comment" style="display: none">
|
92
|
+
<!-- 来必力 City 版安装代码 -->
|
93
|
+
<div id="lv-container" data-id="city" data-uid="{{ site.livere_uid }}">
|
94
|
+
<script type="text/javascript">
|
95
|
+
(function(d, s) {
|
96
|
+
var j, e = d.getElementsByTagName(s)[0];
|
97
|
+
|
98
|
+
if (typeof LivereTower === 'function') { return; }
|
99
|
+
|
100
|
+
j = d.createElement(s);
|
101
|
+
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
102
|
+
j.async = true;
|
103
|
+
|
104
|
+
e.parentNode.insertBefore(j, e);
|
105
|
+
})(document, 'script');
|
106
|
+
</script>
|
107
|
+
<noscript>为正常使用来必力评论功能请激活 JavaScript</noscript>
|
108
|
+
</div>
|
109
|
+
<!-- City 版安装代码已完成 -->
|
110
|
+
</div>
|
111
|
+
{% endif %}
|
112
|
+
{% endunless %}
|
113
|
+
{% endif %}
|
114
|
+
|
115
|
+
<script>
|
116
|
+
function showComment() {
|
117
|
+
if(document.getElementById("comment").style.display=="none") {
|
118
|
+
document.getElementById("comment").style.display="block";
|
119
|
+
document.getElementById("btn-show-comment").style.display="none";
|
120
|
+
}
|
121
|
+
}
|
122
|
+
|
123
|
+
function showReward() {
|
124
|
+
if (document.getElementsByClassName("reward-qr-code")[0].style.display=="none" ) {
|
125
|
+
document.getElementsByClassName("reward-qr-code")[0].style.display="block";
|
126
|
+
} else {
|
127
|
+
document.getElementsByClassName("reward-qr-code")[0].style.display="none";
|
128
|
+
}
|
129
|
+
}
|
130
|
+
</script>
|
131
|
+
</div>
|
132
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<section class="copyright">
|
2
|
+
<p>Copyright © {{ site.copyright_time | default: "2018" }} {{ site.name | default: "minimalism" }} | Power by
|
3
|
+
<a href="https://jekyllrb.com/" target="_blank">Jekyll</a>
|
4
|
+
| Theme
|
5
|
+
<a href="https://github.com/showzeng/minimalism" target="_blank">Minimalism</a>
|
6
|
+
</p>
|
7
|
+
</section>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{% if site.favicon %}
|
2
|
+
<link rel="shortcut icon" href="{{ site.favicon }}" />
|
3
|
+
<link rel="bookmark" href="{{ site.favicon }}" type="image/x-icon" />
|
4
|
+
{% else %}
|
5
|
+
{% assign image_files = site.static_files | where: "image", true %}
|
6
|
+
{% for image in image_files %}
|
7
|
+
{% if image.basename == 'favicon' %}
|
8
|
+
<link rel="shortcut icon" href="{{ image.path }}" />
|
9
|
+
<link rel="bookmark" href="{{ image.path }}" type="image/x-icon" />
|
10
|
+
{% endif %}
|
11
|
+
{% endfor %}
|
12
|
+
{% endif %}
|
@@ -0,0 +1 @@
|
|
1
|
+
<footer>{% include copyright.html %}</footer>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{% if site.google_id %}
|
2
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
3
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_id }}"></script>
|
4
|
+
<script>
|
5
|
+
window.dataLayer = window.dataLayer || [];
|
6
|
+
function gtag(){dataLayer.push(arguments);}
|
7
|
+
gtag('js', new Date());
|
8
|
+
|
9
|
+
gtag('config', '{{ site.google_id }}');
|
10
|
+
</script>
|
11
|
+
{% endif %}
|
data/_layouts/about.html
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ site.lang | default: "zh-cmn-Hans" }}">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
+
<title>
|
8
|
+
{% if page.title %}
|
9
|
+
{{ page.title }}
|
10
|
+
{% else %}
|
11
|
+
关于
|
12
|
+
{% endif %}
|
13
|
+
</title>
|
14
|
+
|
15
|
+
<!--[if lt IE 9]>
|
16
|
+
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
17
|
+
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
18
|
+
<![endif]-->
|
19
|
+
|
20
|
+
{% include favicon.html %}
|
21
|
+
|
22
|
+
<link rel="stylesheet" href="{{ "/assets/css/about.css" }}">
|
23
|
+
<link rel="stylesheet" href="{{ "/assets/css/markdown.css" }}">
|
24
|
+
{% seo %}
|
25
|
+
{% include statistics_head.html %}
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
{% include header.html %}
|
29
|
+
|
30
|
+
{% include content.html %}
|
31
|
+
|
32
|
+
{% include footer.html %}
|
33
|
+
|
34
|
+
<script src="{{ "/assets/js/link_target.js" }}"></script>
|
35
|
+
|
36
|
+
{% if site.lock_menu and site.lock_menu == true %}
|
37
|
+
<script src="{{ "/assets/js/lock_menu.js" }}"></script>
|
38
|
+
{% endif %}
|
39
|
+
{% if site.copy_with_declaration and site.copy_with_declaration == true %}
|
40
|
+
<script src="{{ "/assets/js/copy_with_declaration.js" }}"></script>
|
41
|
+
{% elsif site.lock_copy and site.lock_copy == true %}
|
42
|
+
<script src="{{ "/assets/js/lock_copy.js" }}"></script>
|
43
|
+
{% endif %}
|
44
|
+
|
45
|
+
{% include statistics_body.html %}
|
46
|
+
</body>
|
47
|
+
</html>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ site.lang | default: "zh-cmn-Hans" }}">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
+
<title>
|
8
|
+
{% if page.title %}
|
9
|
+
{{ page.title }}
|
10
|
+
{% else %}
|
11
|
+
归档
|
12
|
+
{% endif %}
|
13
|
+
</title>
|
14
|
+
|
15
|
+
<!--[if lt IE 9]>
|
16
|
+
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
17
|
+
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
|
18
|
+
<![endif]-->
|
19
|
+
|
20
|
+
{% include favicon.html %}
|
21
|
+
|
22
|
+
<link rel="stylesheet" href="{{ "/assets/css/archive.css" }}">
|
23
|
+
{% seo %}
|
24
|
+
{% include statistics_head.html %}
|
25
|
+
</head>
|
26
|
+
<body>
|
27
|
+
{% include header.html %}
|
28
|
+
|
29
|
+
<section class="timeline">
|
30
|
+
<p class="timeline-title">一共输出 {{ site.posts.size }} 篇文章</p>
|
31
|
+
<ul>
|
32
|
+
{% for post in site.posts %}
|
33
|
+
{% if post.next != null %}
|
34
|
+
{% capture postYear %} {{ post.date | date: "%Y" }} {% endcapture %}
|
35
|
+
{% capture nextPostYear %} {{ post.next.date | date: "%Y" }} {% endcapture %}
|
36
|
+
{% if postYear != nextPostYear %}
|
37
|
+
<p id="year{{ post.date | date: '%Y' }}">{{ post.date | date: '%Y' }}</p>
|
38
|
+
{% endif %}
|
39
|
+
{% else %}
|
40
|
+
<p id="year{{ post.date | date: '%Y' }}">{{ post.date | date: '%Y' }}</p>
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
<li>
|
44
|
+
<div>
|
45
|
+
<time>{{ post.date | date:"%m-%d" }}</time>
|
46
|
+
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
|
47
|
+
</div>
|
48
|
+
</li>
|
49
|
+
|
50
|
+
{% endfor %}
|
51
|
+
</ul>
|
52
|
+
</section>
|
53
|
+
|
54
|
+
{% include footer.html %}
|
55
|
+
|
56
|
+
<script src="{{ "/assets/js/timeline.js" }}"></script>
|
57
|
+
|
58
|
+
{% if site.lock_menu and site.lock_menu == true %}
|
59
|
+
<script src="{{ "/assets/js/lock_menu.js" }}"></script>
|
60
|
+
{% endif %}
|
61
|
+
|
62
|
+
{% include statistics_body.html %}
|
63
|
+
</body>
|
64
|
+
</html>
|