jekyll_todo 0.1.0 → 0.2.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: 3e30a9fe9e16fbadf014b44dd753d3e316a9a37144428fe0b84078869ca99ca3
4
- data.tar.gz: '019eeae995cff67e6b3325a06febc188535c1eddaa0dc4d4a6d55c689f4e2f2b'
3
+ metadata.gz: 1ff76bc0ad019f049909fb64edc4ec1618aff5d163e21d5a5c58bd4104e4a810
4
+ data.tar.gz: f58c958d5e77e10f9c8006dcb06a364baa370ea4fc2f38c334c321a33a0e6d01
5
5
  SHA512:
6
- metadata.gz: 627ed50f1bd935f268c3eab173df0ece8ce98726fd1cc721c6c6b0fb390817568a6f2f6fa2aa98b3571a26d26705f111c18205769731527cba2a9f6a1dac6eb2
7
- data.tar.gz: a28bcdb4bbb27b84a9de6739a0f178b1b08bd9c51d95a76528eaef237e6c787f509b910f034a076a09bc8c092f9ad1714736856d99751891c6b69bbf4e7f9ef9
6
+ metadata.gz: b8e8d60a4461b8f74d9f023690146843d02949fb0615365d1fb1a3bdeaba71239d1476a7d8882a213cf7934e8f61922364f3344598aa3d52d95cc81ed2111852
7
+ data.tar.gz: 32dbba7205acf5422f3e900ddebc90701fba29322c0c755a8163bc545cbf4f123f7e378a7f5f903704ed97cd85634aa00d750ce1eeced4d91f5e33faeef5709b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.2.0 / 2025-07-19
4
+
5
+ * Added `mode` option.
6
+
7
+
3
8
  ## 0.1.0 / 2025-07-16
4
9
 
5
10
  * Initial release.
data/README.md CHANGED
@@ -8,6 +8,13 @@ Generates a TODO block.
8
8
  * `block` - Apply `display: block` to the generated HTML wrapper
9
9
  * `class` - Apply the given class to the generated HTML wrapper
10
10
  * `id` - Apply the given HTML id attribute to the generated HTML wrapper
11
+ * `mode` - Only generate the notice for the given [Jekyll `mode`](https://jekyllrb.com/docs/configuration/environments/).
12
+ The default is to generate the notice for all Jekyll modes.
13
+ For example:
14
+
15
+ * `mode=development` or `mode=develop` only generates the notice when in `development` mode.
16
+ * `mode=production` or `mode=prod` only generates the notice when in `production` mode.
17
+
11
18
  * `span` - Apply `display: inline` to the generated HTML wrapper
12
19
  * `style` - Apply the given CSS style to the generated HTML wrapper
13
20
 
@@ -1,3 +1,3 @@
1
1
  module JekyllToDo
2
- VERSION = '0.1.0'.freeze unless defined? VERSION
2
+ VERSION = '0.2.0'.freeze unless defined? VERSION
3
3
  end
data/lib/todo.rb CHANGED
@@ -71,11 +71,17 @@ module JekyllToDo
71
71
  @id = @helper.parameter_specified? 'id'
72
72
  @id_option = " id='@id'" if @id
73
73
 
74
+ @mode_specified = @helper.parameter_specified? 'mode'
75
+
74
76
  @span = @helper.parameter_specified? 'span' unless @block
75
77
 
76
78
  @style = @helper.parameter_specified? 'style'
77
79
  @style_option = " style='#{@style}#{@block_option}'" if @style || @block_option
78
80
 
81
+ @mode_specified = 'development' if @mode_specified&.start_with? 'develop'
82
+ @mode_specified = 'production' if @mode_specified&.start_with? 'prod'
83
+ return if @mode_specified && @mode_specified != @mode
84
+
79
85
  if @span
80
86
  <<~END_MSG
81
87
  <span class="todo#{@alert_option}#{@class_option}"#{@id_option}#{@style_option}>#{content}</span>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_todo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn