updates and grunt

This commit is contained in:
Henrique Dias
2015-09-16 12:18:12 +01:00
parent 9f4841b5fa
commit e82820ec73
16 changed files with 2991 additions and 472 deletions

View File

@@ -1,8 +1,9 @@
//go:generate go-bindata -pkg assets -o assets/assets.go static/css/ static/js/ templates/ static/
//go:generate go-bindata -pkg assets -o assets/assets.go templates/ assets/dist/css/ assets/dist/js/
package hugo
import (
"log"
"mime"
"net/http"
"path/filepath"
@@ -33,8 +34,10 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
if middleware.Path(r.URL.Path).Matches("/admin") {
page := utils.ParseComponents(r)[1]
if page == "static" {
filename := strings.Replace(r.URL.Path, "/admin/", "", 1)
log.Print(page)
if page == "assets" {
filename := strings.Replace(r.URL.Path, "/admin/assets/", "assets/dist/", 1)
file, err := assets.Asset(filename)
if err != nil {