jekyll_include_plugin 1.0.1 → 1.1.0

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: e95de50df4d35189be9b48d90cb02b48b35a97f76b5774cf60880badd111d8d1
4
- data.tar.gz: f1934737904c0ef858fb9c3c1aed41f959bceaeb552bd63aadc8f8ac7a8c7348
3
+ metadata.gz: 54bfb570062a4da31cc5867a42c04e27dbc9805fa5264e8c58e981767f0a278a
4
+ data.tar.gz: '09e7d4a74aed13c6b35989488f17f6585738a44040bdd67249d8adc63d692312'
5
5
  SHA512:
6
- metadata.gz: fca8a82bc01e2743abf6ec1ea82569fb4e153fb90647f1eb3812a2cc0a93dff9cd4b98533f105a11e205a52d555ccd44107e12b91cdfd369353585a89e26fa28
7
- data.tar.gz: 710a8474b3b34917edf60358ca8b9cbc90a14fd8f194dadd785e1ec027a12dc3f04b323c9bca07385c73d80b2393225b5608da81d108106bf90c0c42d5715470
6
+ metadata.gz: 6af90891514917916f37065d5478949692627bad43ab9155f2ff49dc564b9ff8feb3c9bf16de62732faa038292e553d84dfa9d39e87dbe8b19c65df414cefbbb
7
+ data.tar.gz: 21f27c73ba69245773207cf8ed917fb97b13b0fc34e57be8564ffa928ca3fc720525dfcabe73eb6c3587e4d77bf8b18a849130c51b0dead09356debc740d1c0e
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll_include_plugin (1.0.1)
5
- jekyll (~> 3.9)
4
+ jekyll_include_plugin (1.1.0)
5
+ jekyll (>= 3.5, < 5.0)
6
6
  liquid (~> 4.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.7.0)
11
+ addressable (2.8.0)
12
12
  public_suffix (>= 2.0.2, < 5.0)
13
13
  colorator (1.1.0)
14
14
  concurrent-ruby (1.1.9)
@@ -17,39 +17,45 @@ GEM
17
17
  eventmachine (>= 0.12.9)
18
18
  http_parser.rb (~> 0.6.0)
19
19
  eventmachine (1.2.7)
20
+ eventmachine (1.2.7-x64-mingw32)
20
21
  ffi (1.15.3)
22
+ ffi (1.15.3-x64-mingw32)
21
23
  forwardable-extended (2.6.0)
22
24
  http_parser.rb (0.6.0)
23
- i18n (0.9.5)
25
+ i18n (1.8.10)
24
26
  concurrent-ruby (~> 1.0)
25
- jekyll (3.9.1)
27
+ jekyll (4.2.0)
26
28
  addressable (~> 2.4)
27
29
  colorator (~> 1.0)
28
30
  em-websocket (~> 0.5)
29
- i18n (~> 0.7)
30
- jekyll-sass-converter (~> 1.0)
31
+ i18n (~> 1.0)
32
+ jekyll-sass-converter (~> 2.0)
31
33
  jekyll-watch (~> 2.0)
32
- kramdown (>= 1.17, < 3)
34
+ kramdown (~> 2.3)
35
+ kramdown-parser-gfm (~> 1.0)
33
36
  liquid (~> 4.0)
34
- mercenary (~> 0.3.3)
37
+ mercenary (~> 0.4.0)
35
38
  pathutil (~> 0.9)
36
- rouge (>= 1.7, < 4)
39
+ rouge (~> 3.0)
37
40
  safe_yaml (~> 1.0)
38
- jekyll-sass-converter (1.5.2)
39
- sass (~> 3.4)
41
+ terminal-table (~> 2.0)
42
+ jekyll-sass-converter (2.1.0)
43
+ sassc (> 2.0.1, < 3.0)
40
44
  jekyll-watch (2.2.1)
41
45
  listen (~> 3.0)
42
46
  kramdown (2.3.1)
43
47
  rexml
48
+ kramdown-parser-gfm (1.1.0)
49
+ kramdown (~> 2.0)
44
50
  liquid (4.0.3)
45
- listen (3.5.1)
51
+ listen (3.6.0)
46
52
  rb-fsevent (~> 0.10, >= 0.10.3)
47
53
  rb-inotify (~> 0.9, >= 0.9.10)
48
- mercenary (0.3.6)
54
+ mercenary (0.4.0)
49
55
  pathutil (0.16.2)
50
56
  forwardable-extended (~> 2.6)
51
57
  public_suffix (4.0.6)
52
- rake (13.0.3)
58
+ rake (13.0.6)
53
59
  rb-fsevent (0.11.0)
54
60
  rb-inotify (0.10.1)
55
61
  ffi (~> 1.0)
@@ -69,14 +75,17 @@ GEM
69
75
  rspec-support (~> 3.10.0)
70
76
  rspec-support (3.10.2)
71
77
  safe_yaml (1.0.5)
72
- sass (3.7.4)
73
- sass-listen (~> 4.0.0)
74
- sass-listen (4.0.0)
75
- rb-fsevent (~> 0.9, >= 0.9.4)
76
- rb-inotify (~> 0.9, >= 0.9.7)
78
+ sassc (2.4.0)
79
+ ffi (~> 1.9)
80
+ sassc (2.4.0-x64-mingw32)
81
+ ffi (~> 1.9)
82
+ terminal-table (2.0.0)
83
+ unicode-display_width (~> 1.1, >= 1.1.1)
84
+ unicode-display_width (1.7.0)
77
85
 
78
86
  PLATFORMS
79
87
  ruby
88
+ x64-mingw32
80
89
 
81
90
  DEPENDENCIES
82
91
  jekyll_include_plugin!
@@ -84,4 +93,4 @@ DEPENDENCIES
84
93
  rspec (~> 3.0)
85
94
 
86
95
  BUNDLED WITH
87
- 2.1.4
96
+ 2.2.20
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Jekyll Include Plugin
2
2
 
3
- Include local/remote file contents (or part of it) into your pages.
3
+ Include contents of local/remote plain text files (or parts of them) into your pages.
4
4
  Allows multilang comments in the included files, which language will be used depends on `{{ page.lang }}`.
5
5
 
6
6
  ## Usage
@@ -8,24 +8,24 @@ Allows multilang comments in the included files, which language will be used dep
8
8
  Basic usage as follows:
9
9
 
10
10
  ```jinja
11
- jekyllroot/pages/foo.md:
11
+ /jekyllroot/pages/foo.md:
12
12
  -----------------------
13
13
  lang: en
14
14
  -----------------------
15
- {% include_file "this_dir_is_inside_jekyll_root_dir/foo/Dockerfile" snippet="system_deps" syntax="Dockerfile" %}
15
+ {% include_file "foo/Dockerfile" snippet="system_deps" syntax="Dockerfile" %}
16
16
  ```
17
17
 
18
18
  ```Dockerfile
19
- this_dir_is_inside_jekyll_root_dir/foo/Dockerfile:
19
+ /jekyllroot/foo/Dockerfile:
20
20
  --------------------------------------------------------
21
21
  FROM ruby
22
22
 
23
- # [<snippet install_system_deps>]
23
+ # [<snippet system_deps>]
24
24
  # [<en>] Install system dependencies
25
25
  # [<en>] (multiline possible too)
26
26
  # [<ru>] Установка системных зависимостей
27
27
  RUN apt update && apt install curl -y
28
- # [<endsnippet install_system_deps>]
28
+ # [<endsnippet system_deps>]
29
29
  ```
30
30
 
31
31
  Result:
@@ -35,19 +35,29 @@ Result:
35
35
  RUN apt update && apt install curl -y
36
36
  ```
37
37
 
38
- Include whole file:
38
+ Include the local file (path is relative to Jekyll root):
39
39
  ```jinja
40
40
  {% include_file "Dockerfile" %}
41
41
  ```
42
42
 
43
- Include remote file:
43
+ Include the remote file (only absolute urls):
44
44
  ```jinja
45
45
  {% include_file "https://raw.githubusercontent.com/werf/werf-guides/master/examples/rails/010_build/Dockerfile" %}
46
46
  ```
47
47
 
48
+ Include part of the file (the part should be enclosed in `[<snippet snippetname>]` and `[<endsnippet snippetname>]`):
49
+ ```jinja
50
+ {% include_file "Dockerfile" snippet="snippetname" %}
51
+ ```
52
+
53
+ Include the file and wrap the result in `` ```dockerfile `` and `` ``` ``:
54
+ ```jinja
55
+ {% include_file "Dockerfile" syntax="dockerfile" %}
56
+ ```
57
+
48
58
  Dynamic parameters:
49
59
  ```jinja
50
- {% include_file "{{ $templatingAllowedHere }}" snippet="{{ $hereToo }}" %}
60
+ {% include_file "{{ $templatingAllowedHere }}/Dockerfile" snippet="{{ $hereToo }}" %}
51
61
  ```
52
62
 
53
63
  ## Installation
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Ilya Lesikov"]
10
10
  spec.email = ["ilya@lesikov.com"]
11
11
 
12
- spec.summary = "Include files or file samples into Markdown, allows for multilang comments in included files."
12
+ spec.summary = "Plugin for including contents of local/remote plain text files (or parts of them) into your pages. Allows for multilang comments in the included files."
13
13
  spec.homepage = "https://github.com/flant/jekyll_include_plugin"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.6.3"
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.require_paths = ["lib"]
28
28
 
29
29
  spec.add_runtime_dependency "liquid", "~> 4.0"
30
- spec.add_runtime_dependency "jekyll", "~> 3.9"
30
+ spec.add_runtime_dependency "jekyll", ">= 3.5", "< 5.0"
31
31
 
32
32
  spec.add_development_dependency "rake", "~> 13.0"
33
33
  spec.add_development_dependency "rspec", "~> 3.0"
@@ -42,7 +42,8 @@ module JekyllIncludePlugin
42
42
  abort("End of the snippet '#{snippet_name}' has not been found.") unless snippet_end_found
43
43
  abort("Snippet '#{snippet_name}' appears to be empty. Fix and retry.") if snippet_content.empty?
44
44
 
45
- return snippet_content
45
+ first_line_indent = %r!^\s*!.match(snippet_content)[0]
46
+ return "#{first_line_indent}...\n#{snippet_content}"
46
47
  end
47
48
 
48
49
  def remove_all_snippets(text)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllIncludePlugin
4
- VERSION = "1.0.1"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_include_plugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Lesikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-21 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid
@@ -28,16 +28,22 @@ dependencies:
28
28
  name: jekyll
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '3.5'
34
+ - - "<"
32
35
  - !ruby/object:Gem::Version
33
- version: '3.9'
36
+ version: '5.0'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '3.5'
44
+ - - "<"
39
45
  - !ruby/object:Gem::Version
40
- version: '3.9'
46
+ version: '5.0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +119,6 @@ requirements: []
113
119
  rubygems_version: 3.0.8
114
120
  signing_key:
115
121
  specification_version: 4
116
- summary: Include files or file samples into Markdown, allows for multilang comments
117
- in included files.
122
+ summary: Plugin for including contents of local/remote plain text files (or parts
123
+ of them) into your pages. Allows for multilang comments in the included files.
118
124
  test_files: []