From 81a4ee932b9bdf719649dc73f0b80a80f95c74d3 Mon Sep 17 00:00:00 2001 From: bytedream Date: Wed, 2 Feb 2022 16:03:39 +0100 Subject: [PATCH] Fixed subpath base template --- main.go | 2 +- server/article.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index a12cca0..661d702 100644 --- a/main.go +++ b/main.go @@ -70,7 +70,7 @@ func setupFrontend(r *mux.Router) { r.Path("/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) { landingpage.Execute(w, struct { BasePath string - }{BasePath: config.Address + path.Join("/", config.SubPath)}) + }{BasePath: config.Address + path.Join("/", config.SubPath) + "/"}) }) r.NotFoundHandler = http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { diff --git a/server/article.go b/server/article.go index 2e21051..6f8063c 100644 --- a/server/article.go +++ b/server/article.go @@ -41,7 +41,7 @@ func Article(w http.ResponseWriter, r *http.Request) { ta := tmplArticle{ Title: article.Title, - BasePath: config.Address + path.Join("/", config.SubPath), + BasePath: config.Address + path.Join("/", config.SubPath) + "/", Summary: article.Summary, Image: article.Image, Authors: authors,