Fixed subpath base template

This commit is contained in:
2022-02-02 16:03:39 +01:00
parent 3c8fd32345
commit 81a4ee932b
2 changed files with 2 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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,