From d733efc1cc27739a386188e3aa02c8a524b06e8d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 12 Mar 2016 13:48:34 -0500 Subject: [PATCH] #1286 #2098 Alpha support for custom templates No guarantee for compatibility with future changes --- README.md | 2 +- cmd/web.go | 9 +++++---- gogs.go | 2 +- templates/.VERSION | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c760929de5..c12d55e39c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current version: 0.9.6 +##### Current version: 0.9.7 | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/cmd/web.go b/cmd/web.go index c3c4ed75cd..97bb03213b 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -86,7 +86,7 @@ func checkVersion() { {"github.com/go-macaron/session", session.Version, "0.1.6"}, {"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"}, {"gopkg.in/ini.v1", ini.Version, "1.8.4"}, - {"gopkg.in/macaron.v1", macaron.Version, "0.8.0"}, + {"gopkg.in/macaron.v1", macaron.Version, "1.1.1"}, {"github.com/gogits/git-module", git.Version, "0.2.9"}, {"github.com/gogits/go-gogs-client", gogs.Version, "0.7.3"}, } @@ -124,9 +124,10 @@ func newMacaron() *macaron.Macaron { }, )) m.Use(macaron.Renderer(macaron.RenderOptions{ - Directory: path.Join(setting.StaticRootPath, "templates"), - Funcs: template.NewFuncMap(), - IndentJSON: macaron.Env != macaron.PROD, + Directory: path.Join(setting.StaticRootPath, "templates"), + AppendDirectories: []string{path.Join(setting.CustomPath, "templates")}, + Funcs: template.NewFuncMap(), + IndentJSON: macaron.Env != macaron.PROD, })) localeNames, err := bindata.AssetDir("conf/locale") diff --git a/gogs.go b/gogs.go index 186b88d57d..2c3ade5430 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.6.0311" +const APP_VER = "0.9.7.0312" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/templates/.VERSION b/templates/.VERSION index 0d83594e58..c378d4dd2d 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.6.0311 \ No newline at end of file +0.9.7.0312 \ No newline at end of file