diff options
author | Thomas Boerger <thomas@webhippie.de> | 2016-11-29 17:26:36 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-30 00:26:36 +0800 |
commit | b6a95a8cb3d9e611caf1bb8c0d3ff773e00923d6 (patch) | |
tree | 2717811fd5b10ebaddccf3ab18070c7bc71afaec /cmd | |
parent | 4680c349ddea56e2a6a603c2d0a54bf2bb5bfe86 (diff) | |
download | gitea-b6a95a8cb3d9e611caf1bb8c0d3ff773e00923d6.tar.gz gitea-b6a95a8cb3d9e611caf1bb8c0d3ff773e00923d6.zip |
Integrate public as bindata optionally (#293)
* Dropped unused codekit config
* Integrated dynamic and static bindata for public
* Ignore public bindata
* Add a general generate make task
* Integrated flexible public assets into web command
* Updated vendoring, added all missiong govendor deps
* Made the linter happy with the bindata and dynamic code
* Moved public bindata definition to modules directory
* Ignoring the new bindata path now
* Updated to the new public modules import path
* Updated public bindata command and drop the new prefix
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go index 2a69247f99..c53f518af4 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -21,6 +21,7 @@ import ( "code.gitea.io/gitea/modules/bindata" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/public" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/template" "code.gitea.io/gitea/routers" @@ -125,9 +126,9 @@ func newMacaron() *macaron.Macaron { if setting.Protocol == setting.FCGI { m.SetURLPrefix(setting.AppSubURL) } - m.Use(macaron.Static( - path.Join(setting.StaticRootPath, "public"), - macaron.StaticOptions{ + m.Use(public.Static( + &public.Options{ + Directory: path.Join(setting.StaticRootPath, "public"), SkipLogging: setting.DisableRouterLog, }, )) |