7 lines
292 B
Ruby
7 lines
292 B
Ruby
# https://stackoverflow.com/a/53893197/
|
|
class Jekyll::MarkdownHeader < Jekyll::Converters::Markdown
|
|
def convert(content)
|
|
super.gsub(/<h(2) id="(.*?)">(.*)<\/h(\d)>/, '<h\1 id="\2">\3<a href="#\2" class="header-link">[<img src="/assets/images/link.svg" />]</a></h\1>')
|
|
end
|
|
end
|