jekyll-link-decorator 1.3.0 → 1.3.1
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 +4 -4
- data/lib/jekyll-link-decorator.rb +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58e0cbaffc8dddaa356b97b7f9523197377c98862ec3398cef26b7436b69d8d1
|
|
4
|
+
data.tar.gz: 5fab208572e92de8982ed60159799b02b729f196a54ba5f0465c86dee212275a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa74e76b3aed60bd4be998dd4b227268323aabae2f00ec67d718ec71c2b04f85bb356bdea7ac8622b6d4caabbc778cff534d2796dbd06bd55989611db4760ca7
|
|
7
|
+
data.tar.gz: 233d5cde8f2bfdf617b595a2783633e37d4b3794ba3ccfd8b8e838f8c4906348c4a8cd8979f78ea543861ab648633f004bc81c18aa7b44f6cec3170585d75c4d
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
#
|
|
53
53
|
# * `with_heading_anchor_data`: A dictionary containing optional configuration keys:
|
|
54
54
|
# - `icon`: Font Awesome icon classes (default: "fa-solid fa-link")
|
|
55
|
-
# - `icon_size`: Font Awesome size modifier appended after icon classes (
|
|
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,
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
# with_heading_anchor: true
|
|
77
77
|
# with_heading_anchor_data:
|
|
78
78
|
# icon: "fa-solid fa-link"
|
|
79
|
-
# icon_size: "fa-xs"
|
|
80
79
|
# copy_success_message: "Copied!"
|
|
81
80
|
# reset_delay: 2000
|
|
82
81
|
# ```
|
|
@@ -105,7 +104,6 @@ module Jekyll
|
|
|
105
104
|
DEFAULT_EXTERNAL_LINK_ICON_EXCLUDED_TAGS = [].freeze
|
|
106
105
|
DEFAULT_HEADING_ANCHOR = false
|
|
107
106
|
DEFAULT_HEADING_ANCHOR_ICON = 'fa-solid fa-link'
|
|
108
|
-
DEFAULT_HEADING_ANCHOR_SIZE = 'fa-xs'
|
|
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
|
|
302
|
-
full_icon =
|
|
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|
|