Support custom robots.txt

This commit is contained in:
Unknwon 2014-09-21 19:39:10 -04:00
parent b72d7c201a
commit 1273b3d3a9
2 changed files with 12 additions and 0 deletions

View file

@ -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 {