jekyll_pre 1.4.0 → 1.4.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/CHANGELOG.md +3 -0
- data/README.md +64 -3
- data/jekyll_pre.gemspec +2 -2
- data/lib/exec_tag.rb +1 -1
- data/lib/jekyll_pre/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f765cdcaf2d5447e9e05c49f02aa47b59feba53ba9dab4133a05eaa35f415555
|
|
4
|
+
data.tar.gz: 2b742223bfd91ce5dc8349a8dd5a09e8c678890dbb338a347ac2c463d3db9f1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f4c15e15ee8390c7c429ce94f5913063d16804a2a61be225d66d1186406995eeed6a326e16fe438efac8dcf266f2e649888aec4c3d581fc10217098d1cbea3b9
|
|
7
|
+
data.tar.gz: 7ae60210e08f23519765d3c1064761838f448e4e04f4dd03f8965361b5243d0cbfa543665370b918bbc4e188c97a3ec96b400d884b7c543d39b1b722afffead5
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -59,6 +59,49 @@ This Jekyll plugin provides 3 new Liquid tags that work together:
|
|
|
59
59
|
- `wrapper_class` class applied to outer `div`.
|
|
60
60
|
- `wrapper_style` style applied to outer `div`.
|
|
61
61
|
|
|
62
|
+
## Keyword Options
|
|
63
|
+
For all keyword options, including keyword options for the `pre` and `exec` tags:
|
|
64
|
+
|
|
65
|
+
- Option values specified in the document *may* be provided.
|
|
66
|
+
If a value is not provided, the value `true` is assumed.
|
|
67
|
+
Otherwise, if a value is provided, it *must* be wrapped in single or double quotes.
|
|
68
|
+
|
|
69
|
+
- Option values specified in `_config.yml` *must* be provided, and the value `true` cannot be implied.
|
|
70
|
+
Values that do not contain special characters *may* be wrapped in single or double quotes.
|
|
71
|
+
|
|
72
|
+
### Examples
|
|
73
|
+
#### Specifying Tag Option Values
|
|
74
|
+
The following sets `die_if_error` `true`:
|
|
75
|
+
```
|
|
76
|
+
{% pre die_if_error %} ... {% endpre %}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The above is the same as writing:
|
|
80
|
+
```
|
|
81
|
+
{% pre die_if_error='true' %} ... {% endpre %}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or writing:
|
|
85
|
+
```
|
|
86
|
+
{% pre die_if_error="true" %} ... {% endpre %}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Neglecting to provide surrounding quotes around the provided value causes the parser to not recognize the option.
|
|
90
|
+
Instead, what you had intended to be the keyword/value pair will be parsed as part of the command.
|
|
91
|
+
For the `pre` tag, this means the erroneous string becomes part of the `label` value, unless `label` is explicitly specified.
|
|
92
|
+
For the `exec` tag, this means the erroneous string becomes part of the command to execute.
|
|
93
|
+
The following demonstrates the error.
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
{% pre die_if_error=false %} ... {% endpre %}
|
|
97
|
+
```
|
|
98
|
+
The above causes the label to be `die_if_error=false`.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
{% exec die_if_error=false ls %} ... {% endpre %}
|
|
102
|
+
```
|
|
103
|
+
The above causes the command to be executed to be `die_if_error=false ls` instead of `ls`.
|
|
104
|
+
|
|
62
105
|
|
|
63
106
|
## CSS
|
|
64
107
|
See [`demo/assets/css/style.css`](demo/assets/css/style.css) for the CSS declarations,
|
|
@@ -94,6 +137,24 @@ pre:
|
|
|
94
137
|
```
|
|
95
138
|
|
|
96
139
|
|
|
140
|
+
#### Specifying Default Option Values
|
|
141
|
+
Specifying a default value for `die_if_error` in `_config.yml` could be done as follows:
|
|
142
|
+
```yaml
|
|
143
|
+
pre:
|
|
144
|
+
die_if_error: true
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
```yaml
|
|
148
|
+
pre:
|
|
149
|
+
die_if_error: "true"
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
pre:
|
|
154
|
+
die_if_error: 'true'
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
97
158
|
## Additional Information
|
|
98
159
|
More information is available on
|
|
99
160
|
[Mike Slinn’s website](https://www.mslinn.com/jekyll_plugins/jekyll_pre.html).
|
|
@@ -262,7 +323,7 @@ The following executes `ls -alF /` and displays the output.
|
|
|
262
323
|
|
|
263
324
|
```
|
|
264
325
|
{% pre clear copyButton label='Exec without error' %}
|
|
265
|
-
{% noselect %}{% exec die_if_nonzero=false ls -alF / %}
|
|
326
|
+
{% noselect %}{% exec die_if_nonzero='false' ls -alF / %}
|
|
266
327
|
{% endpre %}
|
|
267
328
|
```
|
|
268
329
|
|
|
@@ -271,7 +332,7 @@ The following changes to the home directory (`$HOME`), then executes `pwd` and d
|
|
|
271
332
|
|
|
272
333
|
```
|
|
273
334
|
{% pre clear copyButton label='Exec without error' %}
|
|
274
|
-
{% noselect %}{% exec cd="$HOME" die_if_nonzero=false pwd %}
|
|
335
|
+
{% noselect %}{% exec cd="$HOME" die_if_nonzero='false' pwd %}
|
|
275
336
|
{% endpre %}
|
|
276
337
|
```
|
|
277
338
|
|
|
@@ -280,7 +341,7 @@ The following executes `echo $USER` and displays the output.
|
|
|
280
341
|
|
|
281
342
|
```
|
|
282
343
|
{% pre clear copyButton label='Exec display $USER' %}
|
|
283
|
-
{% noselect %}{% exec die_if_nonzero=false echo $USER %}
|
|
344
|
+
{% noselect %}{% exec die_if_nonzero='false' echo $USER %}
|
|
284
345
|
{% endpre %}
|
|
285
346
|
```
|
|
286
347
|
|
data/jekyll_pre.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
|
11
11
|
END_OF_DESC
|
|
12
12
|
spec.email = ['mslinn@mslinn.com']
|
|
13
13
|
spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec}/**/*', '*.gemspec', '*.md']
|
|
14
|
-
spec.homepage = 'https://www.mslinn.com/
|
|
14
|
+
spec.homepage = 'https://www.mslinn.com/jekyll_plugins/jekyll_pre.html'
|
|
15
15
|
spec.license = 'MIT'
|
|
16
16
|
spec.metadata = {
|
|
17
17
|
'allowed_push_host' => 'https://rubygems.org',
|
|
@@ -33,6 +33,6 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.version = JekyllPreVersion::VERSION
|
|
34
34
|
|
|
35
35
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
|
36
|
-
spec.add_dependency 'jekyll_plugin_support', '
|
|
36
|
+
spec.add_dependency 'jekyll_plugin_support', '>= 0.7.0'
|
|
37
37
|
spec.add_dependency 'rack'
|
|
38
38
|
end
|
data/lib/exec_tag.rb
CHANGED
data/lib/jekyll_pre/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll_pre
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Slinn
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-06-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -28,16 +28,16 @@ dependencies:
|
|
|
28
28
|
name: jekyll_plugin_support
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- - "
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 0.
|
|
33
|
+
version: 0.7.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- - "
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 0.
|
|
40
|
+
version: 0.7.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rack
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,14 +77,14 @@ files:
|
|
|
77
77
|
- spec/pre_spec.rb
|
|
78
78
|
- spec/spec_helper.rb
|
|
79
79
|
- spec/status_persistence.txt
|
|
80
|
-
homepage: https://www.mslinn.com/
|
|
80
|
+
homepage: https://www.mslinn.com/jekyll_plugins/jekyll_pre.html
|
|
81
81
|
licenses:
|
|
82
82
|
- MIT
|
|
83
83
|
metadata:
|
|
84
84
|
allowed_push_host: https://rubygems.org
|
|
85
85
|
bug_tracker_uri: https://github.com/mslinn/jekyll_pre/issues
|
|
86
86
|
changelog_uri: https://github.com/mslinn/jekyll_pre/CHANGELOG.md
|
|
87
|
-
homepage_uri: https://www.mslinn.com/
|
|
87
|
+
homepage_uri: https://www.mslinn.com/jekyll_plugins/jekyll_pre.html
|
|
88
88
|
source_code_uri: https://github.com/mslinn/jekyll_pre
|
|
89
89
|
post_install_message: |2+
|
|
90
90
|
|