jekyll_flexible_include 2.0.24 → 2.0.26

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e55df13c1d72abd77ed8e3c3c38b9b90948421f88b42a069a067df044aae6fe7
4
- data.tar.gz: 366f8ca463a84047d0e8ccfc6c4a861ee1516318ce6f5eb715d6feb4e0267947
3
+ metadata.gz: 90105bf937a22652cb622a28c288427ea3a631cec5eeb811360eff7bcaa405de
4
+ data.tar.gz: 5564b7d84f0860c7f52f5ff9683f58a9802460d9de9a1ad36f427cfaa3c31df8
5
5
  SHA512:
6
- metadata.gz: b4dd897174369c3e5bf440d97eb95c0870b6566f10de91a9028c37ad8a5a3c7a9c62f675e2431d00a540511465dd4d849d2dd4a87952cff61a08d44b0886c57d
7
- data.tar.gz: 22591d355535172b074c52f7522ebbbbda39a1c94d6e0107c1bd08b7fe85d051cc04cf3160092fb82e5e90cb020bfd225cb4963006b979c8ae9571598b7386c4
6
+ metadata.gz: e5bc5bbeac42ca37bd83058b1adf392e6029a31fc3ed2b2edd968dba0211adef8e1f72a6dc84722a6de3adb88f2fc672bf51ef6722af1dd01855d6420ebb4b6c
7
+ data.tar.gz: 9d41c9be9c84f77f5338ada0c22441b035d7f050d619cf10dad50aed4adbc7da117faa66cd0114fdad471274d40ab535af74879e335474949b1276d41b5bab8e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.0.26 / 2025-09-13
4
+
5
+ * Replaced the CSS class `bg_yellow` with `bg_yellow_nopad`.
6
+ * Windows environment variables references provided to the `file` option are looked up.
7
+ If they are not found, they are removed (just like CMD.EXE.)
8
+ Requires `jekyll_plugin_support` .
9
+
10
+
11
+ ## 2.0.25 / 2024-12-11
12
+
13
+ * Fixed `from` / `to` / `until` issue
14
+
15
+
3
16
  ## 2.0.24 / 2024-00-20
4
17
 
5
18
  * Made compatible with `jekyll_plugin_support` v1.0.2
data/README.md CHANGED
@@ -93,7 +93,7 @@ and are not intended to be written literally.
93
93
  - `from='regex'` specifies that the beginning of the output should discarded until the matching string or regex is encountered.
94
94
 
95
95
  - `highlight='regex pattern here'` wraps content matching the regex pattern within a
96
- `<span class='bg_yellow'></span>` tag.
96
+ `<span class='bg_yellow_nopad'></span>` tag.
97
97
  Note that the pattern can simply consist of the exact text that you want to highlight.
98
98
 
99
99
  - `pre` is a keyword option that causes the included file to be wrapped inside a
@@ -185,6 +185,8 @@ and a red error message will be logged on the console that says something like:
185
185
 
186
186
  ## Installation
187
187
 
188
+ ### Gem
189
+
188
190
  1. Add the following to `Gemfile`, inside the `jekyll_plugins` group:
189
191
 
190
192
  ```ruby
@@ -213,6 +215,36 @@ and a red error message will be logged on the console that says something like:
213
215
  $ bundle
214
216
  ```
215
217
 
218
+ ### CSS and Assets
219
+
220
+ Copy assets and CSS from the demo/ directory of the jekyll_pre GitHub project.
221
+
222
+ - Copy `demo/assets/images/clippy.svg` to a directory of the same name in your Jekyll project.
223
+ - Copy `demo/assets/css/jekyll_plugin_support.css` to your Jekyll project assets directory.
224
+ - Copy `demo/assets/css/shared_include_pre.css` to your Jekyll project assets directory.
225
+ - Copy `demo/assets/css/jekyll_flexible_include.css` to your Jekyll project assets directory.
226
+ - Incorporate the CSS stylesheets into the appropriate layout in your Jekyll project:
227
+
228
+ ```html
229
+ {% assign nowMillis = site.time | date: '%s' %}
230
+ <link rel="stylesheet" href="{{ '/assets/css/jekyll_plugin_support.css?v=' | append: nowMillis }}" type="text/css">
231
+ <link rel="stylesheet" href="{{ '/assets/css/shared_include_pre.css?v=' | append: nowMillis }}" type="text/css">
232
+ <link rel="stylesheet" href="{{ '/assets/css/jekyll_flexible_include.css?v=' | append: nowMillis }}" type="text/css">
233
+ ```
234
+
235
+
236
+ ### JavaScript
237
+
238
+ Copy `demo/assets/js/clipboard.min.js` from the `jekyll_flexible_include_plugin` GitHub project
239
+ to your Jekyll project’s JavaScript directory.
240
+
241
+ Modify the Jekyll layout or selected pages to load the JavaScript.
242
+ You can load it from your project, as shown below, or from a CDN.
243
+
244
+ ```html
245
+ <script defer src="/assets/js/clipboard.min.js"></script>
246
+ ```
247
+
216
248
 
217
249
  ## Examples
218
250
 
@@ -35,8 +35,8 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
35
35
  spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
36
36
  spec.version = JekyllFlexibleIncludePluginVersion::VERSION
37
37
 
38
- spec.add_dependency 'jekyll_from_to_until'
39
- spec.add_dependency 'jekyll_plugin_support', '>= 1.0.3'
38
+ spec.add_dependency 'jekyll_from_to_until', '>= 1.0.5'
39
+ spec.add_dependency 'jekyll_plugin_support', '>= 3.1.1'
40
40
  spec.add_dependency 'jekyll-sass-converter', '= 2.2.0'
41
41
  spec.add_dependency 'rugged'
42
42
  end
@@ -1,3 +1,3 @@
1
1
  module JekyllFlexibleIncludePluginVersion
2
- VERSION = '2.0.24'.freeze
2
+ VERSION = '2.0.26'.freeze
3
3
  end
@@ -34,9 +34,12 @@ module FlexibleInclude
34
34
  END_MSG
35
35
  end
36
36
 
37
+ # Look for *nix version of @path if Windows expansion did not yield a file that exists
37
38
  def render_impl
38
39
  setup
39
40
  @path = ::JekyllSupport::JekyllPluginHelper.expand_env @filename, @logger
41
+ linux_path = `wslpath '#{@path}' 2>/dev/null`.chomp
42
+ @path = linux_path if !File.exist?(@path) && File.exist?(linux_path)
40
43
  handle_path_types
41
44
  render_completion
42
45
  rescue Errno::EACCES => e
@@ -6,6 +6,8 @@ require 'jekyll_from_to_until'
6
6
 
7
7
  module FlexibleInclude
8
8
  module FlexiblePrivateMethods
9
+ include FromToUntil
10
+
9
11
  def denied(msg)
10
12
  msg_no_html = remove_html_tags(msg)
11
13
  @logger.error { "#{@page['path']} - #{msg_no_html}" }
@@ -17,7 +19,7 @@ module FlexibleInclude
17
19
  def highlight(content, pattern)
18
20
  raise FlexibleIncludeError, "content is a #{content.class}, not a String" unless content.instance_of? String
19
21
 
20
- content.gsub(Regexp.new(pattern), "<span class='bg_yellow'>\\0</span>")
22
+ content.gsub(Regexp.new(pattern), "<span class='bg_yellow_nopad'>\\0</span>")
21
23
  end
22
24
 
23
25
  def maybe_raise_error(msg, throw_error: true)
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_flexible_include
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.24
4
+ version: 2.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
8
  - Tan Nhu
9
9
  - Maarten Brakkee
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2024-08-20 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: jekyll_from_to_until
@@ -18,28 +17,28 @@ dependencies:
18
17
  requirements:
19
18
  - - ">="
20
19
  - !ruby/object:Gem::Version
21
- version: '0'
20
+ version: 1.0.5
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
24
  requirements:
26
25
  - - ">="
27
26
  - !ruby/object:Gem::Version
28
- version: '0'
27
+ version: 1.0.5
29
28
  - !ruby/object:Gem::Dependency
30
29
  name: jekyll_plugin_support
31
30
  requirement: !ruby/object:Gem::Requirement
32
31
  requirements:
33
32
  - - ">="
34
33
  - !ruby/object:Gem::Version
35
- version: 1.0.3
34
+ version: 3.1.1
36
35
  type: :runtime
37
36
  prerelease: false
38
37
  version_requirements: !ruby/object:Gem::Requirement
39
38
  requirements:
40
39
  - - ">="
41
40
  - !ruby/object:Gem::Version
42
- version: 1.0.3
41
+ version: 3.1.1
43
42
  - !ruby/object:Gem::Dependency
44
43
  name: jekyll-sass-converter
45
44
  requirement: !ruby/object:Gem::Requirement
@@ -121,8 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
120
  - !ruby/object:Gem::Version
122
121
  version: '0'
123
122
  requirements: []
124
- rubygems_version: 3.5.17
125
- signing_key:
123
+ rubygems_version: 3.7.2
126
124
  specification_version: 4
127
125
  summary: Jekyll plugin supports various ways to include content into the generated
128
126
  site.