jekyll-theme-bootstrap4 0.0.10 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_includes/post.html +1 -1
- data/_plugins/category_filter.rb +4 -4
- data/_plugins/category_generator.rb +11 -8
- data/_plugins/tag_filter.rb +4 -4
- data/_plugins/tag_generator.rb +11 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 568a47ba4252f1657f3e42e078ef34531c0dfae2176a54b4f8cf2420afbe2346
|
4
|
+
data.tar.gz: fc5b7fdf37a9a32b8e4fa493ca4ef48823a77806796be87fc3ae63f8ab5f874d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5084ec5e643d015996e2bf91319c52503564719dfd0862ca64137e0abbf2f2110be75ad9935dcfdc32ab50d4cec73aa55a195b6fe48f5ceacfcf6b7f2a0f9de
|
7
|
+
data.tar.gz: 6f261e646a1c138397c72b8416b571454f6a4459d11e3a7d7db484ce2137c1f72329292ad354aa7bd1fe33b3d1a3cb3e4a57c8961fb523bba6688e92a7f56950
|
data/_includes/post.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
<div itemprop="articleBody">
|
5
5
|
{% if page.type == "home" and site.excerpts %}
|
6
6
|
{{ include.post.excerpt | markdownify }}
|
7
|
-
<p><a href="{{ post.url }}">Read more…</a></p>
|
7
|
+
<p><a href="{{ include.post.url | relative_url }}">Read more…</a></p>
|
8
8
|
{% else %}
|
9
9
|
{{ include.post.content | markdownify }}
|
10
10
|
{% endif %}
|
data/_plugins/category_filter.rb
CHANGED
@@ -2,11 +2,11 @@ module Jekyll
|
|
2
2
|
module CategoryFilter
|
3
3
|
def category_url(category)
|
4
4
|
site = @context.registers[:site]
|
5
|
-
if site.config[
|
6
|
-
"#{site.config[
|
5
|
+
if site.config["categories_dir"]
|
6
|
+
"#{site.config["url"]}/#{site.config["categories_dir"]}/#{category.tr(" ", "-")}/"
|
7
7
|
else
|
8
|
-
"#{site.config[
|
9
|
-
end.gsub(/\/\/+/).with_index { |_, i| i.zero? ?
|
8
|
+
"#{site.config["url"]}/categories/#{category.tr(" ", "-")}/"
|
9
|
+
end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? "//" : "/" }
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -4,12 +4,12 @@ module Jekyll
|
|
4
4
|
@site = site
|
5
5
|
@base = base
|
6
6
|
@dir = dir
|
7
|
-
@name =
|
7
|
+
@name = "index.html"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
process(@name)
|
10
|
+
read_yaml(File.join(base, "_layouts"), "category.html")
|
11
|
+
data["category"] = category
|
12
|
+
data["title"] = "Posts in “#{category.capitalize}”"
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -17,9 +17,12 @@ module Jekyll
|
|
17
17
|
safe true
|
18
18
|
|
19
19
|
def generate(site)
|
20
|
-
if site.layouts.key?(
|
21
|
-
dir = site.config[
|
22
|
-
site.categories.keys.each
|
20
|
+
if site.layouts.key?("category")
|
21
|
+
dir = site.config["categories_dir"] || "categories"
|
22
|
+
site.categories.keys.each do |category|
|
23
|
+
page = CategoryPage.new(site, site.source, File.join(dir, category.tr(" ", "-")), category)
|
24
|
+
site.pages << page
|
25
|
+
end
|
23
26
|
end
|
24
27
|
end
|
25
28
|
end
|
data/_plugins/tag_filter.rb
CHANGED
@@ -2,11 +2,11 @@ module Jekyll
|
|
2
2
|
module TagFilter
|
3
3
|
def tag_url(tag)
|
4
4
|
site = @context.registers[:site]
|
5
|
-
if site.config[
|
6
|
-
"#{site.config[
|
5
|
+
if site.config["tags_dir"]
|
6
|
+
"#{site.config["url"]}/#{site.config["tags_dir"]}/#{tag.tr(" ", "-")}/"
|
7
7
|
else
|
8
|
-
"#{site.config[
|
9
|
-
end.gsub(/\/\/+/).with_index { |_, i| i.zero? ?
|
8
|
+
"#{site.config["url"]}/tags/#{tag.tr(" ", "-")}/"
|
9
|
+
end.gsub(/\/\/+/).with_index { |_, i| i.zero? ? "//" : "/" }
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
data/_plugins/tag_generator.rb
CHANGED
@@ -4,12 +4,12 @@ module Jekyll
|
|
4
4
|
@site = site
|
5
5
|
@base = base
|
6
6
|
@dir = dir
|
7
|
-
@name =
|
7
|
+
@name = "index.html"
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
process(@name)
|
10
|
+
read_yaml(File.join(base, "_layouts"), "tag.html")
|
11
|
+
data["tag"] = tag
|
12
|
+
data["title"] = "Posts tagged with “#{tag}”"
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -17,9 +17,12 @@ module Jekyll
|
|
17
17
|
safe true
|
18
18
|
|
19
19
|
def generate(site)
|
20
|
-
if site.layouts.key?(
|
21
|
-
dir = site.config[
|
22
|
-
site.tags.keys.each
|
20
|
+
if site.layouts.key?("tag")
|
21
|
+
dir = site.config["tags_dir"] || "tags"
|
22
|
+
site.tags.keys.each do |tag|
|
23
|
+
page = TagPage.new(site, site.source, File.join(dir, tag.tr(" ", "-")), tag)
|
24
|
+
site.pages << page
|
25
|
+
end
|
23
26
|
end
|
24
27
|
end
|
25
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-bootstrap4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon de C Valle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
|
-
rubygems_version: 3.
|
155
|
+
rubygems_version: 3.5.22
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: A Bootstrap-based Jekyll theme.
|