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.
- checksums.yaml +4 -4
- data/lib/jekyll-link-decorator.rb +6 -8
- 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: 621cd5ced37e9cac33b6b66841f337a7444d401e3f95db1ce64484ee0e8c3d99
|
|
4
|
+
data.tar.gz: cb46121588e5fc909b400398263c0d47f74c4fd2bfe0560225b8e5299a6649b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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-
|
|
55
|
-
# - `icon_size`: Font Awesome size modifier appended after icon classes (
|
|
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-
|
|
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-
|
|
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
|
|
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|
|