module Dimples
  class Template
    include Frontable

    def initialize(site, path)
      @site = site
      @contents, @metadata = read_with_front_matter(path)
    end

    def render(page, context)
      payload = page.metadata.merge(context)

      puts "The payload for #{page} will be: #{payload}"
      # bubble up only if it itself has a template?
    end
  end
end
# frozen_string_literal: true

module Dimples
  class Template
    include Frontable
    include Renderable

    attr_accessor :path
    attr_accessor :contents
    attr_accessor :metadata

    def initialize(site, path)
      @site = site
      @path = path
      @contents, @metadata = read_with_front_matter(path)
    end
  end
end

Include Renderable, add attr_accessors and set the path
Include Renderable, add attr_accessors and set the path
