class Jekyll::Converters::Identity

Identity converter. Returns same content as given. For more info on converters see jekyllrb.com/docs/plugins/converters/

Public Instance Methods

convert(content) click to toggle source

Logic to do the content conversion.

content - String content of file (without front matter).

Returns a String of the converted content.

# File lib/jekyll/converters/identity.rb, line 36
def convert(content)
  content
end
matches(_ext) click to toggle source

Public: Does the given extension match this converter’s list of acceptable extensions? Takes one argument: the file’s extension (including the dot).

_ext - The String extension to check (not relevant here)

Returns true since it always matches.

# File lib/jekyll/converters/identity.rb, line 18
def matches(_ext)
  true
end
output_ext(ext) click to toggle source

Public: The extension to be given to the output file (including the dot).

ext - The String extension or original file.

Returns The String output file extension.

# File lib/jekyll/converters/identity.rb, line 27
def output_ext(ext)
  ext
end