From c813fd76a9cfe79f29eb8e89edac4d41e3b48acc Mon Sep 17 00:00:00 2001 From: "Sven.Schmalle" Date: Fri, 17 Jan 2020 16:04:26 +0100 Subject: [PATCH] =?UTF-8?q?Hack=20f=C3=BCr=20die=20start.md=20beim=20Aufru?= =?UTF-8?q?f=20ohne=20Seite=20f=C3=BCr=20die=20pageInfos=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index aa08176..34b282d 100644 --- a/main.go +++ b/main.go @@ -306,6 +306,11 @@ func getPageInfo(w http.ResponseWriter, r *http.Request) { params := mux.Vars(r) pPageName := params["pagename"] + ".md" + // Hack für anzeige der start.md wenn / aufgerufen wird + if pPageName == ".md" { + pPageName = "start.md" + } + f, err := os.Open(path.Join(config.DataPath, pPageName)) check(err) statinfo, err := f.Stat()