jekyll-theme-h2o-ac 1.0.0 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e55eebbb35107b6aa365137d1ef4936751fa9bb2f4f99bfe6414175d01c6207f
4
- data.tar.gz: aaa8762de9cb1fd05a4a187d8be38ab1b86412a8849da9a994b13dc14e15e67b
3
+ metadata.gz: d4a48ff39279f8d073a746e58dbd7703d3f23e9323262bdef7f557fb33bec91d
4
+ data.tar.gz: a3681805716780324d9080e352acade3b52f910747d01d3d84cbbf971dd383c6
5
5
  SHA512:
6
- metadata.gz: 4e8852b4af9bdb2781c4a9c07e10d00143b21f7cb5051ef44ae796feb4e38579db5b0e9a96f82d0c84721a4842b8a39750c4dd6ad4e20833fae0e5a841d84d49
7
- data.tar.gz: 4a08baf90d910857aa6d78a037b5176750c1fd2fde32197d99b3258b6af209d047cb7748e197b20252e405b59443c1a487855d79b032d9f04bfc82745a86f305
6
+ metadata.gz: 450cf00db372dfc5116010582c7a2f33986f0f56bbfd2e47b98c05fc7c53cace45e58a4be0b6eda694ca566d7754f32c38f065e0c496b2d8f47d6e20c7805ea8
7
+ data.tar.gz: ce740d4f6ea7efa82683aae5e5423fcffa596444481fe7437a1f42da7252610fa5d004c99724304dd34e219bb6c5825c0ec6b618d71653d948ea8d057ebe797b
data/README.md CHANGED
@@ -6,11 +6,10 @@ An Jekyll theme for researchers and maintainers based on Jekyll and [H2O](https:
6
6
 
7
7
  ### Preview
8
8
 
9
- #### [在线预览 Live Demo →](http://lisz.me/)
9
+ #### [在线预览 Live Demo →](https://h2o-ac.pages.dev/)
10
10
 
11
11
  ![vgy.me](https://i.vgy.me/pICzcE.png)
12
- ![vgy.me](https://i.vgy.me/cI35JI.png)
13
- ![vgy.me](https://i.vgy.me/ReKZeP.png)
12
+ ![vgy.me](https://i.vgy.me/0kmQ1j.png)
14
13
 
15
14
  如果你喜欢这个博客模板,请在右上角star一下,非常感谢~
16
15
 
@@ -22,7 +21,7 @@ If you like this theme or using it, please give a ⭐️ for motivation ;)
22
21
 
23
22
  Using your smartphone to scan the QR Code
24
23
 
25
- ### New Features based on H2O, 与 H2O 不同的新特性
24
+ ### New Features compared with H2O, 与 H2O 不同的新特性
26
25
 
27
26
  #### CN
28
27
 
@@ -70,4 +69,4 @@ Any types of contribution are welcome. Thanks.
70
69
 
71
70
  ### License 许可证
72
71
 
73
- Jekyll-Theme-H2O-ac is licensed under [MIT](https://github.com/kaeyleo/jekyll-theme-H2O-ac/blob/master/LICENSE).
72
+ Jekyll-Theme-H2O-ac is licensed under [MIT](https://github.com/zhonger/jekyll-theme-H2O-ac/blob/master/LICENSE).
data/_config.yml CHANGED
@@ -14,6 +14,9 @@ url: '' # your host
14
14
  # 但是,如果你创建了一个叫 "myblog" 的网站,此时网址会变成 "kaeyleo.github.io/myblog" ,这时再将 baseurl 设置为 '/myblog'
15
15
  baseurl: ''
16
16
 
17
+ # International
18
+ language: zh-cn
19
+
17
20
  # Navigation links
18
21
  nav:
19
22
  home: '/'
@@ -74,6 +77,17 @@ links:
74
77
  # Beian 备案号
75
78
  beian: '沪ICP备xxxxxxxx号'
76
79
 
80
+ # CC License
81
+ cclicense: true
82
+
83
+ # CNZZ Analytics
84
+ # cnzz: 1234567891
85
+ cnzz: 1280712061
86
+
87
+ # Google Analytics
88
+ # google_analytics: UA-XXXXXXXXX-X
89
+ google_analytics: UA-164207041-1
90
+
77
91
  # Tags 设置标签
78
92
  recommend-tags: true # whether or not display recommend-tags on the sidebar
79
93
  recommend-condition-size: 12 # a tag will be recommended if the size of it is more than this value
@@ -81,7 +95,7 @@ recommend-condition-size: 12 # a tag will be recommended if the size of it is mo
81
95
  # Build settings
82
96
  paginate: 10
83
97
  paginate_path: 'blog/page:num'
84
- exclude: ['node_modules', 'dev', 'package.json', 'gulpfile.js', '.gitignore', 'README.md']
98
+ exclude: ['node_modules', 'dev', 'package.json', 'gulpfile.js', '.gitignore', 'README.md', '*.gemspec', '*.gem']
85
99
 
86
100
  # Markdown
87
101
  markdown: kramdown
@@ -0,0 +1,11 @@
1
+ {% if site.google_analytics %}
2
+ <!-- Global site tag (gtag.js) - Google Analytics -->
3
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></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_analytics }}');
10
+ </script>
11
+ {% endif %}
@@ -10,6 +10,14 @@
10
10
  <a href="https://beian.miit.gov.cn/" target="_blank">{{ site.beian }}</a>
11
11
  {% endif %}
12
12
  </section>
13
- <section>Powered by <a href="//jekyllrb.com">Jekyll</a> & <a href="https://github.com/zhonger/jekyll-theme-H2O-ac">Theme H2O-ac</a> (based on <a href="https://github.com/kaeyleo/jekyll-theme-H2O">Theme H2O</a>)</section>
13
+ <section>Powered by <a href="//jekyllrb.com">Jekyll</a> & <a href="https://github.com/zhonger/jekyll-theme-H2O-ac">Theme H2O-ac</a> (based on <a href="https://github.com/kaeyleo/jekyll-theme-H2O">Theme H2O</a>)
14
+ {% if site.cclicense %}
15
+ <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png" /></a>
16
+ {% endif %}
17
+ {% if site.cnzz %}
18
+ <script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_{{ site.cnzz }}'%3E%3C/span%3E%3Cscript src='https://v1.cnzz.com/z_stat.php%3Fid%3D{{ site.cnzz }}%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
19
+ {% endif %}
20
+ </section>
14
21
  </footer>
15
22
  <script src="//at.alicdn.com/t/font_3046306_4quk6r21fv8.js"></script>
23
+ {% include analytics.html %}
data/_includes/head.html CHANGED
@@ -11,8 +11,11 @@
11
11
  <meta property="og:url" content="{{ page.url | prepend: site.url }}">
12
12
  <meta property="og:description" content="{{ site.description }}">
13
13
  <meta property="og:site_name" content="{{ site.title }}">
14
- <link rel="stylesheet" href="//cdn.staticfile.org/normalize/6.0.0/normalize.min.css">
14
+ <link rel="Shortcut Icon" href="{{ site.favicon | prepend: site.baseurl }}">
15
+ <link rel="bookmark" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
16
+ <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/normalize.min.css">
15
17
  <link rel="stylesheet" href="{{ "/assets/css/plugins.min.css" | relative_url }}">
18
+ <link rel="preload" href="{{ "/assets/fonts/Merriweather-Regular.ttf" | relative_rul }}" as="font" crossorigin="anonymous">
16
19
  <link rel="stylesheet" href="{{ "/assets/css/app.min.css" | relative_url }}">
17
- <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
20
+ <script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
18
21
  </head>
@@ -4,8 +4,8 @@ refer to:
4
4
  - http://docs.mathjax.org/en/latest/options/index.html
5
5
  -->
6
6
  {% if site.mathjax %}
7
- <script type="text/javascript" async src="https://cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
8
-
7
+ <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
8
+ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
9
9
  <script type="text/x-mathjax-config">
10
10
  MathJax.Hub.Config({
11
11
  jax: ["input/TeX", "output/HTML-CSS"],
@@ -11,13 +11,16 @@
11
11
  <meta property="og:url" content="{{ page.url | prepend: site.url }}">
12
12
  <meta property="og:description" content="{{ site.description }}">
13
13
  <meta property="og:site_name" content="{{ site.title }}">
14
- <link rel="stylesheet" href="//cdn.staticfile.org/normalize/6.0.0/normalize.min.css">
14
+ <link rel="Shortcut Icon" href="{{ site.favicon | prepend: site.baseurl }}">
15
+ <link rel="bookmark" href="{{ site.favicon | prepend: site.baseurl }}" type="image/x-icon" />
16
+ <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/normalize.min.css">
15
17
  <link rel="stylesheet" href="//at.alicdn.com/t/font_roc50gemkxpw4s4i.css">
16
18
  <link rel="stylesheet" href="{{ "/assets/css/plugins.min.css" | relative_url }}">
19
+ <link rel="preload" href="{{ "/assets/fonts/Merriweather-Regular.ttf" | relative_rul }}" as="font" crossorigin="anonymous">
17
20
  <link rel="stylesheet" href="{{ "/assets/css/app.min.css" | relative_url }}">
18
- <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
19
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
20
- <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
21
+ <!-- <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"> -->
22
+ <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
23
+ <script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
21
24
  {% if site.mathjax %}
22
25
  {% include mathjax.html %}
23
26
  {% endif %}
@@ -0,0 +1,25 @@
1
+ ---
2
+ layout: page
3
+ home-title: Welcome to zhonger's blog!
4
+ description: Writing, writing, writing ...
5
+ permalink: /archives.html
6
+ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
7
+ ---
8
+
9
+ <h2>Archives</h2>
10
+
11
+ {% for post in site.posts %}
12
+
13
+ {% unless post.next %}
14
+ <h3>{{ post.date | date: '%Y' }}</h3>
15
+ {% else %}
16
+ {% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
17
+ {% capture nyear %}{{ post.next.date | date: '%Y' }}{% endcapture %}
18
+ {% if year != nyear %}
19
+ <h3>{{ post.date | date: '%Y' }}</h3>
20
+ {% endif %}
21
+ {% endunless %}
22
+
23
+ <li><p class="archives-title"><span class="archives-date">{{ post.date | date: "%b %-d, %Y" }} </span><a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a></p></li>
24
+
25
+ {% endfor %}
@@ -0,0 +1,118 @@
1
+ ---
2
+ layout: default
3
+ home-title: H2O Theme For Jekyll
4
+ description: 或许是最漂亮的Jekyll主题
5
+ ---
6
+
7
+ {% include header.html %}
8
+
9
+ <div
10
+ class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}"
11
+ data-theme="{{ site.theme-color }}"
12
+ style="{% if page.header-img %}background: url({{ page.header-img | relative_url }}) no-repeat center center; background-size: cover;{% endif %}"
13
+ >
14
+ <h2>{{ page.home-title }}</h2>
15
+ <h3>{{ page.description }}</h3>
16
+ </div>
17
+
18
+ <main class="g-container home-content">
19
+ <div class="article-list">
20
+ {% for post in paginator.posts %}
21
+ <article class="article-item">
22
+ {% if post.cover %}
23
+ <div class="post-cover">
24
+ <a class="post-link" href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
25
+ <img src="{{ post.cover | relative_url }}" href="{{ post.url | relative_url }}" alt="">
26
+ </div>
27
+ {% endif %}
28
+ <section class="post-preview">
29
+ <a class="post-link" href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
30
+ <h2 class="post-title">{{ post.title }}</h2>
31
+ {% if post.subtitle %}
32
+ <h3 class="post-subtitle">{{ post.subtitle }}</h3>
33
+ {% endif %}
34
+ {% if post.subtitle.size==0 or post.subtitle==nil %}
35
+ <p class="post-excerpt">{{ post.excerpt | strip_html | strip_newlines | truncate: 126}}</p>
36
+ {% endif %}
37
+ </section>
38
+ <footer class="post-meta">
39
+ <div class="post-tags">
40
+ {% if post.tags.size > 0 %}
41
+ {% for tag in post.tags %}
42
+ <a href={{ "/tags.html#" | append: tag | relative_url }} class="post-tag">{{ tag }}</a>
43
+ {% endfor %}
44
+ {% endif %}
45
+ </div>
46
+ <time class="post-date" datetime="{{ post.date | date:"%y-%m-%d" }}">{{ post.date | date_to_string }}</time>
47
+ </footer>
48
+ </article>
49
+ {% endfor %}
50
+
51
+ {% if paginator.total_pages > 1 %}
52
+ {% include pageNav.html %}
53
+ {% endif %}
54
+
55
+ </div>
56
+
57
+ <aside class="g-sidebar-wrapper">
58
+ <div class="g-sidebar">
59
+ <section class="author-card">
60
+ <div class="avatar">
61
+ <img src="{{ site.avatar | relative_url }}" alt="">
62
+ </div>
63
+ <div class="author-name" rel="author">{{ site.author }}</div>
64
+ <div class="bio">
65
+ <p>{{ site.bio }}</p>
66
+ </div>
67
+ {% if site.sns.size > 0 %}
68
+ <ul id="sns-links" class="sns-links">
69
+ {% for s in site.sns %}
70
+ <li>
71
+ <a href="{{ s[1] }}" target="_blank">
72
+ <svg class="icon" aria-hidden="true">
73
+ <use xlink:href="#icon-{{ s[0] }}"></use>
74
+ </svg>
75
+ </a>
76
+ </li>
77
+ {% endfor %}
78
+ </ul>
79
+ {% endif %}
80
+ </section>
81
+
82
+ {% if site.recommend-tags and site.tags.size>0 %}
83
+ <section class="tags-card">
84
+ {% for tag in site.tags %}
85
+ {% if forloop.index > site.recommend-condition-size %}
86
+ {% break %}
87
+ {% endif %}
88
+ <a href="{{ "tags.html#" | append: tag[0] | relative_url }}" class="tag">{{ tag[0]}}</a>
89
+ {% endfor %}
90
+ </section>
91
+ {% endif %}
92
+
93
+ {% if site.links.size > 0 %}
94
+ <section class="tags-card">
95
+ <div class="links" rel="links">Links</div>
96
+ {% for link in site.links %}
97
+ <a href="{{ link[1] }}" target="_blank" class="tag" rel="noreferrer"> {{ link[0] }} </a>
98
+ {% endfor %}
99
+ </section>
100
+ {% endif %}
101
+
102
+ </div>
103
+
104
+ {% if site.search %}
105
+ <div class="search-card">
106
+ <input id="search_input" type="text" placeholder="Search..." autocomplete="off">
107
+ <svg class="icon" aria-hidden="true">
108
+ <use xlink:href="#icon-search"></use>
109
+ </svg>
110
+ <div class="search_result"></div>
111
+ </div>
112
+ {% endif %}
113
+
114
+ </aside>
115
+
116
+ </main>
117
+
118
+ {% include footer.html %}
@@ -9,7 +9,7 @@
9
9
  <div class="visible">
10
10
  {{ content }}
11
11
  </div>
12
- <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
12
+ <script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
13
13
  <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
14
14
  <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
15
15
  </body>
data/_layouts/page.html CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="zh-cn">
2
+ <html lang="{{ site.language }}">
3
3
  {% include head.html %}
4
4
  <body>
5
5
 
@@ -86,7 +86,7 @@
86
86
 
87
87
  {% include footer.html %}
88
88
 
89
- <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
89
+ <script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
90
90
  <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
91
91
  <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
92
92
  </body>
data/_layouts/post.html CHANGED
@@ -26,7 +26,11 @@
26
26
  <time class="post-meta-item" datetime="{{ page.date | date:"%y-%m-%d" }}"><i class="iconfont icon-date"></i>{{ page.date | date_to_rfc822 }}</time>
27
27
  </div>
28
28
  <div class="post-meta">
29
+ {% if site.language == 'zh-cn' %}
29
30
  <span>本文总共 {{ page.content | strip_html | strip_newlines | remove: " " | size }} 字 <b>·</b> 阅读全文大约需要 {{ page.content | strip_html | strip_newlines | remove: " " | size | divided_by: 350 | plus: 1 }} 分钟</span>
31
+ {% else %}
32
+ <span>There are {{ page.content | strip_html | strip_newlines | remove: " " | size }} words totally <b>·</b> It may needs {{ page.content | strip_html | strip_newlines | remove: " " | size | divided_by: 350 | plus: 1 }} minutes</span>
33
+ {% endif %}
30
34
  </div>
31
35
  </div>
32
36
  {% if page.cover %}
@@ -149,8 +153,7 @@
149
153
 
150
154
  <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
151
155
  <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
152
- <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
153
- <script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
156
+ <script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
154
157
  <script>
155
158
  // 给图片添加链接
156
159
  $(document).ready(function() {
data/_layouts/rss.xml ADDED
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
3
+ <channel>
4
+ <title>{{ site.title | xml_escape }}</title>
5
+ <description>{{ site.description | xml_escape }}</description>
6
+ <link>{{ site.url }}{{ "/" | relative_url }}/</link>
7
+ <atom:link href="{{ "/feed.xml" | relative_url | prepend: site.url }}" rel="self" type="application/rss+xml" />
8
+ <pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
9
+ <lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
10
+ <generator>Jekyll v{{ jekyll.version }}</generator>
11
+ {% for post in site.posts limit:10 %}
12
+ <item>
13
+ <title>{{ post.title | xml_escape }}</title>
14
+ <description>{{ post.content | xml_escape }}</description>
15
+ <pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
16
+ <link>{{ post.url | relative_url | prepend: site.url }}</link>
17
+ <guid isPermaLink="true">{{ post.url | relative_url | prepend: site.url }}</guid>
18
+ {% for tag in post.tags %}
19
+ <category>{{ tag | xml_escape }}</category>
20
+ {% endfor %}
21
+ {% for cat in post.categories %}
22
+ <category>{{ cat | xml_escape }}</category>
23
+ {% endfor %}
24
+ </item>
25
+ {% endfor %}
26
+ </channel>
27
+ </rss>
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Tags
3
+ layout: default
4
+ ---
5
+
6
+ {% include header.html %}
7
+
8
+ <div class="g-banner tags-banner {{ site.postPatterns | prepend: 'post-pattern-' }} {{ site.theme-color | prepend: 'bgcolor-' }}" data-theme="{{ site.theme-color }}">
9
+ <h2>TAGS</h2>
10
+ </div>
11
+
12
+ <main class="tags-content">
13
+
14
+ <ul class="tags-list">
15
+ <li>
16
+ {% if site.recommend-tags and site.tags.size>0 %}
17
+ {% for tag in site.tags %}
18
+ <a href="#{{ tag[0] }}" class="tag">{{ tag[0]}}</a>
19
+ {% endfor %}
20
+ {% endif %}
21
+ </li>
22
+
23
+ {% for tag in site.tags %}
24
+ <li>
25
+ <span class="tag-name" id="{{ tag[0] }}">「{{ tag[0] }}」</span>
26
+ {% for post in tag[1] %}
27
+ <a class="tag-post" href="{{ post.url | relative_url }}" title="{{ post.title }}">{{ post.title }}</a>
28
+ {% endfor %}
29
+ </li>
30
+ {% endfor%}
31
+ </ul>
32
+ </main>
33
+
34
+ {% include footer.html %}