[ci skip] updates on restructuring stuff

This commit is contained in:
Henrique Dias
2016-03-06 15:39:03 +00:00
parent b97ef80596
commit e33c79224f
9 changed files with 127 additions and 84 deletions

18
hugo.go
View File

@@ -123,7 +123,7 @@ func (h CaddyHugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
// Serve the static assets
if page == "assets" {
return serveAssets(w, r)
code, err = serveAssets(w, r)
}
// Browse page
@@ -151,6 +151,22 @@ func (h CaddyHugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error
log.Panic(err)
}
/*
// Create the functions map, then the template, check for erros and
// execute the template if there aren't errors
functions := template.FuncMap{
"Defined": utils.Defined,
}
switch code {
case 404:
tpl, _ := utils.GetTemplate(r, functions, "404")
tpl.Execute(w, nil)
code = 200
err = nil
} */
return code, err
}