discourse/app/views/robots_txt/index.erb

24 lines
647 B
Plaintext
Raw Normal View History

2013-02-05 13:16:51 -06:00
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
#
<% @allowed_user_agents.each do |user_agent| %>
User-agent: <%= user_agent %>
<% end %>
<% RobotsTxtController::DISALLOWED_PATHS.each do |path| %>
Disallow: <%= Discourse.base_uri + path %>
<% end %>
<% if @disallowed_user_agents %>
<% @disallowed_user_agents.each do |user_agent| %>
User-agent: <%= user_agent %>
Disallow: <%= Discourse.base_uri + "/" %>
<% end %>
<% end %>
<%= server_plugin_outlet "robots_txt_index" %>
<% @crawler_delayed_agents.each do |agent, delay| %>
User-agent: <%= agent %>
Crawl-delay: <%= delay %>
<% end %>