|
|
@ -314,6 +314,8 @@ func handleViewPost(app *App, w http.ResponseWriter, r *http.Request) error { |
|
|
|
// Display reserved page if that is requested resource
|
|
|
|
// Display reserved page if that is requested resource
|
|
|
|
if t, ok := pages[r.URL.Path[1:]+".tmpl"]; ok { |
|
|
|
if t, ok := pages[r.URL.Path[1:]+".tmpl"]; ok { |
|
|
|
return handleTemplatedPage(app, w, r, t) |
|
|
|
return handleTemplatedPage(app, w, r, t) |
|
|
|
|
|
|
|
} else if r.URL.Path == "/sitemap.xml" && !app.cfg.App.SingleUser { |
|
|
|
|
|
|
|
return impart.HTTPError{Status: http.StatusNotFound, Message: "Page not found."} |
|
|
|
} else if (strings.Contains(r.URL.Path, ".") && !isRaw && !isMarkdown) || r.URL.Path == "/robots.txt" || r.URL.Path == "/manifest.json" { |
|
|
|
} else if (strings.Contains(r.URL.Path, ".") && !isRaw && !isMarkdown) || r.URL.Path == "/robots.txt" || r.URL.Path == "/manifest.json" { |
|
|
|
// Serve static file
|
|
|
|
// Serve static file
|
|
|
|
app.shttp.ServeHTTP(w, r) |
|
|
|
app.shttp.ServeHTTP(w, r) |
|
|
|