jekyll-zeta 0.2.3 → 0.3.1

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: dd867aac5a15a7ff1f120aed495f10de9972ca7d3cd290650d7da88045d7a5bc
4
- data.tar.gz: beb28b3a05186abace2b5e4e12b3289856363b123534a77af6da2c2e160389ee
3
+ metadata.gz: cf97e99c112816acab26b6cd200998299ae18d3e7675f13169a846bb3defc855
4
+ data.tar.gz: 889f162716e1d36e4dbb630721e4c886fa9b8ed25377f9d73b273b59df29efc0
5
5
  SHA512:
6
- metadata.gz: 1ccc781de9ddaa41c5d5aea4a0d144374e54a115ace21ba8b60cc0cd919e5d398e356e0bb263eac242e78bcdbd7be208d1d6ec1a0b75a5909a5c4fac6daa1124
7
- data.tar.gz: 0be27273a1963ee4e746a0986dca7d1f70a054244b7388a4f948576748be285bfeb1fe5f4ce3041e042bdaca08dda24d959569149b4e87b5434307209aad1263
6
+ metadata.gz: d6dfde865adec922758dae8091de292c44b06043db84ab7b411f5e84f0c894e72df544931339ceb671f5227c0f94ed8def73992f9a0c0c9655a2ca1d031fac64
7
+ data.tar.gz: b0657964d6fc4ef9ae45ca64f56029815ce81ea4024c7a3482b4787f15eef961e1f5c863f7aae3f42020b96374c77de3bcd42f790f2c7efd26023216852411af
data/_config.yml CHANGED
@@ -29,26 +29,31 @@ 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
+ show_more_text: 'show more ...'
33
+ next_page_title: "next"
34
+ previous_page_title: "previous"
33
35
  menu:
34
- - title: 主页
36
+ - title: Home
35
37
  url: /
36
- - title: 归档
38
+ - title: Achive
37
39
  url: /archive.html
38
- - title: 标签
40
+ - title: Tags
39
41
  url: /tags.html
40
- - title: 关于
42
+ - title: About
41
43
  url: /about.html
42
44
 
43
45
  #
44
46
  # forbid_cache_password: true
45
47
 
46
48
 
49
+ permalink: "/post/:year/:month/:day/:title:output_ext"
47
50
 
48
-
51
+ paginate: 7
52
+ paginate_path: "/pages/p:num/"
49
53
 
50
54
  plugins:
51
55
  - no-style-please2-plugins
56
+ - jekyll-paginate
52
57
  # - jekyll-seo-tag
53
58
 
54
59
 
@@ -0,0 +1,31 @@
1
+
2
+ {%-assign posts = include.collection -%}
3
+ {%- if posts.size > 0 -%}
4
+
5
+ {% assign ymPre = "" %}
6
+ {% assign archive_date_format = site.theme_config.archive_date_format | default: "%Y" %}
7
+
8
+ {% assign archive_date_titleformat = site.theme_config.archive_title_date_format | default: "%m-%d" %}
9
+
10
+ <ul class="postlistul">
11
+ {%- for post in posts limit: include.limit -%}
12
+ {% assign ymCur = post.date | date: archive_date_format %}
13
+ {% if ymCur != ymPre %}
14
+ {% if ymPre != "" %}
15
+ </ul>
16
+ {% endif %}
17
+ <li class="postlistli"><h2>{{ymCur}}</h2></li>
18
+ <ul class="postlistul">
19
+ {% endif %}
20
+ {% assign ymPre = ymCur %}
21
+
22
+ <li class="postlistli">
23
+ <a href="{{ post.url | relative_url }}">{{ post.title | downcase }}</a>
24
+ <date datetime="{{post.date}}">{{- post.date | date: archive_date_titleformat }}</date>
25
+ </li>
26
+
27
+ {%- endfor -%}
28
+ </ul>
29
+ {%- endif -%}
30
+
31
+
@@ -1,5 +1,5 @@
1
- {%-if include.category-%}
2
- {%-assign posts = site.categories[include.category]-%}
1
+ {%-if include.collection-%}
2
+ {%-assign posts = include.collection-%}
3
3
  {%-else-%}
4
4
  {%-assign posts = site.posts-%}
5
5
  {%-endif-%}
@@ -19,7 +19,7 @@
19
19
  </li>
20
20
  {%- endfor -%}
21
21
  {%- if include.show_more and limit_exceeded -%}
22
- <li class="postlistli"><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 | relative_url }}">{{ include.show_more_text | default: "Show more..." }}</a></li>
23
23
  {%- endif -%}
24
24
  </ul>
25
25
  {%- endif -%}
@@ -4,35 +4,14 @@ layout: default
4
4
 
5
5
  {%-include back_link.html-%}
6
6
 
7
- <h1>{{ page.title }}</h1>
7
+ <h2>{{ page.title }}</h2>
8
8
 
9
9
 
10
10
  {%-assign posts = site.posts-%}
11
11
  {%- if posts.size > 0 -%}
12
-
13
- {% assign ymPre = "" %}
14
- {% capture archive_date_format %} {{ site.theme_config.archive_date_format | default: "%Y"}}{% endcapture %}
15
-
16
- {% capture archive_date_titleformat %} {{ site.theme_config.archive_title_date_format | default: "%m-%d"}}{% endcapture %}
17
- <ul class="postlistul">
18
- {%- for post in posts limit: include.limit -%}
19
- {% capture ymCur %} {{post.date | date: archive_date_format}} {% endcapture %}
20
- {% if ymCur != ymPre %}
21
- {% if ymPre != "" %}
22
- </ul>
23
- {% endif %}
24
- <li class="postlistli"><h2>{{ymCur}}</h2></li>
25
- <ul class="postlistul">
26
- {% endif %}
27
- {% assign ymPre = ymCur %}
28
-
29
- <li class="postlistli">
30
- <a href="{{ post.url | relative_url }}">{{ post.title | downcase }}</a>
31
- <date datetime="{{post.date}}">{{- post.date | date: archive_date_titleformat }}</date>
32
- </li>
33
-
34
- {%- endfor -%}
35
- </ul>
12
+ {% include archive_list.html
13
+ collection=posts
14
+ %}
36
15
  {%- endif -%}
37
16
 
38
17
 
data/_layouts/home.html CHANGED
@@ -2,14 +2,16 @@
2
2
  layout: default
3
3
  ---
4
4
 
5
- <h1>{{ page.title }}</h1>
5
+ <h2>{{ page.title }}</h2>
6
+
7
+ {%-assign nextPage = site.paginate_path | replace: ':num', '2' -%}
6
8
 
7
9
  {%
8
10
  include post_list.html
9
- limit=10
11
+ limit=site.paginate
10
12
  show_more=true
11
13
  show_more_text=site.theme_config.show_more_text
12
- show_more_url="archive.html"
14
+ show_more_url= nextPage
13
15
  -%}
14
16
 
15
17
  {{ content }}
data/_layouts/page.html CHANGED
@@ -4,6 +4,6 @@ layout: default
4
4
 
5
5
  {%-include back_link.html-%}
6
6
 
7
- <h1>{{ page.title }}</h1>
7
+ <h2>{{ page.title }}</h2>
8
8
 
9
9
  {{ content }}
@@ -0,0 +1,45 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+
6
+ <h1>{{ page.title }}</h1>
7
+
8
+ {%-assign nextPage = site.paginate_path | replace: ':num', '2' -%}
9
+
10
+ {%
11
+ include archive_list.html
12
+ collection=paginator.posts
13
+ limit=site.paginate
14
+ -%}
15
+
16
+
17
+
18
+ {{ content }}
19
+
20
+
21
+ <div class="pagebar">
22
+
23
+ {% if paginator.previous_page %}
24
+ <a href="{{ paginator.previous_page_path | relative_url}}" class="previous">
25
+ {{ site.theme_config.previous_page_title | default: "Previous" }}
26
+ </a>
27
+ {% else %}
28
+ <span class="previous">
29
+ {{ site.theme_config.previous_page_title | default: "Previous" }}
30
+ </span>
31
+ {% endif %}
32
+ <span class="page_number ">
33
+ {{ paginator.page }}/{{ paginator.total_pages }}
34
+ </span>
35
+ {% if paginator.next_page %}
36
+ <a href="{{ paginator.next_page_path | relative_url }}" class="next">
37
+ {{ site.theme_config.next_page_title | default: "Next" }}
38
+ </a>
39
+ {% else %}
40
+ <span class="next ">
41
+ {{ site.theme_config.next_page_title | default: "Next" }}
42
+ </span>
43
+ {% endif %}
44
+ </div>
45
+
data/_layouts/post.html CHANGED
@@ -6,7 +6,7 @@ layout: default
6
6
  <article>
7
7
 
8
8
 
9
- <h1>{{ page.title }}</h1>
9
+ <h2>{{ page.title }}</h2>
10
10
  <time datetime="{{ page.date }}">{{ page.date | date: site.theme_config.post_date_format }}</time> &nbsp; &nbsp;
11
11
  {% for tag in page.tags %}
12
12
  {% capture tag_name %}{{ tag }}{% endcapture %}
@@ -2,7 +2,7 @@
2
2
  layout: default
3
3
  ---
4
4
  <ariticle>
5
- <h1>Tag: {{ page.tag }}</h1>
5
+ <h2>Tag: {{ page.tag }}</h2>
6
6
 
7
7
  <ul class="postlistul">
8
8
  {% for post in site.tags[page.tag] %}
@@ -12,10 +12,7 @@ layout: default
12
12
  </li>
13
13
  {% endfor %}
14
14
 
15
- {% if site.theme_config.tag_showall %}
16
- <li class="postlistli"><a href="{{ site.baseurl }}/{{site.theme_config.all_tags_path | default:'tags' }}"> {{site.theme_config.all_tags_title | default:'All Tags' }}</a>
17
- </li>
18
- {% endif %}
15
+
19
16
  </ul>
20
17
  </ariticle>
21
18
 
data/_layouts/tags.html CHANGED
@@ -3,7 +3,7 @@ layout: default
3
3
  ---
4
4
  {%-include back_link.html -%}
5
5
  <div class="post">
6
- <h1>{{page.title}}</h1>
6
+ <h2>{{page.title}}</h2>
7
7
  <article>
8
8
  {% comment %}
9
9
  sort tags by count
@@ -54,7 +54,7 @@ layout: default
54
54
  {% assign tagnameCount = tagitems[2] %}
55
55
  <li class="postlistli">
56
56
  <text>
57
- <a href ="{{ site['baseurl']}}/tags/{{ item[0]}}.html" >{{ tagname}}</a>
57
+ <a href ="{{'/tags'|relative_url}}/{{ tagname}}.html" >{{ tagname}}</a>
58
58
  <sup> {{ tagnameCount }} </sup>
59
59
  </text> &nbsp;
60
60
  </li>
data/assets/css/main.css CHANGED
@@ -101,4 +101,18 @@ li{
101
101
 
102
102
  date {
103
103
  color: #333;
104
+ }
105
+
106
+ .pagebar{
107
+ margin-top: 2rem;
108
+ display: flex;
109
+ float:right;
110
+ align-items:baseline;
111
+ }
112
+
113
+ .page_number{
114
+ color: #333;
115
+ padding-left: 10px;
116
+ padding-right: 10px;
117
+ text-align: center;
104
118
  }
data/index.html ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ layout: paginate
3
+ ---
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-zeta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-20 00:00:00.000000000 Z
11
+ date: 2022-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-paginate
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: no-style-please2-plugins
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: 0.5.0
47
+ version: 0.6.0
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: 0.5.0
54
+ version: 0.6.0
41
55
  description:
42
56
  email:
43
57
  - r
@@ -48,6 +62,7 @@ files:
48
62
  - LICENSE.txt
49
63
  - README.md
50
64
  - _config.yml
65
+ - _includes/archive_list.html
51
66
  - _includes/back_link.html
52
67
  - _includes/collecttags.html
53
68
  - _includes/encrypted.html
@@ -61,11 +76,13 @@ files:
61
76
  - _layouts/default.html
62
77
  - _layouts/home.html
63
78
  - _layouts/page.html
79
+ - _layouts/paginate.html
64
80
  - _layouts/post.html
65
81
  - _layouts/tagpage.html
66
82
  - _layouts/tags.html
67
83
  - assets/css/main.css
68
84
  - assets/js/mouse_coords.js
85
+ - index.html
69
86
  homepage: https://github.com/vitock/jekyll-zeta
70
87
  licenses:
71
88
  - GPL