Module: Jekyll::Filters::File

Defined in:
lib/jekyll/filters/file.rb

Instance Method Summary collapse

Instance Method Details

#extname(input) ⇒ Nil|String

File extension.

Example usage:

page.file.path | extname }

Parameters:

  • (String)

Returns:

  • (Nil|String)


14
15
16
17
18
# File 'lib/jekyll/filters/file.rb', line 14

def extname(input)
  return unless ::File.exist? input.to_s

  ::File.extname input
end