jekyll_block_tag_plugin_template 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +2 -0
- data/.rubocop.yml +17 -0
- data/.vscode/launch.json +47 -0
- data/.vscode/settings.json +6 -0
- data/CHANGELOG.md +2 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +120 -0
- data/LICENSE.txt +21 -0
- data/README.md +110 -0
- data/Rakefile +7 -0
- data/jekyll_block_tag_plugin_template.gemspec +48 -0
- data/lib/jekyll_block_tag_plugin_template/version.rb +5 -0
- data/lib/jekyll_block_tag_plugin_template.rb +75 -0
- data/sig/jekyll_block_tag_plugin_template.rbs +4 -0
- metadata +120 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 73983c5ebf962b1754d17c322dc69f547ad6aaa80eb6d1412dd1a6942d4ef3d7
|
4
|
+
data.tar.gz: 2098a2671793bd943c53470577128e7a1074f4b512c4ce69290a1e8a1b2b238e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fa7b2a8f807b8c640bbdd9decca7c4592648f5c44da755055b026b96e9b7389b446cc0b2e50a10b64042b4ad1ce2c87981b5aa50ba487f87e210791706e63b3b
|
7
|
+
data.tar.gz: e69e561eecfa9682f14b7d8adb9f409115c1b12f166e1be8060c984e50391807be4eb4ea9381a4fe002cf78481901c298e6f95392070d50999d6501eb9bbe13b
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require: rubocop-jekyll
|
2
|
+
inherit_gem:
|
3
|
+
rubocop-jekyll: .rubocop.yml
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
Exclude:
|
7
|
+
- vendor/**/*
|
8
|
+
- Gemfile*
|
9
|
+
- '*.gemspec' # This does nothing. Why?
|
10
|
+
NewCops: enable
|
11
|
+
TargetRubyVersion: 2.6
|
12
|
+
|
13
|
+
Layout/LineLength:
|
14
|
+
Max: 150
|
15
|
+
|
16
|
+
# Gemspec/RequireMFA:
|
17
|
+
# enable: false
|
data/.vscode/launch.json
ADDED
@@ -0,0 +1,47 @@
|
|
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
|
+
"cwd": "${workspaceRoot}",
|
9
|
+
"name": "Attach rdebug-ide",
|
10
|
+
"request": "attach",
|
11
|
+
"remoteHost": "localhost",
|
12
|
+
"remotePort": "1234",
|
13
|
+
"remoteWorkspaceRoot": "/",
|
14
|
+
"restart": true,
|
15
|
+
"showDebuggerOutput": true,
|
16
|
+
"stopOnEntry": true,
|
17
|
+
"type": "Ruby",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"args": [
|
21
|
+
"-I",
|
22
|
+
"${workspaceRoot}"
|
23
|
+
],
|
24
|
+
"cwd": "${workspaceRoot}",
|
25
|
+
"name": "RSpec - all",
|
26
|
+
"program": "${env:HOME}/.gems/bin/rspec",
|
27
|
+
"request": "launch",
|
28
|
+
"showDebuggerOutput": false,
|
29
|
+
"type": "Ruby",
|
30
|
+
"useBundler": true,
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"args": [
|
34
|
+
"-I",
|
35
|
+
"${workspaceRoot}",
|
36
|
+
"${file}"
|
37
|
+
],
|
38
|
+
"cwd": "${workspaceRoot}",
|
39
|
+
"name": "RSpec - active spec file only",
|
40
|
+
"program": "${env:HOME}/.gems/bin/rspec",
|
41
|
+
"request": "launch",
|
42
|
+
"showDebuggerOutput": false,
|
43
|
+
"type": "Ruby",
|
44
|
+
"useBundler": true,
|
45
|
+
}
|
46
|
+
]
|
47
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// Place your settings in this file to overwrite default and user settings.
|
2
|
+
{
|
3
|
+
"ruby.rubocop.configFilePath": ".rubocop.yml",
|
4
|
+
"ruby.rubocop.useBundler": true,
|
5
|
+
"ruby.rubocop.executePath": "/home/mslinn/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/rubocop-1.18.4/exe/"
|
6
|
+
}
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in jekyll_block_tag_plugin_template.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "bundler", require: false
|
9
|
+
gem "rake", require: false
|
10
|
+
gem "rspec", require: false
|
11
|
+
gem "rubocop", "= 1.18.0", require: false # rubocop-jekyll requires this older version
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
jekyll_block_tag_plugin_template (0.1.0)
|
5
|
+
jekyll (>= 3.5.0)
|
6
|
+
jekyll_plugin_logger
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.8.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
ast (2.4.2)
|
14
|
+
colorator (1.1.0)
|
15
|
+
concurrent-ruby (1.1.9)
|
16
|
+
debase (0.2.4.1)
|
17
|
+
debase-ruby_core_source (>= 0.10.2)
|
18
|
+
debase-ruby_core_source (0.10.14)
|
19
|
+
diff-lcs (1.5.0)
|
20
|
+
em-websocket (0.5.3)
|
21
|
+
eventmachine (>= 0.12.9)
|
22
|
+
http_parser.rb (~> 0)
|
23
|
+
eventmachine (1.2.7)
|
24
|
+
ffi (1.15.5)
|
25
|
+
forwardable-extended (2.6.0)
|
26
|
+
http_parser.rb (0.8.0)
|
27
|
+
i18n (1.10.0)
|
28
|
+
concurrent-ruby (~> 1.0)
|
29
|
+
jekyll (4.2.2)
|
30
|
+
addressable (~> 2.4)
|
31
|
+
colorator (~> 1.0)
|
32
|
+
em-websocket (~> 0.5)
|
33
|
+
i18n (~> 1.0)
|
34
|
+
jekyll-sass-converter (~> 2.0)
|
35
|
+
jekyll-watch (~> 2.0)
|
36
|
+
kramdown (~> 2.3)
|
37
|
+
kramdown-parser-gfm (~> 1.0)
|
38
|
+
liquid (~> 4.0)
|
39
|
+
mercenary (~> 0.4.0)
|
40
|
+
pathutil (~> 0.9)
|
41
|
+
rouge (~> 3.0)
|
42
|
+
safe_yaml (~> 1.0)
|
43
|
+
terminal-table (~> 2.0)
|
44
|
+
jekyll-sass-converter (2.2.0)
|
45
|
+
sassc (> 2.0.1, < 3.0)
|
46
|
+
jekyll-watch (2.2.1)
|
47
|
+
listen (~> 3.0)
|
48
|
+
jekyll_plugin_logger (2.0.0)
|
49
|
+
jekyll (>= 3.5.0)
|
50
|
+
kramdown (2.3.1)
|
51
|
+
rexml
|
52
|
+
kramdown-parser-gfm (1.1.0)
|
53
|
+
kramdown (~> 2.0)
|
54
|
+
liquid (4.0.3)
|
55
|
+
listen (3.7.1)
|
56
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
57
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
58
|
+
mercenary (0.4.0)
|
59
|
+
parallel (1.21.0)
|
60
|
+
parser (3.1.1.0)
|
61
|
+
ast (~> 2.4.1)
|
62
|
+
pathutil (0.16.2)
|
63
|
+
forwardable-extended (~> 2.6)
|
64
|
+
public_suffix (4.0.6)
|
65
|
+
rainbow (3.1.1)
|
66
|
+
rake (13.0.6)
|
67
|
+
rb-fsevent (0.11.1)
|
68
|
+
rb-inotify (0.10.1)
|
69
|
+
ffi (~> 1.0)
|
70
|
+
regexp_parser (2.2.1)
|
71
|
+
rexml (3.2.5)
|
72
|
+
rouge (3.28.0)
|
73
|
+
rspec (3.11.0)
|
74
|
+
rspec-core (~> 3.11.0)
|
75
|
+
rspec-expectations (~> 3.11.0)
|
76
|
+
rspec-mocks (~> 3.11.0)
|
77
|
+
rspec-core (3.11.0)
|
78
|
+
rspec-support (~> 3.11.0)
|
79
|
+
rspec-expectations (3.11.0)
|
80
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
81
|
+
rspec-support (~> 3.11.0)
|
82
|
+
rspec-mocks (3.11.0)
|
83
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
84
|
+
rspec-support (~> 3.11.0)
|
85
|
+
rspec-support (3.11.0)
|
86
|
+
rubocop (1.18.0)
|
87
|
+
parallel (~> 1.10)
|
88
|
+
parser (>= 3.0.0.0)
|
89
|
+
rainbow (>= 2.2.2, < 4.0)
|
90
|
+
regexp_parser (>= 1.8, < 3.0)
|
91
|
+
rexml
|
92
|
+
rubocop-ast (>= 1.7.0, < 2.0)
|
93
|
+
ruby-progressbar (~> 1.7)
|
94
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
95
|
+
rubocop-ast (1.16.0)
|
96
|
+
parser (>= 3.1.1.0)
|
97
|
+
ruby-debug-ide (0.7.3)
|
98
|
+
rake (>= 0.8.1)
|
99
|
+
ruby-progressbar (1.11.0)
|
100
|
+
safe_yaml (1.0.5)
|
101
|
+
sassc (2.4.0)
|
102
|
+
ffi (~> 1.9)
|
103
|
+
terminal-table (2.0.0)
|
104
|
+
unicode-display_width (~> 1.1, >= 1.1.1)
|
105
|
+
unicode-display_width (1.8.0)
|
106
|
+
|
107
|
+
PLATFORMS
|
108
|
+
x86_64-linux
|
109
|
+
|
110
|
+
DEPENDENCIES
|
111
|
+
bundler
|
112
|
+
debase
|
113
|
+
jekyll_block_tag_plugin_template!
|
114
|
+
rake
|
115
|
+
rspec
|
116
|
+
rubocop (= 1.18.0)
|
117
|
+
ruby-debug-ide
|
118
|
+
|
119
|
+
BUNDLED WITH
|
120
|
+
2.3.7
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2022 COPYRIGHT_OWNER
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
`jekyll_block_tag_plugin_template`
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/jekyll_block_tag_plugin_template.svg)](https://badge.fury.io/rb/jekyll_block_tag_plugin_template)
|
3
|
+
===========
|
4
|
+
|
5
|
+
**TODO After cloning this repo, run `bin/run_this_first`, after which this line will automatically be deleted.**
|
6
|
+
|
7
|
+
`jekyll_block_tag_plugin_template` is a Jekyll plugin that provides a new Liquid tag called `new_tag_name` and a new tag block called `new_tag_block_name`.
|
8
|
+
The plugin is packaged as a Ruby gem.
|
9
|
+
|
10
|
+
* A `new_tag_block_name` block tag that can do magic with its eyes closed.
|
11
|
+
```
|
12
|
+
{% new_tag_name [arguments] %}
|
13
|
+
Contents of new_tag_block_name
|
14
|
+
{% endnew_tag_name %}
|
15
|
+
```
|
16
|
+
* A `new_tag_name` tag that can turn on a dime and leave 15 cents change.
|
17
|
+
```
|
18
|
+
{% new_tag_name Contents of new_tag_name tag%}
|
19
|
+
```
|
20
|
+
|
21
|
+
|
22
|
+
## Additional Information
|
23
|
+
More information is available on Mike Slinn's web site about
|
24
|
+
[Jekyll plugins](https://www.mslinn.com/blog/index.html#Jekyll).
|
25
|
+
|
26
|
+
|
27
|
+
## Installation
|
28
|
+
|
29
|
+
Add this line to your application's Gemfile:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
group :jekyll_plugins do
|
33
|
+
gem 'jekyll_block_tag_plugin_template'
|
34
|
+
end
|
35
|
+
```
|
36
|
+
|
37
|
+
And then execute:
|
38
|
+
|
39
|
+
$ bundle install
|
40
|
+
|
41
|
+
Or install it yourself as:
|
42
|
+
|
43
|
+
$ gem install jekyll_block_tag_plugin_template
|
44
|
+
|
45
|
+
|
46
|
+
## Usage
|
47
|
+
|
48
|
+
TODO: Write usage instructions here
|
49
|
+
|
50
|
+
|
51
|
+
## Development
|
52
|
+
|
53
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
54
|
+
|
55
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
56
|
+
|
57
|
+
|
58
|
+
### Build and Install Locally
|
59
|
+
To build and install this gem onto your local machine, run:
|
60
|
+
```shell
|
61
|
+
$ rake install:local
|
62
|
+
```
|
63
|
+
|
64
|
+
The following also does the same thing:
|
65
|
+
```shell
|
66
|
+
$ bundle exec rake install
|
67
|
+
jekyll_block_tag_plugin_template 0.1.0 built to pkg/jekyll_block_tag_plugin_template-0.1.0.gem.
|
68
|
+
jekyll_block_tag_plugin_template (0.1.0) installed.
|
69
|
+
```
|
70
|
+
|
71
|
+
Examine the newly built gem:
|
72
|
+
```shell
|
73
|
+
$ gem info jekyll_block_tag_plugin_template
|
74
|
+
|
75
|
+
*** LOCAL GEMS ***
|
76
|
+
|
77
|
+
jekyll_block_tag_plugin_template (0.1.0)
|
78
|
+
Author: Firstname Lastname
|
79
|
+
Homepage:
|
80
|
+
https://github.com/username/jekyll_block_tag_plugin_template
|
81
|
+
License: MIT
|
82
|
+
Installed at: /home/mslinn/.gems
|
83
|
+
|
84
|
+
Write a short summary, because RubyGems requires one.
|
85
|
+
```
|
86
|
+
|
87
|
+
|
88
|
+
### Build and Push to RubyGems
|
89
|
+
To release a new version,
|
90
|
+
1. Update the version number in `version.rb`.
|
91
|
+
2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
|
92
|
+
3. Run the following:
|
93
|
+
```shell
|
94
|
+
$ bundle exec rake release
|
95
|
+
```
|
96
|
+
The above creates a git tag for the version, commits the created tag,
|
97
|
+
and pushes the new `.gem` file to [RubyGems.org](https://rubygems.org).
|
98
|
+
|
99
|
+
|
100
|
+
## Contributing
|
101
|
+
|
102
|
+
1. Fork the project
|
103
|
+
2. Create a descriptively named feature branch
|
104
|
+
3. Add your feature
|
105
|
+
4. Submit a pull request
|
106
|
+
|
107
|
+
|
108
|
+
## License
|
109
|
+
|
110
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/jekyll_block_tag_plugin_template/version"
|
4
|
+
|
5
|
+
# rubocop:disable Metrics/BlockLength
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
github = "https://github.com/mslinn/jekyll_block_tag_plugin_template"
|
8
|
+
|
9
|
+
spec.authors = ["Firstname Lastname"]
|
10
|
+
spec.bindir = "exe"
|
11
|
+
spec.description = <<~END_OF_DESC
|
12
|
+
Expand on what spec.summary says.
|
13
|
+
END_OF_DESC
|
14
|
+
spec.email = ["email@email.com"]
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
20
|
+
(f == __FILE__) || f.match(%r!\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)!)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
spec.homepage = "https://www.mslinn.com/blog/2020/12/30/jekyll-plugin-template-collection.html"
|
25
|
+
spec.license = "MIT"
|
26
|
+
spec.metadata = {
|
27
|
+
"allowed_push_host" => "https://rubygems.org",
|
28
|
+
"bug_tracker_uri" => "#{github}/issues",
|
29
|
+
"changelog_uri" => "#{github}/CHANGELOG.md",
|
30
|
+
"homepage_uri" => spec.homepage,
|
31
|
+
"source_code_uri" => github,
|
32
|
+
}
|
33
|
+
spec.name = "jekyll_block_tag_plugin_template"
|
34
|
+
spec.require_paths = ["lib"]
|
35
|
+
spec.required_ruby_version = ">= 2.6.0"
|
36
|
+
spec.summary = "Write a short summary; RubyGems requires one."
|
37
|
+
spec.version = JekyllBlockTagTemplate::VERSION
|
38
|
+
|
39
|
+
spec.add_dependency "jekyll", ">= 3.5.0"
|
40
|
+
spec.add_dependency "jekyll_plugin_logger"
|
41
|
+
|
42
|
+
spec.add_development_dependency "debase"
|
43
|
+
# spec.add_development_dependency "rubocop-jekyll"
|
44
|
+
# spec.add_development_dependency "rubocop-rake"
|
45
|
+
# spec.add_development_dependency "rubocop-rspec"
|
46
|
+
spec.add_development_dependency "ruby-debug-ide"
|
47
|
+
end
|
48
|
+
# rubocop:enable Metrics/BlockLength
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "jekyll_plugin_logger"
|
4
|
+
require_relative "jekyll_block_tag_plugin_template/version"
|
5
|
+
|
6
|
+
module JekyllPluginBlockTagTemplate
|
7
|
+
PLUGIN_NAME = "jekyll_block_tag_plugin_template"
|
8
|
+
end
|
9
|
+
|
10
|
+
# This is the module-level description.
|
11
|
+
#
|
12
|
+
# @example Heading for this example
|
13
|
+
# Describe what this example does
|
14
|
+
# {% my_block_template "parameter" %}
|
15
|
+
# Hello, world!
|
16
|
+
# {% endmy_block_template %}
|
17
|
+
#
|
18
|
+
# The Jekyll log level defaults to :info, which means all the Jekyll.logger statements below will not generate output.
|
19
|
+
# You can control the log level when you start Jekyll.
|
20
|
+
# To set the log level to :debug, pass the --verbose option, like this:
|
21
|
+
# bundle exec jekyll build --verbose
|
22
|
+
# JEKYLL_ENV=development bundle exec jekyll serve --verbose
|
23
|
+
# To set the log level to :error, pass the --quiet option, like this:
|
24
|
+
# bundle exec jekyll build --quiet
|
25
|
+
# JEKYLL_ENV=development bundle exec jekyll serve --quiet
|
26
|
+
|
27
|
+
module Jekyll
|
28
|
+
# This class implements the Jekyll tag functionality
|
29
|
+
class MyBlock < Liquid::Block
|
30
|
+
# Constructor.
|
31
|
+
# @param tag_name [String] the name of the tag, which we already know.
|
32
|
+
# @param text [Hash, String, Liquid::Tag::Parser] the arguments from the tag.
|
33
|
+
# @param _tokens [Liquid::ParseContext] parsed and tokenized command line
|
34
|
+
# @return [void]
|
35
|
+
def initialize(tag_name, arguments, _tokens)
|
36
|
+
super
|
37
|
+
@logger = PluginMetaLogger.instance.new_logger(self)
|
38
|
+
@logger.debug <<~HEREDOC
|
39
|
+
tag_name [#{tag_name.class}] = "#{tag_name}" [#{tag_name.class}]
|
40
|
+
arguments [#{arguments.class}] = "#{arguments}"
|
41
|
+
HEREDOC
|
42
|
+
@arguments = arguments
|
43
|
+
@arguments = "" if @arguments.nil? || @arguments.empty?
|
44
|
+
end
|
45
|
+
|
46
|
+
# Method prescribed by the Jekyll plugin lifecycle.
|
47
|
+
# @return [String]
|
48
|
+
def render(context)
|
49
|
+
content = super # This underdocumented assignment returns the text within the block.
|
50
|
+
|
51
|
+
@site = context.registers[:site]
|
52
|
+
@config = @site.config
|
53
|
+
@mode = @config["env"]["JEKYLL_ENV"]
|
54
|
+
@page = context.registers[:page]
|
55
|
+
|
56
|
+
@logger.debug <<~HEREDOC
|
57
|
+
mode="#{@mode}"
|
58
|
+
page.path="#{@page.path}"
|
59
|
+
page.url="#{@page.url}"
|
60
|
+
HEREDOC
|
61
|
+
|
62
|
+
# Compute the return value of this Jekyll tag
|
63
|
+
<<~HEREDOC
|
64
|
+
<p style="color: green; background-color: yellow; padding: 1em; border: solid thin grey;">
|
65
|
+
#{content}
|
66
|
+
</p>
|
67
|
+
HEREDOC
|
68
|
+
end
|
69
|
+
|
70
|
+
private # Your private methods go here
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
PluginMetaLogger.instance.info { "Loaded #{JekyllPluginBlockTagTemplate::PLUGIN_NAME} v#{JekyllBlockTagTemplate::VERSION} plugin." }
|
75
|
+
Liquid::Template.register_tag(JekyllPluginBlockTagTemplate::PLUGIN_NAME, Jekyll::MyBlock)
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll_block_tag_plugin_template
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Firstname Lastname
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.5.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.5.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: jekyll_plugin_logger
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: debase
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ruby-debug-ide
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: 'Expand on what spec.summary says.
|
70
|
+
|
71
|
+
'
|
72
|
+
email:
|
73
|
+
- email@email.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".rspec"
|
79
|
+
- ".rubocop.yml"
|
80
|
+
- ".vscode/launch.json"
|
81
|
+
- ".vscode/settings.json"
|
82
|
+
- CHANGELOG.md
|
83
|
+
- Gemfile
|
84
|
+
- Gemfile.lock
|
85
|
+
- LICENSE.txt
|
86
|
+
- README.md
|
87
|
+
- Rakefile
|
88
|
+
- jekyll_block_tag_plugin_template.gemspec
|
89
|
+
- lib/jekyll_block_tag_plugin_template.rb
|
90
|
+
- lib/jekyll_block_tag_plugin_template/version.rb
|
91
|
+
- sig/jekyll_block_tag_plugin_template.rbs
|
92
|
+
homepage: https://www.mslinn.com/blog/2020/12/30/jekyll-plugin-template-collection.html
|
93
|
+
licenses:
|
94
|
+
- MIT
|
95
|
+
metadata:
|
96
|
+
allowed_push_host: https://rubygems.org
|
97
|
+
bug_tracker_uri: https://github.com/mslinn/jekyll_block_tag_plugin_template/issues
|
98
|
+
changelog_uri: https://github.com/mslinn/jekyll_block_tag_plugin_template/CHANGELOG.md
|
99
|
+
homepage_uri: https://www.mslinn.com/blog/2020/12/30/jekyll-plugin-template-collection.html
|
100
|
+
source_code_uri: https://github.com/mslinn/jekyll_block_tag_plugin_template
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 2.6.0
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
requirements: []
|
116
|
+
rubygems_version: 3.1.4
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Write a short summary; RubyGems requires one.
|
120
|
+
test_files: []
|