2011-10-30 23:02:41 +00:00
|
|
|
module Locomotive
|
2011-07-05 20:34:15 +00:00
|
|
|
class RobotsController < ActionController::Base
|
|
|
|
|
|
|
|
include Locomotive::Routing::SiteDispatcher
|
|
|
|
|
|
|
|
include Locomotive::Render
|
|
|
|
|
|
|
|
before_filter :require_site
|
|
|
|
|
|
|
|
respond_to :txt
|
|
|
|
|
|
|
|
def show
|
2011-12-27 13:31:36 +00:00
|
|
|
template = ::Liquid::Template.parse(current_site.robots_txt)
|
2011-07-05 20:34:15 +00:00
|
|
|
render :text => template.render('request_host' => self.request.host.downcase)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|