updates
This commit is contained in:
parent
0797fde4e3
commit
b81ec9ecdf
48
binary.go
48
binary.go
|
@ -1,5 +1,7 @@
|
||||||
// Code generated by go-bindata.
|
// Code generated by go-bindata.
|
||||||
// sources:
|
// sources:
|
||||||
|
// assets/public/css/styles.css
|
||||||
|
// assets/public/js/application.js
|
||||||
// assets/templates/editor.tmpl
|
// assets/templates/editor.tmpl
|
||||||
// assets/templates/frontmatter.tmpl
|
// assets/templates/frontmatter.tmpl
|
||||||
// DO NOT EDIT!
|
// DO NOT EDIT!
|
||||||
|
@ -28,6 +30,42 @@ type asset struct {
|
||||||
info os.FileInfo
|
info os.FileInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// publicCssStylesCss reads file data from disk. It returns an error on failure.
|
||||||
|
func publicCssStylesCss() (*asset, error) {
|
||||||
|
path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-hugo\\assets\\public\\css\\styles.css"
|
||||||
|
name := "public/css/styles.css"
|
||||||
|
bytes, err := bindataRead(path, name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
fi, err := os.Stat(path)
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
a := &asset{bytes: bytes, info: fi}
|
||||||
|
return a, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// publicJsApplicationJs reads file data from disk. It returns an error on failure.
|
||||||
|
func publicJsApplicationJs() (*asset, error) {
|
||||||
|
path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-hugo\\assets\\public\\js\\application.js"
|
||||||
|
name := "public/js/application.js"
|
||||||
|
bytes, err := bindataRead(path, name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
fi, err := os.Stat(path)
|
||||||
|
if err != nil {
|
||||||
|
err = fmt.Errorf("Error reading asset info %s at %s: %v", name, path, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
a := &asset{bytes: bytes, info: fi}
|
||||||
|
return a, err
|
||||||
|
}
|
||||||
|
|
||||||
// templatesEditorTmpl reads file data from disk. It returns an error on failure.
|
// templatesEditorTmpl reads file data from disk. It returns an error on failure.
|
||||||
func templatesEditorTmpl() (*asset, error) {
|
func templatesEditorTmpl() (*asset, error) {
|
||||||
path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-hugo\\assets\\templates\\editor.tmpl"
|
path := "D:\\Code\\Go\\src\\github.com\\hacdias\\caddy-hugo\\assets\\templates\\editor.tmpl"
|
||||||
|
@ -116,6 +154,8 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
|
"public/css/styles.css": publicCssStylesCss,
|
||||||
|
"public/js/application.js": publicJsApplicationJs,
|
||||||
"templates/editor.tmpl": templatesEditorTmpl,
|
"templates/editor.tmpl": templatesEditorTmpl,
|
||||||
"templates/frontmatter.tmpl": templatesFrontmatterTmpl,
|
"templates/frontmatter.tmpl": templatesFrontmatterTmpl,
|
||||||
}
|
}
|
||||||
|
@ -160,6 +200,14 @@ type bintree struct {
|
||||||
Children map[string]*bintree
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
|
"public": &bintree{nil, map[string]*bintree{
|
||||||
|
"css": &bintree{nil, map[string]*bintree{
|
||||||
|
"styles.css": &bintree{publicCssStylesCss, map[string]*bintree{}},
|
||||||
|
}},
|
||||||
|
"js": &bintree{nil, map[string]*bintree{
|
||||||
|
"application.js": &bintree{publicJsApplicationJs, map[string]*bintree{}},
|
||||||
|
}},
|
||||||
|
}},
|
||||||
"templates": &bintree{nil, map[string]*bintree{
|
"templates": &bintree{nil, map[string]*bintree{
|
||||||
"editor.tmpl": &bintree{templatesEditorTmpl, map[string]*bintree{}},
|
"editor.tmpl": &bintree{templatesEditorTmpl, map[string]*bintree{}},
|
||||||
"frontmatter.tmpl": &bintree{templatesFrontmatterTmpl, map[string]*bintree{}},
|
"frontmatter.tmpl": &bintree{templatesFrontmatterTmpl, map[string]*bintree{}},
|
||||||
|
|
10
setup.go
10
setup.go
|
@ -96,6 +96,14 @@ func ParseHugo(c *caddy.Controller, root string) (*Config, error) {
|
||||||
Hugo: installer.GetPath(),
|
Hugo: installer.GetPath(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stlsbytes, err := Asset("public/css/styles.css")
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return conf, err
|
||||||
|
}
|
||||||
|
|
||||||
|
conf.Styles = string(stlsbytes)
|
||||||
|
|
||||||
for c.Next() {
|
for c.Next() {
|
||||||
args := c.RemainingArgs()
|
args := c.RemainingArgs()
|
||||||
|
|
||||||
|
@ -116,7 +124,7 @@ func ParseHugo(c *caddy.Controller, root string) (*Config, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return conf, err
|
return conf, err
|
||||||
}
|
}
|
||||||
conf.Styles = string(stylesheet)
|
conf.Styles += string(stylesheet)
|
||||||
case "admin":
|
case "admin":
|
||||||
if !c.NextArg() {
|
if !c.NextArg() {
|
||||||
return nil, c.ArgErr()
|
return nil, c.ArgErr()
|
||||||
|
|
Loading…
Reference in New Issue