12 lines
211 B
Ruby
12 lines
211 B
Ruby
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)
|