moving assets into a dir
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
//go:generate go-bindata -pkg assets simplemde/dist/... simplemde/debug/...
|
||||||
|
package assets
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
// require.js
|
// require.js
|
||||||
// DO NOT EDIT!
|
// DO NOT EDIT!
|
||||||
|
|
||||||
package caddyhugo
|
package assets
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@@ -292,6 +292,7 @@ type bintree struct {
|
|||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*bintree
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
|
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"require.js": &bintree{requireJs, map[string]*bintree{}},
|
"require.js": &bintree{requireJs, map[string]*bintree{}},
|
||||||
"simplemde": &bintree{nil, map[string]*bintree{
|
"simplemde": &bintree{nil, map[string]*bintree{
|
||||||
@@ -353,4 +354,3 @@ func _filePath(dir, name string) string {
|
|||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
+3
-3
@@ -1,4 +1,3 @@
|
|||||||
//go:generate go-bindata -pkg caddyhugo simplemde/dist/... simplemde/debug/...
|
|
||||||
package caddyhugo
|
package caddyhugo
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -18,6 +17,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.stephensearles.com/stephen/acedoc"
|
"git.stephensearles.com/stephen/acedoc"
|
||||||
|
"git.stephensearles.com/stephen/caddy-hugo2/assets"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
"github.com/mholt/caddy"
|
"github.com/mholt/caddy"
|
||||||
@@ -146,11 +146,11 @@ func (ch *CaddyHugo) ServeHTTPWithNext(next httpserver.Handler, c *caddy.Control
|
|||||||
return http.StatusFound, nil
|
return http.StatusFound, nil
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(r.URL.Path, "/hugo/simplemde.css") {
|
if strings.HasPrefix(r.URL.Path, "/hugo/simplemde.css") {
|
||||||
w.Write(MustAsset("simplemde/dist/simplemde.min.css"))
|
w.Write(assets.MustAsset("simplemde/dist/simplemde.min.css"))
|
||||||
return http.StatusOK, nil
|
return http.StatusOK, nil
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(r.URL.Path, "/hugo/simplemde.js") {
|
if strings.HasPrefix(r.URL.Path, "/hugo/simplemde.js") {
|
||||||
w.Write(MustAsset("simplemde/debug/simplemde.js"))
|
w.Write(assets.MustAsset("simplemde/debug/simplemde.js"))
|
||||||
return http.StatusOK, nil
|
return http.StatusOK, nil
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(r.URL.Path, "/hugo/admin") {
|
if strings.HasPrefix(r.URL.Path, "/hugo/admin") {
|
||||||
|
|||||||
Reference in New Issue
Block a user