From 1273b3d3a985e0aeb88c632e27d0e8dbc8dd2e19 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 21 Sep 2014 19:39:10 -0400 Subject: Support custom robots.txt --- modules/setting/setting.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/setting') diff --git a/modules/setting/setting.go b/modules/setting/setting.go index a1ab43d022..67e48108d9 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -108,6 +108,7 @@ var ( ProdMode bool RunUser string IsWindows bool + HasRobotsTxt bool ) func init() { @@ -260,6 +261,8 @@ func NewConfigContext() { Langs = Cfg.MustValueArray("i18n", "LANGS", ",") Names = Cfg.MustValueArray("i18n", "NAMES", ",") + + HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt")) } var Service struct { -- cgit v1.2.3