jekyll_plugin_support 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/jekyll_plugin_support/version.rb +1 -1
- data/lib/jekyll_plugin_support.rb +12 -1
- data/spec/status_persistence.txt +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5704c55f7166173f403cb54d03524eec33e0180fdb1f1ef4e3fe7f3d928d1c42
|
4
|
+
data.tar.gz: bac72f2f2a1e579256482b6e9e2c5583c8de1fc9c570d95e862b4ca0620a69d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6023e3b8096284d039794a90be4669181f583a25fb3f5507b35cf8458ed84fd1ce17d538ce7c513b3729fa4eff06da8f5360a6c444d8678826cbbd35ab1cd0a4
|
7
|
+
data.tar.gz: 637ec49f7e0438c88acfc6ed042fd921a0cda96a986b99c3b9dfe8f9b520056af7235f8085ac1115fa092150bd6e8cd9641eb8beb50cdf00f114609306ef9a06
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.4.0 / 2023-02-12
|
2
|
+
* `render_impl` for tags and blocks now predefines more instance variables:
|
3
|
+
- `@liquid_context` – passed to `render`
|
4
|
+
- `@config` Jekyll configuration
|
5
|
+
- `@envs` Environment variables
|
6
|
+
- `@mode` ('development', 'test' or 'production')
|
7
|
+
|
1
8
|
## 0.3.1 / 2023-02-07
|
2
9
|
* `JekyllBlock.render_impl` and `JekyllTag.render_impl` now define `@page` and `@site`.
|
3
10
|
|
@@ -31,8 +31,15 @@ module JekyllSupport
|
|
31
31
|
# @return [String]
|
32
32
|
def render(liquid_context)
|
33
33
|
text = super
|
34
|
-
@
|
34
|
+
@liquid_context = liquid_context
|
35
|
+
|
36
|
+
# The names of front matter variables are hash keys for @page
|
37
|
+
@page = liquid_context.registers[:page] # Jekyll::Drops::DocumentDrop
|
35
38
|
@site = liquid_context.registers[:site]
|
39
|
+
@config = @site.config
|
40
|
+
@envs = liquid_context.environments.first
|
41
|
+
@mode = @config['env']['JEKYLL_ENV'] || 'development'
|
42
|
+
|
36
43
|
render_impl text
|
37
44
|
end
|
38
45
|
|
@@ -67,8 +74,12 @@ module JekyllSupport
|
|
67
74
|
|
68
75
|
# Method prescribed by the Jekyll plugin lifecycle.
|
69
76
|
def render(liquid_context)
|
77
|
+
@liquid_context = liquid_context
|
70
78
|
@page = liquid_context.registers[:page]
|
71
79
|
@site = liquid_context.registers[:site]
|
80
|
+
@config = @site.config
|
81
|
+
@envs = liquid_context.environments.first
|
82
|
+
@mode = @config['env']['JEKYLL_ENV'] || 'development'
|
72
83
|
render_impl
|
73
84
|
end
|
74
85
|
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_plugin_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
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-02-
|
11
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- spec/jekyll_block_plugin_support_spec.rb
|
143
143
|
- spec/jekyll_tag_plugin_support_spec.rb
|
144
144
|
- spec/spec_helper.rb
|
145
|
+
- spec/status_persistence.txt
|
145
146
|
homepage: https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html#quote
|
146
147
|
licenses:
|
147
148
|
- MIT
|
@@ -177,4 +178,5 @@ test_files:
|
|
177
178
|
- spec/jekyll_block_plugin_support_spec.rb
|
178
179
|
- spec/jekyll_tag_plugin_support_spec.rb
|
179
180
|
- spec/spec_helper.rb
|
181
|
+
- spec/status_persistence.txt
|
180
182
|
...
|