jekyll-zeta 0.2.1 → 0.2.3

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: 2d3c487006a9e34fab0deef16a995d8e868624b2d5d881175c55738a557b3513
4
- data.tar.gz: cfcede343380166c8a4a56aba8f72aa64c05a0627bc88a852a1a8e7987929703
3
+ metadata.gz: dd867aac5a15a7ff1f120aed495f10de9972ca7d3cd290650d7da88045d7a5bc
4
+ data.tar.gz: beb28b3a05186abace2b5e4e12b3289856363b123534a77af6da2c2e160389ee
5
5
  SHA512:
6
- metadata.gz: c65cbcab573a931db5b96fcbb6e7ec97e82de1995587726c957272b109c9dc6956751d0025ef190dc54cbe578dab7ac9c165a26ee7d1126ffaf2e4cf80777ad0
7
- data.tar.gz: d7e4bd42f4b5c329c8c6cfb06280d30635c2e82665560c07ee298433665474f51272050dea4f665fbaf68249a2a6daf5512ea1a411aad1c306092944923f4446
6
+ metadata.gz: 1ccc781de9ddaa41c5d5aea4a0d144374e54a115ace21ba8b60cc0cd919e5d398e356e0bb263eac242e78bcdbd7be208d1d6ec1a0b75a5909a5c4fac6daa1124
7
+ data.tar.gz: 0be27273a1963ee4e746a0986dca7d1f70a054244b7388a4f948576748be285bfeb1fe5f4ce3041e042bdaca08dda24d959569149b4e87b5434307209aad1263
data/_config.yml CHANGED
@@ -29,6 +29,7 @@ theme_config:
29
29
  archive_title_date_format: "%m-%d"
30
30
  tags_layout_style: 'auto' # flat auto list
31
31
  combine_css_html: false
32
+ show_more_text: 'Show more...'
32
33
  menu:
33
34
  - title: 主页
34
35
  url: /
@@ -19,7 +19,7 @@
19
19
  </li>
20
20
  {%- endfor -%}
21
21
  {%- if include.show_more and limit_exceeded -%}
22
- <li><a href="{{ include.show_more_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
22
+ <li class="postlistli"><a href="{{ include.show_more_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
23
23
  {%- endif -%}
24
24
  </ul>
25
25
  {%- endif -%}
data/_layouts/home.html CHANGED
@@ -8,7 +8,7 @@ layout: default
8
8
  include post_list.html
9
9
  limit=10
10
10
  show_more=true
11
- show_more_text="MORE"
11
+ show_more_text=site.theme_config.show_more_text
12
12
  show_more_url="archive.html"
13
13
  -%}
14
14
 
data/_layouts/tags.html CHANGED
@@ -5,6 +5,18 @@ layout: default
5
5
  <div class="post">
6
6
  <h1>{{page.title}}</h1>
7
7
  <article>
8
+ {% comment %}
9
+ sort tags by count
10
+ {% endcomment %}
11
+
12
+ {% capture tagsStr %}
13
+ {% for tag in site.tags %}
14
+ {{ tag[1].size | plus: 10000 }}#{{ tag[0] }}#{{ tag[1].size }}@@
15
+ {% endfor %}
16
+ {% endcapture %}
17
+
18
+ {% assign sortedtags = tagsStr | split:'@@' | sort %}
19
+
8
20
 
9
21
  {% assign layouttype = site.theme_config.tags_layout_style | default: "auto" %}
10
22
 
@@ -17,26 +29,33 @@ layout: default
17
29
  {% endif %}
18
30
  {% if layouttype == 'flat' %}
19
31
  {% assign counter = 0 %}
20
- {% for item in site.tags %}
21
-
22
- {% assign counter2 = counter | modulo: 4 %}
23
- {% if counter2 == 3 %}
24
- <p>
25
- {% endif %}
26
- {% capture counter %}{% increment counter %} {% endcapture %}
32
+ {% for tag in sortedtags reversed %}
33
+ {% assign tagitems = tag | split: '#' %}
34
+ {% assign tagname = tagitems[1] %}
35
+ {% assign tagnameCount = tagitems[2] %}
36
+ {% assign counter2 = counter | modulo: 4 %}
37
+ {% if counter2 == 3 %}
38
+ <p>
39
+ {% endif %}
40
+ {% capture counter %}{% increment counter %} {% endcapture %}
27
41
 
28
42
 
29
- <text><a href ="{{'/tags'|relative_url}}/{{ item[0]}}.html" >{{ item[0]}}</a></text> &nbsp; &nbsp;
43
+ <text><a href ="{{'/tags'|relative_url}}/{{ tagname}}.html" >{{ tagname}}</a> <sup>{{ tagnameCount }}</sup></text> &nbsp; &nbsp;
30
44
 
31
45
  {% endfor %}
32
46
  {% else %}
33
47
  <ul class="postlistul" >
34
- {% for item in site.tags %}
35
- {% assign tagname = item[0] %}
48
+
49
+
50
+ {% for tag in sortedtags reversed %}
51
+
52
+ {% assign tagitems = tag | split: '#' %}
53
+ {% assign tagname = tagitems[1] %}
54
+ {% assign tagnameCount = tagitems[2] %}
36
55
  <li class="postlistli">
37
56
  <text>
38
57
  <a href ="{{ site['baseurl']}}/tags/{{ item[0]}}.html" >{{ tagname}}</a>
39
- <sup> {{ site.tags[tagname].size }} </sup>
58
+ <sup> {{ tagnameCount }} </sup>
40
59
  </text> &nbsp;
41
60
  </li>
42
61
  {% endfor %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock