You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
370 B
Ruby
16 lines
370 B
Ruby
module Jekyll
|
|
class OverlineFilter
|
|
def self.apply_overline(content)
|
|
content.gsub(/~([^~]+)~/, '<span class="overline">\1</span>')
|
|
end
|
|
end
|
|
|
|
Hooks.register [:documents, :pages], :post_render do |item|
|
|
if item.output_ext == ".html"
|
|
item.output = OverlineFilter.apply_overline(item.output)
|
|
end
|
|
end
|
|
end
|
|
|
|
puts "✅ Overline plugin loaded!"
|