1
0
Fork 0
blog.kempkens.io/_plugins/hostname.rb

13 lines
211 B
Ruby
Raw Normal View History

2014-12-31 17:59:44 +00:00
require 'uri'
module Jekyll
module HostnameFilter
def hostname(input)
parsed_uri = URI.parse(input)
parsed_uri.host
end
end
end
Liquid::Template.register_filter(Jekyll::HostnameFilter)