jekyll-whiteglass 1.4.2 → 1.5.0

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
- SHA1:
3
- metadata.gz: 1c89659d70c538c9f8d755055dc7e13ac1eeda96
4
- data.tar.gz: 161f24e98c9d37ac825a1ca940df3b781b7a1341
2
+ SHA256:
3
+ metadata.gz: f945fe5fdeebb7c7735e5ac97d67d9f42a3940158cce71a345f210871061ee5d
4
+ data.tar.gz: daec61afd0ec7015372173ebc435359787c6f20b31b9117180cba3689c919de7
5
5
  SHA512:
6
- metadata.gz: e70f4086236aba581eb69bcdb46174357c7787b1eeaea954d3b0e93dc00e0a2ba239d2675fc18b4cf7320874cf75e33383fbd8ee58777900c46f7bd145675b30
7
- data.tar.gz: 07f129b8beea6e642f643c20b505225e13e6deeea7415f0e403ec7491e8f5949572b95a253e35bdfaa8651f1e7fa9af32a24eeaa65f95d401beb9aca2415db28
6
+ metadata.gz: bfa7ecf365fcabb0acf46080e2f21b99bb9c0680025a88ccadd4df22e2c8f4453e8182358bccb7f58369481665688b1ec5a3d7cf7f4821e420d711bb2d3e5efd
7
+ data.tar.gz: d70c55727ccb6950be7c979910d946a17873c2921f300432d534b6241c4a20d42ed6dd2ed53ad6b138816fb5e05188f2e3d5482740702e4aab072959b13db400
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.5.0 (2017-12-27)
4
+
5
+ - Support tags (#17)
6
+
3
7
  ## 1.4.2 (2017-11-21)
4
8
 
5
9
  - Add some styling for tables (#15)
data/README.md CHANGED
@@ -65,9 +65,11 @@ gem install jekyll-whiteglass
65
65
  jekyll-archives:
66
66
  enabled:
67
67
  - categories
68
+ - tags
68
69
  layout: category_archives
69
70
  permalinks:
70
71
  category: /categories/:name/
72
+ tag: /tags/:name/
71
73
  ```
72
74
 
73
75
  4. Copy
@@ -197,6 +199,26 @@ categories:
197
199
  - Idea
198
200
  ```
199
201
 
202
+ ### Tag
203
+
204
+ Each post can have `tags` attribute. It can be a string or an array. This will
205
+ be displayed on index, archive and each post, and provide a link to the archive
206
+ of tag.
207
+
208
+ ``` yaml
209
+ layout: post
210
+ title: Awesome Post
211
+ tags: food
212
+ ```
213
+
214
+ ``` yaml
215
+ layout: post
216
+ title: Another Awesome Post
217
+ tags:
218
+ - food
219
+ - trip
220
+ ```
221
+
200
222
  ### Feed
201
223
 
202
224
  Create `<your-site>/feed.xml` with:
@@ -1,8 +1,21 @@
1
- {% for category in include.categories %}
2
- {% assign no_comma = forloop.last %}
3
- {% for archive in site.archives %}
4
- {% if archive.type == "category" and archive.title == category %}
5
- <a href="{{ archive.url | relative_url }}">{{ archive.title | escape }}</a>{% unless no_comma %},{% endunless %}
6
- {% endif %}
1
+ {% if include.categories != empty %}
2
+ {% for category in include.categories %}
3
+ {% assign no_comma = forloop.last %}
4
+ {% for archive in site.archives %}
5
+ {% if archive.type == "category" and archive.title == category %}
6
+ <a href="{{ archive.url | relative_url }}">{{ archive.title | escape }}</a>{% unless no_comma %},{% endunless %}
7
+ {% endif %}
8
+ {% endfor %}
7
9
  {% endfor %}
8
- {% endfor %}
10
+ {% endif %}
11
+
12
+ {% if include.tags != empty %} •
13
+ {% for tag in include.tags %}
14
+ {% assign no_comma = forloop.last %}
15
+ {% for archive in site.archives %}
16
+ {% if archive.type == "tag" and archive.title == tag %}
17
+ <a href="{{ archive.url | relative_url }}">{{ archive.title | escape }}</a>{% unless no_comma %},{% endunless %}
18
+ {% endif %}
19
+ {% endfor %}
20
+ {% endfor %}
21
+ {% endif %}
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
-
5
4
  <div class="home">
6
5
 
7
6
  <h1 class="page-heading">Blog Archive</h1>
@@ -16,7 +15,11 @@ layout: default
16
15
  {% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
17
16
 
18
17
  <li>
19
- <span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories != empty %} • {% include category_links.html categories=post.categories %}{% endif %}</span>
18
+ <span class="post-meta">
19
+ {{ post.date | date: "%b %-d, %Y" }}
20
+ {% if post.categories != empty or post.tags != empty %}
21
+ {% include category_links.html categories=post.categories tags=post.tags %}
22
+ {% endif %}</span>
20
23
 
21
24
  <h2>
22
25
  <a class="post-link" href="{{ post.url | relative_url }}"{% if lang != empty %} lang="{{ lang }}"{% endif %}>{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
@@ -13,7 +13,11 @@ layout: default
13
13
  {% capture lang %}{% if post_lang != site_lang %}{{ post_lang }}{% endif %}{% endcapture %}
14
14
 
15
15
  <li>
16
- <span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories %} • {% include category_links.html categories=post.categories %}{% endif %}</span>
16
+ <span class="post-meta">
17
+ {{ post.date | date: "%b %-d, %Y" }}
18
+ {% if post.categories != empty or post.tags != empty %}
19
+ {% include category_links.html categories=post.categories tags=post.tags %}
20
+ {% endif %}</span>
17
21
 
18
22
  <h2>
19
23
  <a class="post-link" href="{{ post.url | relative_url }}"{% if lang != empty %} lang="{{ lang }}"{% endif %}>{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
data/_layouts/home.html CHANGED
@@ -19,7 +19,7 @@ layout: default
19
19
  <a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}{% if post.external-url %} &rarr;{% endif %}</a>
20
20
  </h1>
21
21
 
22
- <p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories != empty %}{% include category_links.html categories=post.categories %}{% endif %}</p>
22
+ <p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.categories != empty or post.tags != empty %}{% include category_links.html categories=post.categories tags=post.tags %}{% endif %}</p>
23
23
  </header>
24
24
 
25
25
  <div class="post-content">
data/_layouts/post.html CHANGED
@@ -9,7 +9,7 @@ layout: default
9
9
  {% else %}
10
10
  <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
11
11
  {% endif %}
12
- <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.categories != empty %}{% include category_links.html categories=page.categories %}{% endif %}</p>
12
+ <p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.categories != empty or page.tags != empty %}{% include category_links.html categories=page.categories tags=page.tags %}{% endif %}</p>
13
13
  </header>
14
14
 
15
15
  <div class="post-content" itemprop="articleBody">
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-whiteglass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chayoung You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2017-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  requirements: []
148
148
  rubyforge_project:
149
- rubygems_version: 2.6.13
149
+ rubygems_version: 2.7.3
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: Minimal, responsive Jekyll theme for hackers.