Sfoglia il codice sorgente

add support for robots.txt file

Anthony Woods 10 anni fa
parent
commit
196b7846cc
2 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 1 0
      pkg/cmd/web.go
  2. 2 0
      public/robots.txt

+ 1 - 0
pkg/cmd/web.go

@@ -33,6 +33,7 @@ func newMacaron() *macaron.Macaron {
 	mapStatic(m, "css", "css")
 	mapStatic(m, "img", "img")
 	mapStatic(m, "fonts", "fonts")
+	mapStatic(m, "robots.txt", "robots.txxt")
 
 	m.Use(macaron.Renderer(macaron.RenderOptions{
 		Directory:  path.Join(setting.StaticRootPath, "views"),

+ 2 - 0
public/robots.txt

@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /