# File lib/staticmatic/mixins/render.rb, line 21
  def generate_html(source_file, source_dir = '')
    full_file_path = File.join(@src_dir, 'pages', source_dir, "#{source_file}.haml")

    begin

      html = generate_html_from_template_source(File.read(full_file_path))
    rescue StaticMatic::TemplateError => e
      raise e # re-raise inline errors
    rescue Exception => e
      raise StaticMatic::TemplateError.new(full_file_path, e)
    end

    html
  end