Commit d205a946 authored by André Kerkhoff's avatar André Kerkhoff
Browse files

Add attribute foswiki.robots.disallow_agents

parent 1b304851
......@@ -6,6 +6,7 @@ default['foswiki']['install_dir'] = '/srv/foswiki'
default['foswiki']['plugins'] = []
default['foswiki']['robots']['crawl_delay'] = 5
default['foswiki']['robots']['disallow'] = []
default['foswiki']['robots']['disallow_agents'] = []
default['foswiki']['version'] = '2.1.6'
# Attributes used by a Cron job
......
......@@ -3,7 +3,7 @@ maintainer 'GSI Linux & Web Team'
maintainer_email 'cit-lw@gsi.de'
license 'All rights reserved'
description 'Installs/Configures Foswiki'
version '2.11.3'
version '2.12.0'
depends 'apache2', '< 6.0'
supports 'debian'
supports 'ubuntu'
......@@ -42,7 +42,8 @@ template "#{foswiki_dir('install')}/robots.txt" do
variables(
crawl_delay: node['foswiki']['robots']['crawl_delay'],
script_url_path: node['foswiki']['config']['ScriptUrlPath'],
disallow: node['foswiki']['robots']['disallow']
disallow: node['foswiki']['robots']['disallow'],
disallow_agents: node['foswiki']['robots']['disallow_agents']
)
end
......
......@@ -33,3 +33,9 @@ Disallow: /list/
<% (@disallow || []).each do |entry| -%>
Disallow: <%= entry %>
<% end -%>
<% unless (@disallow_agents || []).empty? -%>
<% @disallow_agents.each do |agent| -%>
User-agent: <%= agent %>
<% end -%>
Disallow: /
<% end -%>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment