pages/_plugins/hide-custom-bibtex.rb
George 08d562a104
Offline mode (closes #1181) (#2312)
Created a plugin to tackle #1181. Currently have an issue with tikzjax
since it imports some wasm file from its javascript. The rest should
work as expected.

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2024-04-08 14:51:28 -03:00

16 lines
351 B
Ruby

module Jekyll
module HideCustomBibtex
def hideCustomBibtex(input)
keywords = @context.registers[:site].config['filtered_bibtex_keywords']
keywords.each do |keyword|
input = input.gsub(/^.*\b#{keyword}\b *= *\{.*$\n/, '')
end
return input
end
end
end
Liquid::Template.register_filter(Jekyll::HideCustomBibtex)