module Jekyll::Convertible

def invalid_layout?(layout)

Returns true if the layout is invalid, false if otherwise

layout - the layout to check

Checks if the layout specified in the document actually exists
def invalid_layout?(layout)
  !data["layout"].nil? && layout.nil? && !(is_a? Jekyll::Excerpt)
end