Skip to content

Commit 4adaa97

Browse files
committed
Fix Gemfile dependencies for better compatibility
1 parent 9cf1ea1 commit 4adaa97

4 files changed

Lines changed: 41 additions & 23 deletions

File tree

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
source 'https://rubygems.org'
22

3-
gem 'jekyll', '~> 4.2'
3+
gem 'jekyll', '~> 4.0'
44
gem 'jekyll-dash', '~> 2.0'
55
gem 'jekyll-feed', '~> 0.15'
66
gem 'jekyll-sitemap', '~> 1.4'
7-
gem 'jekyll-tagging', '~> 1.1'
87

98
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
109
# and associated library.

_config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ markdown: kramdown
1313
plugins:
1414
- jekyll-feed
1515
- jekyll-sitemap
16-
- jekyll-tagging
17-
18-
# Tag settings
19-
tag_page_layout: tag_page
20-
tag_page_dir: tags
21-
tag_permalink_style: pretty
2216

2317
# Navigation
2418
nav:

_includes/post-tags.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% if page.tags and page.tags.size > 0 %}
2+
<div class="post-tags">
3+
<strong>Tags:</strong>
4+
{% for tag in page.tags %}
5+
<a href="{{ '/tags/' | relative_url }}#{{ tag | slugify }}" class="tag-link">{{ tag }}</a>{% unless forloop.last %}, {% endunless %}
6+
{% endfor %}
7+
</div>
8+
9+
<style>
10+
.post-tags {
11+
margin: 20px 0;
12+
padding: 15px;
13+
background: #f8f9fa;
14+
border-left: 4px solid #007acc;
15+
border-radius: 4px;
16+
}
17+
18+
.post-tags .tag-link {
19+
color: #007acc;
20+
text-decoration: none;
21+
padding: 2px 6px;
22+
background: #e9ecef;
23+
border-radius: 3px;
24+
font-size: 0.9em;
25+
margin: 0 2px;
26+
}
27+
28+
.post-tags .tag-link:hover {
29+
background: #dee2e6;
30+
text-decoration: none;
31+
}
32+
</style>
33+
{% endif %}

tags.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,14 @@ permalink: /tags/
66

77
# All Tags
88

9-
{% capture tags %}
10-
{% for tag in site.tags %}
11-
{{ tag[1].size | plus: 1000 }}#{{ tag[0] }}#{{ tag[1].size }}
12-
{% endfor %}
13-
{% endcapture %}
14-
{% assign sortedtags = tags | split:' ' | sort | reverse %}
15-
9+
{% assign tags = site.tags | sort %}
1610
<div class="tag-cloud">
17-
{% for tag in sortedtags %}
18-
{% assign tagitems = tag | split: '#' %}
19-
{% capture tagname %}{{ tagitems[1] }}{% endcapture %}
20-
{% capture tagcount %}{{ tagitems[2] }}{% endcapture %}
21-
11+
{% for tag in tags %}
12+
{% assign tagname = tag[0] %}
13+
{% assign posts = tag[1] %}
2214
<span class="tag-item">
23-
<a href="#{{ tagname | slugify }}" class="tag-link" data-count="{{ tagcount }}">
24-
{{ tagname }} ({{ tagcount }})
15+
<a href="#{{ tagname | slugify }}" class="tag-link" data-count="{{ posts.size }}">
16+
{{ tagname }} ({{ posts.size }})
2517
</a>
2618
</span>
2719
{% endfor %}
@@ -31,7 +23,7 @@ permalink: /tags/
3123

3224
## Posts by Tag
3325

34-
{% for tag in site.tags %}
26+
{% for tag in tags %}
3527
{% assign tagname = tag[0] %}
3628
{% assign posts = tag[1] %}
3729

0 commit comments

Comments
 (0)