jekyll-highlight-cards 0.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 +7 -0
- data/.cursorignore +1 -0
- data/.github/workflows/ci.yaml +21 -0
- data/.github/workflows/release-please.yaml +69 -0
- data/.github/workflows/update-gemfile-lock.yaml +52 -0
- data/.gitignore +59 -0
- data/.release-please-manifest.json +3 -0
- data/.rspec +5 -0
- data/.rubocop.yml +64 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +54 -0
- data/CONTRIBUTING.md +219 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +196 -0
- data/LICENSE +661 -0
- data/README.md +228 -0
- data/_includes/highlight-cards/linkcard.html +13 -0
- data/_includes/highlight-cards/polaroid.html +22 -0
- data/_sass/_highlight-cards.scss +92 -0
- data/docs/linkcard-example.jpg +0 -0
- data/docs/polaroid-example.jpg +0 -0
- data/docs/polaroid-sidebyside-example.jpg +0 -0
- data/docs/polaroid-stacked-example.jpg +0 -0
- data/jekyll-highlight-cards.gemspec +47 -0
- data/lib/jekyll-highlight-cards/archive_helper.rb +151 -0
- data/lib/jekyll-highlight-cards/dimension_parser.rb +62 -0
- data/lib/jekyll-highlight-cards/expression_evaluator.rb +113 -0
- data/lib/jekyll-highlight-cards/image_sizing_hooks.rb +188 -0
- data/lib/jekyll-highlight-cards/linkcard_tag.rb +211 -0
- data/lib/jekyll-highlight-cards/polaroid_tag.rb +223 -0
- data/lib/jekyll-highlight-cards/template_renderer.rb +113 -0
- data/lib/jekyll-highlight-cards/version.rb +5 -0
- data/lib/jekyll-highlight-cards.rb +57 -0
- data/release-please-config.json +12 -0
- metadata +234 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module JekyllHighlightCards
|
|
4
|
+
# Liquid tag for creating styled polaroid photo components
|
|
5
|
+
#
|
|
6
|
+
# Syntax:
|
|
7
|
+
# {% polaroid IMAGE_URL [size=WxH] [alt="..."] [title="..."] [link="..."] [archive="..."] %}
|
|
8
|
+
#
|
|
9
|
+
# Parameters:
|
|
10
|
+
# - IMAGE_URL (required): Path or URL to the image (can be Liquid expression)
|
|
11
|
+
# - size=WxH (optional): Image dimensions (e.g., size=300x200, size=400x, size=x300)
|
|
12
|
+
# - alt="..." (optional): Alt text for the image (can be Liquid expression)
|
|
13
|
+
# - title="..." (optional): Title text to display (can be Liquid expression, also used as alt fallback)
|
|
14
|
+
# - link="..." (optional): URL to link to (can be Liquid expression)
|
|
15
|
+
# - archive="..." (optional): Archive URL or "none" to opt out
|
|
16
|
+
#
|
|
17
|
+
# Note: Alt text priority: alt parameter > title parameter > empty string
|
|
18
|
+
# This allows setting alt text without a visible title for accessibility
|
|
19
|
+
#
|
|
20
|
+
# Examples:
|
|
21
|
+
# {% polaroid /assets/img/photo.jpg %}
|
|
22
|
+
# {% polaroid /img/photo.jpg size=300x200 title="My Photo" %}
|
|
23
|
+
# {% polaroid /img/photo.jpg alt="Screen reader description" %}
|
|
24
|
+
# {% polaroid /img/photo.jpg alt="Detailed alt" title="Short Title" %}
|
|
25
|
+
# {% polaroid {{ page.image }} size=x400 title={{ page.title }} %}
|
|
26
|
+
# {% polaroid /img.jpg link="https://example.com" archive="none" %}
|
|
27
|
+
class PolaroidTag < Liquid::Tag
|
|
28
|
+
include ArchiveHelper
|
|
29
|
+
include DimensionParser
|
|
30
|
+
include ExpressionEvaluator
|
|
31
|
+
include TemplateRenderer
|
|
32
|
+
|
|
33
|
+
# Initialize the tag
|
|
34
|
+
#
|
|
35
|
+
# @param tag_name [String] the name of the tag
|
|
36
|
+
# @param markup [String] the tag markup containing parameters
|
|
37
|
+
# @param tokens [Array] parse tokens (unused)
|
|
38
|
+
def initialize(tag_name, markup, tokens)
|
|
39
|
+
super
|
|
40
|
+
@markup = markup.strip
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Render the polaroid tag
|
|
44
|
+
#
|
|
45
|
+
# @param context [Liquid::Context] the Liquid rendering context
|
|
46
|
+
# @return [String] rendered HTML
|
|
47
|
+
def render(context)
|
|
48
|
+
# Parse markup
|
|
49
|
+
params = parse_markup(@markup, context)
|
|
50
|
+
|
|
51
|
+
# Validate required image_url
|
|
52
|
+
raise ArgumentError, "polaroid tag requires an image URL" if params[:image_url].nil? || params[:image_url].empty?
|
|
53
|
+
|
|
54
|
+
# Parse size parameter if present
|
|
55
|
+
width, height = parse_dimensions(params[:size]) if params[:size]
|
|
56
|
+
|
|
57
|
+
# Determine link URL (defaults to image URL)
|
|
58
|
+
# Track if link was explicitly provided
|
|
59
|
+
explicit_link = !params[:link].nil? && !params[:link].empty?
|
|
60
|
+
link_url = params[:link] || params[:image_url]
|
|
61
|
+
|
|
62
|
+
# Resolve archive URL (archives the link URL, not the image)
|
|
63
|
+
archive_url = resolve_archive(params[:archive], context, link_url)
|
|
64
|
+
|
|
65
|
+
# Build template variables
|
|
66
|
+
variables = build_template_variables(
|
|
67
|
+
params[:image_url],
|
|
68
|
+
width,
|
|
69
|
+
height,
|
|
70
|
+
params[:title],
|
|
71
|
+
params[:alt],
|
|
72
|
+
link_url,
|
|
73
|
+
explicit_link,
|
|
74
|
+
archive_url
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
# Get site from context
|
|
78
|
+
site = context.registers[:site]
|
|
79
|
+
|
|
80
|
+
# Render template
|
|
81
|
+
render_template(site, "polaroid", variables)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
private
|
|
85
|
+
|
|
86
|
+
# Parse the tag markup into image_url and named parameters
|
|
87
|
+
#
|
|
88
|
+
# @param markup [String] the tag markup
|
|
89
|
+
# @param context [Liquid::Context] the Liquid context
|
|
90
|
+
# @return [Hash] parsed parameters
|
|
91
|
+
def parse_markup(markup, context)
|
|
92
|
+
# Split by whitespace, keeping quoted strings and Liquid expressions together
|
|
93
|
+
# Handles escaped quotes (\") and backslashes (\\) within quoted strings
|
|
94
|
+
tokens = []
|
|
95
|
+
current = ""
|
|
96
|
+
in_quotes = false
|
|
97
|
+
quote_char = nil
|
|
98
|
+
in_liquid = 0
|
|
99
|
+
escaped = false
|
|
100
|
+
|
|
101
|
+
markup.each_char do |char|
|
|
102
|
+
# Handle escape sequences when in quotes
|
|
103
|
+
if escaped
|
|
104
|
+
current += char # Add the escaped character directly
|
|
105
|
+
escaped = false
|
|
106
|
+
next
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Check for escape character when in quotes
|
|
110
|
+
if char == "\\" && in_quotes
|
|
111
|
+
escaped = true
|
|
112
|
+
next # Don't add backslash to output, it's just the escape marker
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Track Liquid expression boundaries
|
|
116
|
+
if char == "{" && !in_quotes
|
|
117
|
+
in_liquid += 1
|
|
118
|
+
current += char
|
|
119
|
+
elsif char == "}" && !in_quotes && in_liquid.positive?
|
|
120
|
+
in_liquid -= 1
|
|
121
|
+
current += char
|
|
122
|
+
# Track quote boundaries
|
|
123
|
+
elsif ['"', "'"].include?(char) && !in_quotes && in_liquid.zero?
|
|
124
|
+
in_quotes = true
|
|
125
|
+
quote_char = char
|
|
126
|
+
current += char
|
|
127
|
+
elsif char == quote_char && in_quotes
|
|
128
|
+
in_quotes = false
|
|
129
|
+
current += char
|
|
130
|
+
quote_char = nil
|
|
131
|
+
# Split on whitespace only if not in quotes or Liquid expression
|
|
132
|
+
elsif char.match?(/\s/) && !in_quotes && in_liquid.zero?
|
|
133
|
+
tokens << current unless current.empty?
|
|
134
|
+
current = ""
|
|
135
|
+
else
|
|
136
|
+
current += char
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
tokens << current unless current.empty?
|
|
140
|
+
|
|
141
|
+
# First token is image URL (required)
|
|
142
|
+
image_url_token = tokens.shift
|
|
143
|
+
image_url = evaluate_expression(image_url_token, context, allow_nil: false)
|
|
144
|
+
|
|
145
|
+
# Parse remaining tokens as key=value pairs
|
|
146
|
+
result = { image_url: image_url }
|
|
147
|
+
tokens.each do |token|
|
|
148
|
+
next unless token =~ /^(\w+)=(.+)$/
|
|
149
|
+
|
|
150
|
+
key = Regexp.last_match(1).to_sym
|
|
151
|
+
value_token = Regexp.last_match(2)
|
|
152
|
+
|
|
153
|
+
# Evaluate value as Liquid expression
|
|
154
|
+
result[key] = evaluate_expression(value_token, context, allow_nil: true)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
result
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Resolve archive URL (may be explicit, auto-lookup, or opt-out)
|
|
161
|
+
#
|
|
162
|
+
# @param source [String, nil] the archive source
|
|
163
|
+
# @param context [Liquid::Context] the Liquid context (unused but kept for consistency)
|
|
164
|
+
# @param url [String] the target URL to archive
|
|
165
|
+
# @return [String, nil] resolved archive URL
|
|
166
|
+
def resolve_archive(source, context, url)
|
|
167
|
+
# Check for explicit opt-out
|
|
168
|
+
return nil if source&.downcase == "none"
|
|
169
|
+
|
|
170
|
+
# Check for explicit archive URL
|
|
171
|
+
return evaluate_expression(source, context, allow_nil: true) if source && !source.empty?
|
|
172
|
+
|
|
173
|
+
# Auto-lookup if enabled (archives the link URL, not the image)
|
|
174
|
+
return archive_url_for(url) if archive_enabled?
|
|
175
|
+
|
|
176
|
+
nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Build template variables hash for rendering
|
|
180
|
+
#
|
|
181
|
+
# @param image_url [String] the image URL
|
|
182
|
+
# @param width [String, nil] the image width
|
|
183
|
+
# @param height [String, nil] the image height
|
|
184
|
+
# @param title [String, nil] the title text
|
|
185
|
+
# @param alt [String, nil] the alt text for the image
|
|
186
|
+
# @param link_url [String] the link URL
|
|
187
|
+
# @param explicit_link [Boolean] whether link was explicitly provided
|
|
188
|
+
# @param archive_url [String, nil] the archive URL
|
|
189
|
+
# @return [Hash] template variables with raw and escaped versions
|
|
190
|
+
def build_template_variables(image_url, width, height, title, alt, link_url, explicit_link, archive_url)
|
|
191
|
+
# Only set link_display if link was explicitly provided (not defaulted to image)
|
|
192
|
+
link_display = explicit_link && link_url ? strip_protocol(link_url) : nil
|
|
193
|
+
|
|
194
|
+
{
|
|
195
|
+
"image_url" => image_url,
|
|
196
|
+
"link_url" => link_url,
|
|
197
|
+
"title" => title,
|
|
198
|
+
"alt" => alt,
|
|
199
|
+
"link_display" => link_display,
|
|
200
|
+
"archive_url" => archive_url,
|
|
201
|
+
"width" => width,
|
|
202
|
+
"height" => height,
|
|
203
|
+
"escaped_image_url" => CGI.escapeHTML(image_url),
|
|
204
|
+
"escaped_link_url" => link_url ? CGI.escapeHTML(link_url) : nil,
|
|
205
|
+
"escaped_title" => title && !title.empty? ? CGI.escapeHTML(title) : " ",
|
|
206
|
+
"escaped_alt" => alt && !alt.empty? ? CGI.escapeHTML(alt) : "",
|
|
207
|
+
"escaped_link_display" => link_display && !link_display.empty? ? CGI.escapeHTML(link_display) : " ",
|
|
208
|
+
"escaped_archive_url" => archive_url ? CGI.escapeHTML(archive_url) : nil
|
|
209
|
+
}
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Strip protocol from URL for display
|
|
213
|
+
#
|
|
214
|
+
# @param url [String] the URL
|
|
215
|
+
# @return [String] URL without protocol
|
|
216
|
+
def strip_protocol(url)
|
|
217
|
+
url.sub(%r{^https?://}, "")
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Register the tag with Liquid
|
|
223
|
+
Liquid::Template.register_tag("polaroid", JekyllHighlightCards::PolaroidTag)
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module JekyllHighlightCards
|
|
4
|
+
# Custom exception for template not found errors
|
|
5
|
+
class TemplateNotFoundError < StandardError; end
|
|
6
|
+
|
|
7
|
+
# Custom exception for template rendering errors
|
|
8
|
+
class TemplateRenderError < StandardError; end
|
|
9
|
+
|
|
10
|
+
# Module for rendering Liquid templates with user override support
|
|
11
|
+
module TemplateRenderer
|
|
12
|
+
# Render a template with given variables
|
|
13
|
+
#
|
|
14
|
+
# @param site [Jekyll::Site] the Jekyll site object
|
|
15
|
+
# @param template_name [String] template name (e.g., "linkcard", "polaroid")
|
|
16
|
+
# @param variables [Hash] variables to pass to template
|
|
17
|
+
# @return [String] rendered HTML
|
|
18
|
+
# @raise [TemplateNotFoundError] if template file not found
|
|
19
|
+
# @raise [TemplateRenderError] if template rendering fails
|
|
20
|
+
def render_template(site, template_name, variables)
|
|
21
|
+
template_path = find_template_path(site, template_name)
|
|
22
|
+
|
|
23
|
+
raise TemplateNotFoundError, "Template not found: #{template_name}" if template_path.nil?
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
template_content = File.read(template_path)
|
|
27
|
+
template = Liquid::Template.parse(template_content)
|
|
28
|
+
template.render(variables)
|
|
29
|
+
rescue Errno::ENOENT, Errno::EACCES => e
|
|
30
|
+
raise TemplateRenderError, "Failed to read template '#{template_name}' at #{template_path}: #{e.message}"
|
|
31
|
+
rescue Encoding::InvalidByteSequenceError => e
|
|
32
|
+
raise TemplateRenderError, "Invalid encoding in template '#{template_name}' at #{template_path}: #{e.message}"
|
|
33
|
+
rescue Liquid::SyntaxError, Liquid::Error => e
|
|
34
|
+
raise TemplateRenderError, "Liquid error in template '#{template_name}': #{e.message}"
|
|
35
|
+
rescue StandardError => e
|
|
36
|
+
raise TemplateRenderError, "Unexpected error rendering template '#{template_name}': #{e.message}"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Find template file path, checking user override first, then gem default
|
|
41
|
+
#
|
|
42
|
+
# @param site [Jekyll::Site] the Jekyll site object
|
|
43
|
+
# @param template_name [String] template name without .html extension
|
|
44
|
+
# @return [String, nil] path to template file or nil if not found
|
|
45
|
+
# @raise [ArgumentError] if template_name contains invalid characters
|
|
46
|
+
def find_template_path(site, template_name)
|
|
47
|
+
validate_template_name!(template_name)
|
|
48
|
+
|
|
49
|
+
template_filename = "#{template_name}.html"
|
|
50
|
+
relative_path = File.join("highlight-cards", template_filename)
|
|
51
|
+
|
|
52
|
+
# Check for user override first
|
|
53
|
+
user_path = find_user_template(site, relative_path)
|
|
54
|
+
return user_path if user_path
|
|
55
|
+
|
|
56
|
+
# Fall back to gem bundled template
|
|
57
|
+
find_gem_template(relative_path)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
# Validate template name to prevent path traversal attacks
|
|
63
|
+
#
|
|
64
|
+
# @param template_name [String] the template name to validate
|
|
65
|
+
# @raise [ArgumentError] if template_name contains invalid characters
|
|
66
|
+
def validate_template_name!(template_name)
|
|
67
|
+
return if template_name.match?(/\A[A-Za-z0-9_-]+\z/)
|
|
68
|
+
|
|
69
|
+
raise ArgumentError, "Invalid template name: #{template_name}. " \
|
|
70
|
+
"Must contain only letters, numbers, hyphens, and underscores."
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Find template in user's site _includes directory
|
|
74
|
+
#
|
|
75
|
+
# @param site [Jekyll::Site] the Jekyll site object
|
|
76
|
+
# @param relative_path [String] relative path to template
|
|
77
|
+
# @return [String, nil] path to template or nil
|
|
78
|
+
def find_user_template(site, relative_path)
|
|
79
|
+
return nil unless site&.source
|
|
80
|
+
|
|
81
|
+
includes_dir = File.join(site.source, "_includes")
|
|
82
|
+
template_path = File.join(includes_dir, relative_path)
|
|
83
|
+
|
|
84
|
+
safe_template_path(includes_dir, template_path)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Find template in gem's bundled _includes directory
|
|
88
|
+
#
|
|
89
|
+
# @param relative_path [String] relative path to template
|
|
90
|
+
# @return [String, nil] path to template or nil
|
|
91
|
+
def find_gem_template(relative_path)
|
|
92
|
+
gem_root = File.expand_path("../..", __dir__)
|
|
93
|
+
includes_dir = File.join(gem_root, "_includes")
|
|
94
|
+
template_path = File.join(includes_dir, relative_path)
|
|
95
|
+
|
|
96
|
+
safe_template_path(includes_dir, template_path)
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Verify template path is safe (within allowed directory)
|
|
100
|
+
#
|
|
101
|
+
# @param allowed_dir [String] the allowed base directory
|
|
102
|
+
# @param template_path [String] the template path to check
|
|
103
|
+
# @return [String, nil] template path if safe, nil otherwise
|
|
104
|
+
def safe_template_path(allowed_dir, template_path)
|
|
105
|
+
return nil unless File.exist?(template_path)
|
|
106
|
+
|
|
107
|
+
expanded_dir = File.expand_path(allowed_dir)
|
|
108
|
+
expanded_path = File.expand_path(template_path)
|
|
109
|
+
|
|
110
|
+
expanded_path.start_with?(expanded_dir) ? template_path : nil
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "jekyll"
|
|
4
|
+
require "liquid"
|
|
5
|
+
require "cgi"
|
|
6
|
+
require "net/http"
|
|
7
|
+
require "uri"
|
|
8
|
+
require "json"
|
|
9
|
+
|
|
10
|
+
require_relative "jekyll-highlight-cards/version"
|
|
11
|
+
require_relative "jekyll-highlight-cards/dimension_parser"
|
|
12
|
+
require_relative "jekyll-highlight-cards/expression_evaluator"
|
|
13
|
+
require_relative "jekyll-highlight-cards/archive_helper"
|
|
14
|
+
require_relative "jekyll-highlight-cards/template_renderer"
|
|
15
|
+
|
|
16
|
+
# Require tags and hooks
|
|
17
|
+
require_relative "jekyll-highlight-cards/linkcard_tag"
|
|
18
|
+
require_relative "jekyll-highlight-cards/polaroid_tag"
|
|
19
|
+
require_relative "jekyll-highlight-cards/image_sizing_hooks"
|
|
20
|
+
|
|
21
|
+
# jekyll-highlight-cards: Styled card components for Jekyll
|
|
22
|
+
#
|
|
23
|
+
# This gem provides:
|
|
24
|
+
# - {LinkcardTag}: `{% linkcard %}` Liquid tag for styled link cards
|
|
25
|
+
# - {PolaroidTag}: `{% polaroid %}` Liquid tag for polaroid-style image cards
|
|
26
|
+
# - {ImageSizingHooks}: Markdown image sizing syntax ``
|
|
27
|
+
# - {ArchiveHelper}: Internet Archive integration with caching
|
|
28
|
+
#
|
|
29
|
+
# @example Basic linkcard usage
|
|
30
|
+
# {% linkcard https://example.com My Title %}
|
|
31
|
+
#
|
|
32
|
+
# @example Basic polaroid usage
|
|
33
|
+
# {% polaroid /assets/image.jpg size=300x200 title="Photo" %}
|
|
34
|
+
#
|
|
35
|
+
# @example Markdown image sizing
|
|
36
|
+
# 
|
|
37
|
+
#
|
|
38
|
+
# @see README.md Full usage documentation
|
|
39
|
+
module JekyllHighlightCards
|
|
40
|
+
|
|
41
|
+
# 1. Define the path to SCSS files relative to this Ruby file
|
|
42
|
+
SASS_PATH = File.join(File.dirname(__FILE__), "../_sass")
|
|
43
|
+
|
|
44
|
+
# 2. Register a hook to run after Jekyll initializes
|
|
45
|
+
Jekyll::Hooks.register :site, :after_init do |site|
|
|
46
|
+
|
|
47
|
+
# Ensure the 'sass' and 'load_paths' config keys exist
|
|
48
|
+
site.config["sass"] ||= {}
|
|
49
|
+
site.config["sass"]["load_paths"] ||= []
|
|
50
|
+
|
|
51
|
+
# 3. Append your plugin's path to the load_paths array
|
|
52
|
+
# We check first to avoid adding it multiple times (e.g. in watch mode)
|
|
53
|
+
unless site.config["sass"]["load_paths"].include?(SASS_PATH)
|
|
54
|
+
site.config["sass"]["load_paths"] << SASS_PATH
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"release-type": "ruby",
|
|
3
|
+
"bump-minor-pre-major": true,
|
|
4
|
+
"bump-patch-for-minor-pre-major": false,
|
|
5
|
+
"include-component-in-tag": false,
|
|
6
|
+
"packages": {
|
|
7
|
+
".": {
|
|
8
|
+
"version-file": "lib/jekyll-highlight-cards/version.rb",
|
|
9
|
+
"pull-request-header": ":service_dog: I have created a release \\*bark\\* \\*woof\\*"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
metadata
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: jekyll-highlight-cards
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.3.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Texarkanine
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-12-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: jekyll
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '4.0'
|
|
20
|
+
- - "<"
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '5.0'
|
|
23
|
+
type: :runtime
|
|
24
|
+
prerelease: false
|
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
26
|
+
requirements:
|
|
27
|
+
- - ">="
|
|
28
|
+
- !ruby/object:Gem::Version
|
|
29
|
+
version: '4.0'
|
|
30
|
+
- - "<"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '5.0'
|
|
33
|
+
- !ruby/object:Gem::Dependency
|
|
34
|
+
name: liquid
|
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '4.0'
|
|
40
|
+
- - "<"
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '5.0'
|
|
43
|
+
type: :runtime
|
|
44
|
+
prerelease: false
|
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
46
|
+
requirements:
|
|
47
|
+
- - ">="
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: '4.0'
|
|
50
|
+
- - "<"
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '5.0'
|
|
53
|
+
- !ruby/object:Gem::Dependency
|
|
54
|
+
name: bundler
|
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
|
56
|
+
requirements:
|
|
57
|
+
- - "~>"
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: '2.0'
|
|
60
|
+
type: :development
|
|
61
|
+
prerelease: false
|
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
63
|
+
requirements:
|
|
64
|
+
- - "~>"
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: '2.0'
|
|
67
|
+
- !ruby/object:Gem::Dependency
|
|
68
|
+
name: rake
|
|
69
|
+
requirement: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - "~>"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '13.0'
|
|
74
|
+
type: :development
|
|
75
|
+
prerelease: false
|
|
76
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
77
|
+
requirements:
|
|
78
|
+
- - "~>"
|
|
79
|
+
- !ruby/object:Gem::Version
|
|
80
|
+
version: '13.0'
|
|
81
|
+
- !ruby/object:Gem::Dependency
|
|
82
|
+
name: rspec
|
|
83
|
+
requirement: !ruby/object:Gem::Requirement
|
|
84
|
+
requirements:
|
|
85
|
+
- - "~>"
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: '3.12'
|
|
88
|
+
type: :development
|
|
89
|
+
prerelease: false
|
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
- - "~>"
|
|
93
|
+
- !ruby/object:Gem::Version
|
|
94
|
+
version: '3.12'
|
|
95
|
+
- !ruby/object:Gem::Dependency
|
|
96
|
+
name: rubocop
|
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
|
98
|
+
requirements:
|
|
99
|
+
- - "~>"
|
|
100
|
+
- !ruby/object:Gem::Version
|
|
101
|
+
version: '1.50'
|
|
102
|
+
type: :development
|
|
103
|
+
prerelease: false
|
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
105
|
+
requirements:
|
|
106
|
+
- - "~>"
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '1.50'
|
|
109
|
+
- !ruby/object:Gem::Dependency
|
|
110
|
+
name: rubocop-rake
|
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
|
112
|
+
requirements:
|
|
113
|
+
- - "~>"
|
|
114
|
+
- !ruby/object:Gem::Version
|
|
115
|
+
version: '0.6'
|
|
116
|
+
type: :development
|
|
117
|
+
prerelease: false
|
|
118
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - "~>"
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0.6'
|
|
123
|
+
- !ruby/object:Gem::Dependency
|
|
124
|
+
name: rubocop-rspec
|
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
|
126
|
+
requirements:
|
|
127
|
+
- - "~>"
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '2.20'
|
|
130
|
+
type: :development
|
|
131
|
+
prerelease: false
|
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
133
|
+
requirements:
|
|
134
|
+
- - "~>"
|
|
135
|
+
- !ruby/object:Gem::Version
|
|
136
|
+
version: '2.20'
|
|
137
|
+
- !ruby/object:Gem::Dependency
|
|
138
|
+
name: simplecov
|
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
|
140
|
+
requirements:
|
|
141
|
+
- - "~>"
|
|
142
|
+
- !ruby/object:Gem::Version
|
|
143
|
+
version: '0.22'
|
|
144
|
+
type: :development
|
|
145
|
+
prerelease: false
|
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
147
|
+
requirements:
|
|
148
|
+
- - "~>"
|
|
149
|
+
- !ruby/object:Gem::Version
|
|
150
|
+
version: '0.22'
|
|
151
|
+
- !ruby/object:Gem::Dependency
|
|
152
|
+
name: webmock
|
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
|
154
|
+
requirements:
|
|
155
|
+
- - "~>"
|
|
156
|
+
- !ruby/object:Gem::Version
|
|
157
|
+
version: '3.18'
|
|
158
|
+
type: :development
|
|
159
|
+
prerelease: false
|
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
161
|
+
requirements:
|
|
162
|
+
- - "~>"
|
|
163
|
+
- !ruby/object:Gem::Version
|
|
164
|
+
version: '3.18'
|
|
165
|
+
description: A Jekyll gem that provides two Liquid tags (linkcard and polaroid) for
|
|
166
|
+
creating styled card components with integrated Internet Archive functionality and
|
|
167
|
+
image sizing. Also includes Markdown image sizing hooks.
|
|
168
|
+
email:
|
|
169
|
+
- texarkanine@protonmail.com
|
|
170
|
+
executables: []
|
|
171
|
+
extensions: []
|
|
172
|
+
extra_rdoc_files: []
|
|
173
|
+
files:
|
|
174
|
+
- ".cursorignore"
|
|
175
|
+
- ".github/workflows/ci.yaml"
|
|
176
|
+
- ".github/workflows/release-please.yaml"
|
|
177
|
+
- ".github/workflows/update-gemfile-lock.yaml"
|
|
178
|
+
- ".gitignore"
|
|
179
|
+
- ".release-please-manifest.json"
|
|
180
|
+
- ".rspec"
|
|
181
|
+
- ".rubocop.yml"
|
|
182
|
+
- ".ruby-version"
|
|
183
|
+
- CHANGELOG.md
|
|
184
|
+
- CONTRIBUTING.md
|
|
185
|
+
- Gemfile
|
|
186
|
+
- Gemfile.lock
|
|
187
|
+
- LICENSE
|
|
188
|
+
- README.md
|
|
189
|
+
- _includes/highlight-cards/linkcard.html
|
|
190
|
+
- _includes/highlight-cards/polaroid.html
|
|
191
|
+
- _sass/_highlight-cards.scss
|
|
192
|
+
- docs/linkcard-example.jpg
|
|
193
|
+
- docs/polaroid-example.jpg
|
|
194
|
+
- docs/polaroid-sidebyside-example.jpg
|
|
195
|
+
- docs/polaroid-stacked-example.jpg
|
|
196
|
+
- jekyll-highlight-cards.gemspec
|
|
197
|
+
- lib/jekyll-highlight-cards.rb
|
|
198
|
+
- lib/jekyll-highlight-cards/archive_helper.rb
|
|
199
|
+
- lib/jekyll-highlight-cards/dimension_parser.rb
|
|
200
|
+
- lib/jekyll-highlight-cards/expression_evaluator.rb
|
|
201
|
+
- lib/jekyll-highlight-cards/image_sizing_hooks.rb
|
|
202
|
+
- lib/jekyll-highlight-cards/linkcard_tag.rb
|
|
203
|
+
- lib/jekyll-highlight-cards/polaroid_tag.rb
|
|
204
|
+
- lib/jekyll-highlight-cards/template_renderer.rb
|
|
205
|
+
- lib/jekyll-highlight-cards/version.rb
|
|
206
|
+
- release-please-config.json
|
|
207
|
+
homepage: https://github.com/texarkanine/jekyll-highlight-cards
|
|
208
|
+
licenses:
|
|
209
|
+
- AGPL-3.0-or-later
|
|
210
|
+
metadata:
|
|
211
|
+
homepage_uri: https://github.com/texarkanine/jekyll-highlight-cards
|
|
212
|
+
source_code_uri: https://github.com/texarkanine/jekyll-highlight-cards
|
|
213
|
+
changelog_uri: https://github.com/texarkanine/jekyll-highlight-cards/blob/main/CHANGELOG.md
|
|
214
|
+
rubygems_mfa_required: 'true'
|
|
215
|
+
post_install_message:
|
|
216
|
+
rdoc_options: []
|
|
217
|
+
require_paths:
|
|
218
|
+
- lib
|
|
219
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
|
+
requirements:
|
|
221
|
+
- - ">="
|
|
222
|
+
- !ruby/object:Gem::Version
|
|
223
|
+
version: 3.1.0
|
|
224
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
|
+
requirements:
|
|
226
|
+
- - ">="
|
|
227
|
+
- !ruby/object:Gem::Version
|
|
228
|
+
version: '0'
|
|
229
|
+
requirements: []
|
|
230
|
+
rubygems_version: 3.3.27
|
|
231
|
+
signing_key:
|
|
232
|
+
specification_version: 4
|
|
233
|
+
summary: Jekyll plugin providing linkcard and polaroid Liquid tags with archive integration
|
|
234
|
+
test_files: []
|