jekyll_bootstrap5_tabs 1.1.0 → 1.1.1
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/.rubocop.yml +31 -0
- data/.vscode/launch.json +20 -0
- data/CHANGELOG.md +31 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +6 -5
- data/README.md +32 -33
- data/lib/jekyll_bootstrap5_tabs/version.rb +1 -1
- data/lib/jekyll_bootstrap5_tabs.rb +17 -17
- metadata +9 -8
- data/pkg/jekyll_bootstrap5_tabs-1.0.0.gem +0 -0
- data/pkg/jekyll_bootstrap5_tabs-1.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ee903a6b9132d44b95aa515db8a8730f966236af24a6509a38c5d2d689c6b74
|
4
|
+
data.tar.gz: 042c83afb00526d342e9ea277fd90e20f085e34f362e82c1b2f4d09cedfbb78b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 286f968d091b8632c85816c06298021f4b52bb9d71f14ee3a0cc310f33f38040a974b2e4732416ce7e2467a372e1a411fa5b72f798469cd8e96f1014279a1ce8
|
7
|
+
data.tar.gz: 83049504f8aa13fcd5da7964437309f0332ec06c4a92603a608c6bd1bfee54094cd082163d13cce70bff506646183d4d116d33c657fd1405392acd5de4639349
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require: rubocop-jekyll
|
2
|
+
inherit_gem:
|
3
|
+
rubocop-jekyll: .rubocop.yml
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
Exclude:
|
7
|
+
- vendor/**/*
|
8
|
+
- Gemfile*
|
9
|
+
NewCops: enable
|
10
|
+
TargetRubyVersion: 2.6
|
11
|
+
|
12
|
+
Layout/LineLength:
|
13
|
+
Max: 150
|
14
|
+
|
15
|
+
Layout/MultilineMethodCallIndentation:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Metrics/BlockLength:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Style/PercentLiteralDelimiters:
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
Style/RegexpLiteral:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Style/StringLiterals:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Style/StringLiteralsInInterpolation:
|
31
|
+
Enabled: false
|
data/.vscode/launch.json
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
{
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
3
|
+
// Hover to view descriptions of existing attributes.
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
5
|
+
"version": "0.2.0",
|
6
|
+
"configurations": [
|
7
|
+
{
|
8
|
+
"name": "Debug test/test3.rb",
|
9
|
+
"type": "Ruby",
|
10
|
+
"request": "launch",
|
11
|
+
"program": "test/test3.rb"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"name": "Debug test/test.rb",
|
15
|
+
"type": "Ruby",
|
16
|
+
"request": "launch",
|
17
|
+
"program": "${workspaceFolderBasename}/test/test.rb"
|
18
|
+
}
|
19
|
+
]
|
20
|
+
}
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
## 1.1.1 / 2022-03-14
|
2
|
+
* Using `Jekyll.logger` instead of `puts`
|
3
|
+
|
4
|
+
## 1.1.0 / 2022-03-13
|
5
|
+
* Added support for controlling pretty-printed output in `_config.yml`:
|
6
|
+
```yml
|
7
|
+
jekyll_bootstrap5_tabs
|
8
|
+
-pretty_print: true
|
9
|
+
```
|
10
|
+
|
11
|
+
## 1.0.0 / 2022-03-13
|
12
|
+
* Mike Slinn forked the project
|
13
|
+
* Made into a Ruby gem and published on RubyGems.org as [jekyll_pre](https://rubygems.org/gems/jekyll_pre).
|
14
|
+
* `bin/attach` script added for debugging
|
15
|
+
* Rubocop standards added
|
16
|
+
* Proper versioning and CHANGELOG.md added
|
17
|
+
|
18
|
+
## 0.1.6 2021-02-28
|
19
|
+
|
20
|
+
## 0.1.5 2021-02-28
|
21
|
+
|
22
|
+
## 0.1.4 2021-02-28
|
23
|
+
|
24
|
+
## 0.1.3 2021-02-28
|
25
|
+
|
26
|
+
## 0.1.2 2021-02-28
|
27
|
+
|
28
|
+
## 0.1.1 2021-02-28
|
29
|
+
|
30
|
+
## 0.1.0 2021-02-28
|
31
|
+
* Initial version published
|
data/Gemfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
source
|
3
|
+
source 'https://rubygems.org'
|
4
4
|
|
5
5
|
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
6
|
|
7
7
|
# The gem's dependencies are specified in jekyll_bootstrap5_tabs.gemspec
|
8
8
|
gemspec
|
9
9
|
|
10
|
-
gem
|
10
|
+
gem 'listen'
|
11
|
+
gem 'rake', '~> 13.0'
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jekyll_bootstrap5_tabs (1.
|
4
|
+
jekyll_bootstrap5_tabs (1.1.1)
|
5
5
|
jekyll (>= 3.0)
|
6
6
|
slim (~> 3.0)
|
7
7
|
|
@@ -19,9 +19,9 @@ GEM
|
|
19
19
|
ffi (1.15.5)
|
20
20
|
forwardable-extended (2.6.0)
|
21
21
|
http_parser.rb (0.8.0)
|
22
|
-
i18n (1.
|
22
|
+
i18n (1.10.0)
|
23
23
|
concurrent-ruby (~> 1.0)
|
24
|
-
jekyll (4.2.
|
24
|
+
jekyll (4.2.2)
|
25
25
|
addressable (~> 2.4)
|
26
26
|
colorator (~> 1.0)
|
27
27
|
em-websocket (~> 0.5)
|
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
rouge (~> 3.0)
|
37
37
|
safe_yaml (~> 1.0)
|
38
38
|
terminal-table (~> 2.0)
|
39
|
-
jekyll-sass-converter (2.
|
39
|
+
jekyll-sass-converter (2.2.0)
|
40
40
|
sassc (> 2.0.1, < 3.0)
|
41
41
|
jekyll-watch (2.2.1)
|
42
42
|
listen (~> 3.0)
|
@@ -75,7 +75,8 @@ PLATFORMS
|
|
75
75
|
|
76
76
|
DEPENDENCIES
|
77
77
|
jekyll_bootstrap5_tabs!
|
78
|
+
listen
|
78
79
|
rake (~> 13.0)
|
79
80
|
|
80
81
|
BUNDLED WITH
|
81
|
-
2.3.
|
82
|
+
2.3.7
|
data/README.md
CHANGED
@@ -111,7 +111,7 @@ The `jekyll_bootstrap5_tabs` plugin will generate code similar to the following.
|
|
111
111
|
```
|
112
112
|
|
113
113
|
### New for Version 1.1.0
|
114
|
-
By default, the output is not pretty-printed.
|
114
|
+
By default, the plugin output is not pretty-printed.
|
115
115
|
However, you can enable pretty-printing for a single set of tabs by including the `pretty` keyword in the `tabs` tag, like this:
|
116
116
|
```
|
117
117
|
{% tabs demo pretty %}
|
@@ -119,43 +119,30 @@ However, you can enable pretty-printing for a single set of tabs by including th
|
|
119
119
|
{% endtabs%}
|
120
120
|
```
|
121
121
|
|
122
|
-
You can enable pretty-printing for the entire site by adding the following to `_config.yaml`:
|
122
|
+
You can enable pretty-printing for the entire Jekyll site by adding the following to `_config.yaml`:
|
123
123
|
```yaml
|
124
124
|
jekyll_bootstrap5_tabs:
|
125
125
|
- pretty: true
|
126
126
|
```
|
127
127
|
|
128
128
|
|
129
|
-
##
|
129
|
+
## Installation
|
130
130
|
|
131
|
-
|
132
|
-
$ rake build jekyll_bootstrap5_tabs.gemspec
|
133
|
-
jekyll_bootstrap5_tabs 1.0.0 built to pkg/jekyll_bootstrap5_tabs-1.0.0.gem.
|
134
|
-
```
|
131
|
+
Add this line to your application's Gemfile, within the `jekyll_plugins` group:
|
135
132
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
```shell
|
142
|
-
$ gem install pkg/jekyll_bootstrap5_tabs-1.0.0.gem
|
143
|
-
Fetching slim-4.1.0.gem
|
144
|
-
Fetching temple-0.8.2.gem
|
145
|
-
Successfully installed temple-0.8.2
|
146
|
-
Successfully installed slim-4.1.0
|
147
|
-
Successfully installed jekyll_bootstrap5_tabs-1.0.0
|
148
|
-
Parsing documentation for temple-0.8.2
|
149
|
-
Installing ri documentation for temple-0.8.2
|
150
|
-
Parsing documentation for slim-4.1.0
|
151
|
-
Installing ri documentation for slim-4.1.0
|
152
|
-
Parsing documentation for jekyll_bootstrap5_tabs-1.0.0
|
153
|
-
Installing ri documentation for jekyll_bootstrap5_tabs-1.0.0
|
154
|
-
Done installing documentation for temple, slim, jekyll_bootstrap5_tabs after 0 seconds
|
155
|
-
3 gems installed
|
133
|
+
```ruby
|
134
|
+
group :jekyll_plugins do
|
135
|
+
gem 'jekyll_bootstrap5_tabs'
|
136
|
+
end
|
156
137
|
```
|
157
138
|
|
158
|
-
|
139
|
+
And then execute:
|
140
|
+
|
141
|
+
$ bundle install
|
142
|
+
|
143
|
+
Or install it yourself as:
|
144
|
+
|
145
|
+
$ gem install jekyll_bootstrap5_tabs
|
159
146
|
|
160
147
|
|
161
148
|
## Development
|
@@ -163,15 +150,27 @@ Now go use the gem in a Jekyll project!
|
|
163
150
|
After checking out the repo, run `bin/setup` to install dependencies.
|
164
151
|
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
165
152
|
|
166
|
-
To install this gem onto your local machine, run
|
167
|
-
|
168
|
-
|
169
|
-
|
153
|
+
To install this gem onto your local machine, run:
|
154
|
+
```
|
155
|
+
$ bundle exec rake install
|
156
|
+
```
|
157
|
+
|
158
|
+
To publicly release a new version:
|
159
|
+
|
160
|
+
1. Update the version number in `version.rb`
|
161
|
+
2. Commit changes to git.
|
162
|
+
3. Run:
|
163
|
+
```shell
|
164
|
+
$ bundle exec rake release
|
165
|
+
```
|
166
|
+
The above creates a git tag for the version,
|
167
|
+
pushes the created git tag to the git repo,
|
168
|
+
and pushes the new `.gem` file in `pkg/` to [RubyGems.org](https://rubygems.org).
|
170
169
|
|
171
170
|
|
172
171
|
## Contributing
|
173
172
|
|
174
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/mslinn/
|
173
|
+
Bug reports and pull requests are welcome on GitHub at [`github.com/mslinn/jekyll_bootstrap5_tabs`](https://github.com/mslinn/jekyll_bootstrap5_tabs).
|
175
174
|
|
176
175
|
|
177
176
|
## License
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'slim'
|
4
|
-
require_relative
|
4
|
+
require_relative 'jekyll_bootstrap5_tabs/version'
|
5
5
|
|
6
6
|
DEFAULT_TEMPLATE = 'template.slim'
|
7
7
|
|
@@ -11,30 +11,30 @@ module JekyllBootstrap5Tabs
|
|
11
11
|
def initialize(tag, args, _)
|
12
12
|
super
|
13
13
|
|
14
|
-
raise SyntaxError
|
14
|
+
raise SyntaxError, "#{tag} requires name" if args.empty?
|
15
15
|
|
16
16
|
argv = args.strip.split ' '
|
17
|
-
@tab_name = argv[0]
|
17
|
+
@tab_name = argv[0]
|
18
18
|
|
19
19
|
# Usage can override default and enable pretty-printing, not possible to disable per-tab
|
20
20
|
@pretty_print = false
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
return unless argv.length > 1 && argv[1].downcase == 'pretty'
|
22
|
+
|
23
|
+
@pretty_print = true
|
24
|
+
Jekyll.logger.info "Bootstrap tab pretty-printing is enabled for the tabs with id '#{@tab_name}'"
|
25
25
|
end
|
26
26
|
|
27
27
|
# @param config [YAML] Configuration data that might contain a entry for `jekyll_bootstrap5_tabs`
|
28
28
|
# @param progname [String] The name of the `option:` subentry to look for underneath the `jekyll_bootstrap5_tabs` entry
|
29
29
|
# @return [TrueClass, FalseClass]
|
30
|
-
def check_config_boolean(config,
|
30
|
+
def check_config_boolean(config, _option)
|
31
31
|
tabs_options = config['jekyll_bootstrap5_tabs']
|
32
32
|
return false if tabs_options.nil?
|
33
33
|
|
34
|
-
hash = tabs_options.detect {|
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
hash = tabs_options.detect { |opt| opt['pretty'] }
|
35
|
+
Jekyll.logger.debug "jekyll_bootstrap5_tabs: tabs_options = #{tabs_options}"
|
36
|
+
Jekyll.logger.debug "jekyll_bootstrap5_tabs: hash = #{hash}"
|
37
|
+
!hash.nil? && hash['pretty']
|
38
38
|
end
|
39
39
|
|
40
40
|
def template_path(template_name)
|
@@ -48,11 +48,11 @@ module JekyllBootstrap5Tabs
|
|
48
48
|
# Global configuration provides the default value of @pretty_print
|
49
49
|
if check_config_boolean(site.config, 'pretty')
|
50
50
|
@pretty_print = true
|
51
|
-
|
51
|
+
Jekyll.logger.info 'Bootstrap tab pretty-printing is enabled by default for the entire Jekyll site.'
|
52
52
|
end
|
53
53
|
|
54
|
-
@environment = context.environments.first
|
55
|
-
|
54
|
+
@environment = context.environments.first # Has type Jekyll::Drops::UnifiedPayloadDrop
|
55
|
+
Jekyll.logger.debug "TabsBlock.render: @environment = '#{@environment}'"
|
56
56
|
super
|
57
57
|
|
58
58
|
template_file_path = template_path(DEFAULT_TEMPLATE)
|
@@ -68,8 +68,8 @@ module JekyllBootstrap5Tabs
|
|
68
68
|
super
|
69
69
|
|
70
70
|
@tabs_group, @tab = split_params(args.strip)
|
71
|
-
|
72
|
-
raise SyntaxError
|
71
|
+
Jekyll.logger.debug "TabBlock: @tabs_group = '#{@tabs_group}', @tab = '#{@tab}'"
|
72
|
+
raise SyntaxError, "Block #{tag} requires tabs name" if @tabs_group.empty? || @tab.empty?
|
73
73
|
end
|
74
74
|
|
75
75
|
def render(context)
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_bootstrap5_tabs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artur Gabitov
|
8
8
|
- Mike Slinn
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jekyll
|
@@ -47,6 +47,9 @@ executables: []
|
|
47
47
|
extensions: []
|
48
48
|
extra_rdoc_files: []
|
49
49
|
files:
|
50
|
+
- ".rubocop.yml"
|
51
|
+
- ".vscode/launch.json"
|
52
|
+
- CHANGELOG.md
|
50
53
|
- Gemfile
|
51
54
|
- Gemfile.lock
|
52
55
|
- LICENSE.txt
|
@@ -57,8 +60,6 @@ files:
|
|
57
60
|
- lib/jekyll_bootstrap5_tabs.rb
|
58
61
|
- lib/jekyll_bootstrap5_tabs/version.rb
|
59
62
|
- lib/template.slim
|
60
|
-
- pkg/jekyll_bootstrap5_tabs-1.0.0.gem
|
61
|
-
- pkg/jekyll_bootstrap5_tabs-1.1.0.gem
|
62
63
|
- sig/jekyll_bootstrap5_tabs.rbs
|
63
64
|
homepage: https://mslinn.com/blog/2022/02/13/jekyll-gem.html
|
64
65
|
licenses:
|
@@ -66,7 +67,7 @@ licenses:
|
|
66
67
|
metadata:
|
67
68
|
homepage_uri: https://mslinn.com/blog/2022/02/13/jekyll-gem.html
|
68
69
|
source_code_uri: https://github.com/mslinn/jekyll_bootstrap5_tabs
|
69
|
-
post_install_message:
|
70
|
+
post_install_message:
|
70
71
|
rdoc_options: []
|
71
72
|
require_paths:
|
72
73
|
- lib
|
@@ -81,8 +82,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
82
|
- !ruby/object:Gem::Version
|
82
83
|
version: '0'
|
83
84
|
requirements: []
|
84
|
-
rubygems_version: 3.2.
|
85
|
-
signing_key:
|
85
|
+
rubygems_version: 3.2.3
|
86
|
+
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: Jekyll plugin for Bootstrap 5 tabs
|
88
89
|
test_files: []
|
Binary file
|
Binary file
|