From 83ed234472c85057100db5cc537049812c3a288c Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 6 Dec 2016 18:58:31 +0100 Subject: Integrate templates into bindata optionally (#314) Integrated optional bindata for the templates --- modules/public/public.go | 2 ++ modules/public/static.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/public') diff --git a/modules/public/public.go b/modules/public/public.go index 261ed88874..9c9e9d533d 100644 --- a/modules/public/public.go +++ b/modules/public/public.go @@ -6,6 +6,8 @@ package public //go:generate go-bindata -tags "bindata" -ignore "\\.go|\\.less" -pkg "public" -o "bindata.go" ../../public/... //go:generate go fmt bindata.go +//go:generate sed -i.bak s/..\/..\/public\/// bindata.go +//go:generate rm -f bindata.go.bak // Options represents the available options to configure the macaron handler. type Options struct { diff --git a/modules/public/static.go b/modules/public/static.go index 8184bc2149..f68400d329 100644 --- a/modules/public/static.go +++ b/modules/public/static.go @@ -22,7 +22,7 @@ func Static(opts *Options) macaron.Handler { AssetDir: AssetDir, AssetInfo: AssetInfo, AssetNames: AssetNames, - Prefix: "../../public", + Prefix: "", }), }, ) -- cgit v1.2.3