Skip to content
Snippets Groups Projects
Unverified Commit 414af54a authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

add robots.txt for non-production websites (#2350)

parent e3aad9cd
No related branches found
No related tags found
No related merge requests found
class Communication::Website::Configs::RobotsTxt < Communication::Website::Configs::Base
def self.polymorphic_name
'Communication::Website::Configs::RobotsTxt'
end
def git_path(website)
"static/robots.txt"
end
def template_static
"admin/communication/websites/configs/robots_txt/static"
end
end
......@@ -10,7 +10,8 @@ module Communication::Website::WithConfigs
config_default_permalinks,
config_development_config,
config_production_config,
config_deuxfleurs_workflow
config_deuxfleurs_workflow,
config_robots_txt,
].compact
end
......@@ -39,5 +40,10 @@ module Communication::Website::WithConfigs
@config_deuxfleurs_workflow ||= Communication::Website::Configs::DeuxfleursWorkflow.find(id)
end
def config_robots_txt
return if in_production?
@config_robots_txt ||= Communication::Website::Configs::RobotsTxt.find(id)
end
end
end
# DO NOT EDIT THIS FILE BY HAND - IT WILL BE OVERWRITTEN BY OSUNY
User-Agent: *
Disallow: /
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment