|
|
@ -43,6 +43,18 @@ func (ch *CaddyHugo) ServeHTTPWithNext(next httpserver.Handler, c *caddy.Control |
|
|
|
w.Write(assets.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/vue.js") { |
|
|
|
|
|
|
|
w.Write(assets.MustAsset("js/vue.js")) |
|
|
|
|
|
|
|
return http.StatusOK, nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if strings.HasPrefix(r.URL.Path, "/hugo/moment.js") { |
|
|
|
|
|
|
|
w.Write(assets.MustAsset("js/moment.js")) |
|
|
|
|
|
|
|
return http.StatusOK, nil |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if strings.HasPrefix(r.URL.Path, "/hugo/font-awesome.css") { |
|
|
|
|
|
|
|
w.Write(assets.MustAsset("css/font-awesome.min.css")) |
|
|
|
|
|
|
|
return http.StatusOK, nil |
|
|
|
|
|
|
|
} |
|
|
|
if strings.HasPrefix(r.URL.Path, "/hugo/admin") { |
|
|
|
if strings.HasPrefix(r.URL.Path, "/hugo/admin") { |
|
|
|
return ch.Admin().ServeHTTP(w, r) |
|
|
|
return ch.Admin().ServeHTTP(w, r) |
|
|
|
} |
|
|
|
} |
|
|
|