In case there is no (better) solution, I will throw a very obvious simple plugin that will do the trick - put this in your _plugins/ folder as regex_filter.rb file - it takes regex as a string, as the first arg, and the replacement as the second arg (for example, {{ page.url | replace_regex: '/$', '' }} :
module Jekyll module RegexFilter def replace_regex(input, reg_str, repl_str) re = Regexp.new reg_str
sameers
source share