jekyll-category-pages 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/jekyll-category-pages/version.rb +2 -2
- data/lib/jekyll/category_pages.rb +2 -2
- metadata +11 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92149234213dba5b4f5761c1cd0638cd581bf81a9712bc85caec52b896709613
|
4
|
+
data.tar.gz: 519fcfe6ccbc7d0824147ff9ed625184727a5908dd75ec6c064a0c67d34e6e8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b8395dfb880171e8faeec0fce33664bd53f090f2e901385d6fe82cb64bb6fcd333b8f35d1fb861a2902b77845a4d5ee6c992625e8535f841f0e755483f93a34
|
7
|
+
data.tar.gz: 14ab2ce2009caddde52da4bc62f2b5692d63a68ba0070d3417dad78ac3dc8f9c0c73da8a05c8667f30143e77bef7a856d377ec323825125e8bd17019683ddf0a
|
data/README.md
CHANGED
@@ -22,9 +22,9 @@ categories: [Category Pages Plugin, jekyll]
|
|
22
22
|
Generate the site and the category pages are generated:
|
23
23
|
```
|
24
24
|
_site/category/
|
25
|
-
├──
|
25
|
+
├── category-pages-plugin/
|
26
26
|
│ └── index.html
|
27
|
-
├──
|
27
|
+
├── 好的主意/
|
28
28
|
│ └── index.html
|
29
29
|
└── jekyll/
|
30
30
|
├── index.html
|
@@ -136,12 +136,12 @@ created as follows:
|
|
136
136
|
```html
|
137
137
|
<ul>
|
138
138
|
{% for category in site.categories %}
|
139
|
-
<li><a href="{{ site.url }}/category/{{ category | first |
|
139
|
+
<li><a href="{{ site.url }}/category/{{ category | first | slugify }}/index.html">{{ category | first }}</a></li>
|
140
140
|
{% endfor %}
|
141
141
|
</ul>
|
142
142
|
```
|
143
143
|
Note that the category page paths are URL-encoded when generated by
|
144
|
-
this plugin. Thus, you have to use `
|
144
|
+
this plugin. Thus, you have to use `slugify` when linking to each
|
145
145
|
category. This saves you from problems with spaces or other special
|
146
146
|
characters in category names.
|
147
147
|
|
@@ -158,7 +158,7 @@ are just strings and can thus be added as follows (with references):
|
|
158
158
|
```html
|
159
159
|
<ul>
|
160
160
|
{% for category in page.categories %}
|
161
|
-
<li><a href="{{ site.url }}/path-to-category-index/{{ category |
|
161
|
+
<li><a href="{{ site.url }}/path-to-category-index/{{ category | slugify }}/index.html">{{ category }}</a></li>
|
162
162
|
{% endfor %}
|
163
163
|
</ul>
|
164
164
|
```
|
@@ -7,13 +7,13 @@
|
|
7
7
|
# Add category index pages with and without pagination.
|
8
8
|
#
|
9
9
|
# (c) since 2017 by Tamanguu GmbH & Co KG
|
10
|
-
# Written by Dr. Wolfram Schroers <Wolfram.Schroers -at-
|
10
|
+
# Written by Dr. Wolfram Schroers <Wolfram.Schroers -at- nua-schroers.de>
|
11
11
|
#
|
12
12
|
# See the accompanying file LICENSE for licensing conditions.
|
13
13
|
#
|
14
14
|
|
15
15
|
module Jekyll
|
16
16
|
module CategoryPages
|
17
|
-
VERSION = "1.0
|
17
|
+
VERSION = "1.1.0".freeze
|
18
18
|
end
|
19
19
|
end
|
@@ -69,7 +69,7 @@ module Jekyll
|
|
69
69
|
# Generate the pages
|
70
70
|
for category in categories
|
71
71
|
posts_in_category = site.categories[category]
|
72
|
-
category_path = File.join(category_base_path,
|
72
|
+
category_path = File.join(category_base_path, Utils.slugify(category))
|
73
73
|
per_page = site.config['paginate']
|
74
74
|
|
75
75
|
page_number = CategoryPager.calculate_pages(posts_in_category, per_page)
|
@@ -113,7 +113,7 @@ module Jekyll
|
|
113
113
|
# Generate the pages
|
114
114
|
for category in categories
|
115
115
|
posts_in_category = site.categories[category]
|
116
|
-
category_path = File.join(category_base_path,
|
116
|
+
category_path = File.join(category_base_path, Utils.slugify(category))
|
117
117
|
|
118
118
|
site.pages << CategoryIndexPage.new(site, category_path, INDEXFILE, category, category_layout, posts_in_category, false)
|
119
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-category-pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dr. Wolfram Schroers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -17,34 +17,34 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '4.0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '4.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: jekyll-paginate
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "~>"
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '1.1'
|
35
32
|
- - ">="
|
36
33
|
- !ruby/object:Gem::Version
|
37
34
|
version: 1.0.0
|
35
|
+
- - "~>"
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '1.1'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
41
|
requirements:
|
42
|
-
- - "~>"
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '1.1'
|
45
42
|
- - ">="
|
46
43
|
- !ruby/object:Gem::Version
|
47
44
|
version: 1.0.0
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.1'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rspec
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,8 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
|
-
|
99
|
-
rubygems_version: 2.7.6
|
98
|
+
rubygems_version: 3.0.3
|
100
99
|
signing_key:
|
101
100
|
specification_version: 4
|
102
101
|
summary: Add category index pages with and without pagination.
|