jekyll-link-decorator 1.3.0 → 1.3.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-link-decorator.rb +6 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85f578a55d98076ae39a47427c191f790d9f7a804b095849d39897db778a86e7
4
- data.tar.gz: 023bfd45a25c076a0b7fe8bc632195fc8e85d60d983e63cfb2c50abbd2c9c807
3
+ metadata.gz: 621cd5ced37e9cac33b6b66841f337a7444d401e3f95db1ce64484ee0e8c3d99
4
+ data.tar.gz: cb46121588e5fc909b400398263c0d47f74c4fd2bfe0560225b8e5299a6649b6
5
5
  SHA512:
6
- metadata.gz: c32eecd6e74d8ab46a664268c0371f63401ff9c94f40b10984f04fbd0b211e44d6e2f375f3f3cabaceeceda17b4ac4f009666ae472f62e3163a7664caeb6b4b1
7
- data.tar.gz: b9b1c79b09cb02402fd89740829de88077b59a649936c0e11c4b2034ed0b067e7ae8da6f8bc5e9469af813ac37b2882364e463477e77d46c366869652b15ef4a
6
+ metadata.gz: b724ee1158b2249aab69a91127f163a50856a067db6e743423c3922848d6ab9597eafe88a88b9033fdab7c0428100202a85e1615cc81df33f69e5b7dc1c81d11
7
+ data.tar.gz: e0802e0fa86d770bc64af0bfd1d2c3292a51db50fc3077f9433bce7a693ecd2184c46a1cf0929b512af174066ee1a27c69a40a057ecab85d96213d519bf6abb7
@@ -51,8 +51,8 @@
51
51
  # are injected. Set to true to enable.
52
52
  #
53
53
  # * `with_heading_anchor_data`: A dictionary containing optional configuration keys:
54
- # - `icon`: Font Awesome icon classes (default: "fa-solid fa-link")
55
- # - `icon_size`: Font Awesome size modifier appended after icon classes (default: "fa-xs")
54
+ # - `icon`: Font Awesome icon classes (default: "fa-solid fa-hashtag")
55
+ # - `icon_size`: Font Awesome size modifier appended after icon classes (optional)
56
56
  # - `copy_success_message`: Feedback text after copying (consumed by heading-anchor.js,
57
57
  # default: "Copied!")
58
58
  # - `reset_delay`: Milliseconds before the icon resets (consumed by heading-anchor.js,
@@ -75,8 +75,7 @@
75
75
  #
76
76
  # with_heading_anchor: true
77
77
  # with_heading_anchor_data:
78
- # icon: "fa-solid fa-link"
79
- # icon_size: "fa-xs"
78
+ # icon: "fa-solid fa-hashtag"
80
79
  # copy_success_message: "Copied!"
81
80
  # reset_delay: 2000
82
81
  # ```
@@ -104,8 +103,7 @@ module Jekyll
104
103
  DEFAULT_EXTERNAL_LINK_ICON = true
105
104
  DEFAULT_EXTERNAL_LINK_ICON_EXCLUDED_TAGS = [].freeze
106
105
  DEFAULT_HEADING_ANCHOR = false
107
- DEFAULT_HEADING_ANCHOR_ICON = 'fa-solid fa-link'
108
- DEFAULT_HEADING_ANCHOR_SIZE = 'fa-xs'
106
+ DEFAULT_HEADING_ANCHOR_ICON = 'fa-solid fa-hashtag'
109
107
 
110
108
  def self.name
111
109
  'LinkDecorator'
@@ -298,8 +296,8 @@ module Jekyll
298
296
 
299
297
  ha_data = @config['with_heading_anchor_data'] || {}
300
298
  icon_class = ha_data.fetch('icon', DEFAULT_HEADING_ANCHOR_ICON)
301
- icon_size = ha_data.fetch('icon_size', DEFAULT_HEADING_ANCHOR_SIZE)
302
- full_icon = "#{icon_class} #{icon_size}"
299
+ icon_size = ha_data['icon_size']
300
+ full_icon = [icon_class, icon_size].compact.join(' ')
303
301
  id_counts = {}
304
302
 
305
303
  doc.css('h1, h2, h3, h4, h5, h6').each do |heading|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-link-decorator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ReleaseBot