jekyll_outline 1.2.4 → 1.2.5
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/jekyll_outline.gemspec +1 -1
- data/lib/jekyll_outline/version.rb +1 -1
- data/lib/outline_tag.rb +21 -4
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a31ba9e3b1f1b0962f5ac28695f41b2594acde555195fdcbbf0460fa220be66e
|
4
|
+
data.tar.gz: bdd1e6536607a24271019aa3cc24e5de35e71b1ac4c61b925f286bb41dd5521c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e815455631865429afb66cfffce54187e4696e0ecb7e3571050ab98fa6991bd679791a212cdc9915b4e9a9d0c199bf6af0ca9d77a09babe89d7d5fa83a88fa4d
|
7
|
+
data.tar.gz: bcc3910b01ca8d3c99ed101764350f17c95826f3b375733215f35659a6027605452881b528197709d1143b576c7c52cf2b51aad3971c1781b03b97c414f8d1dc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.2.5 / 2024-08-20
|
4
|
+
|
5
|
+
* Added configurable error handling
|
6
|
+
* Updated to jekyll_plugin_support v1.0.2
|
7
|
+
* Defined `outline_error` CSS class in `demo/assets/css/jekyll_outline.css`.
|
8
|
+
|
9
|
+
|
3
10
|
## 1.2.4 / 2024-07-23
|
4
11
|
|
5
12
|
* Updated dependencies to rely on current `jekyll_draft`.
|
data/jekyll_outline.gemspec
CHANGED
data/lib/outline_tag.rb
CHANGED
@@ -62,6 +62,10 @@ module JekyllSupport
|
|
62
62
|
headers = make_headers(super) # Process the block content.
|
63
63
|
|
64
64
|
@helper.gem_file __FILE__
|
65
|
+
|
66
|
+
@die_on_outline_error = @tag_config['die_on_outline_error'] == true if @tag_config
|
67
|
+
@pry_on_outline_error = @tag_config['pry_on_outline_error'] == true if @tag_config
|
68
|
+
|
65
69
|
@fields = @helper.parameter_specified?('fields')&.split || ['title']
|
66
70
|
@sort_by = @helper.parameter_specified?('sort_by_title') ? 'title' : 'order'
|
67
71
|
@collection_name = @helper.remaining_markup
|
@@ -70,6 +74,12 @@ module JekyllSupport
|
|
70
74
|
@docs = obtain_docs(@collection_name)
|
71
75
|
collection = headers + @docs
|
72
76
|
render_outline collection
|
77
|
+
rescue OutlineError => e # jekyll_plugin_support handles StandardError
|
78
|
+
@logger.error { JekyllPluginHelper.remove_html_tags e.logger_message }
|
79
|
+
binding.pry if @pry_on_outline_error # rubocop:disable Lint/Debugger
|
80
|
+
exit! 1 if @die_on_outline_error
|
81
|
+
|
82
|
+
e.html_message
|
73
83
|
end
|
74
84
|
|
75
85
|
# Overload this for a subclass
|
@@ -95,11 +105,18 @@ module JekyllSupport
|
|
95
105
|
yaml = YAML.safe_load content
|
96
106
|
yaml.map { |entry| Header.new entry }
|
97
107
|
rescue NoMethodError => e
|
98
|
-
raise OutlineError,
|
108
|
+
raise OutlineError, <<~END_MSG
|
109
|
+
Invalid YAML within {% outline %} tag. The offending content was:
|
110
|
+
|
111
|
+
<pre>#{content}</pre>
|
112
|
+
END_MSG
|
99
113
|
rescue Psych::SyntaxError => e
|
100
|
-
|
101
|
-
|
102
|
-
|
114
|
+
msg = <<~END_MSG
|
115
|
+
Invalid YAML found within {% outline %} tag:<br>
|
116
|
+
<pre>#{e.message}</pre>
|
117
|
+
END_MSG
|
118
|
+
@logger.error { e.message }
|
119
|
+
raise OutlineError, msg
|
103
120
|
end
|
104
121
|
|
105
122
|
# @section_state can have values: :head, :in_body
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_outline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Slinn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.0.
|
47
|
+
version: 1.0.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.0.
|
54
|
+
version: 1.0.2
|
55
55
|
description: 'Jekyll tag plugin that creates a clickable table of contents.
|
56
56
|
|
57
57
|
'
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
|
-
rubygems_version: 3.5.
|
105
|
+
rubygems_version: 3.5.17
|
106
106
|
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: Jekyll tag plugin that creates a clickable table of contents.
|