def compiled_content(params={})
Nanoc3::NotificationCenter.post(:visit_started, self.item)
Nanoc3::NotificationCenter.post(:visit_ended, self.item)
puts "*** Attempting to fetch content for #{self.inspect}" if $DEBUG
raise Nanoc3::Errors::UnmetDependency.new(self) unless compiled?
snapshot_name = params[:snapshot]
if @content[:pre]
snapshot_name ||= :pre
else
snapshot_name ||= :last
end
if @content[snapshot_name].nil?
warn "WARNING: The “#{self.item.identifier}” item (rep “#{self.name}”) does not have the requested snapshot named #{snapshot_name.inspect}.\n\n* Make sure that you are requesting the correct snapshot.\n* It is not possible to request the compiled content of a binary item representation; if this item is marked as binary even though you believe it should be textual, you may need to add the extension of this item to the site configuration’s `text_extensions` array.".make_compatible_with_env
end
@content[snapshot_name]
end