Fixed subpath base template
This commit is contained in:
2
main.go
2
main.go
@@ -70,7 +70,7 @@ func setupFrontend(r *mux.Router) {
|
|||||||
r.Path("/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
r.Path("/").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
landingpage.Execute(w, struct {
|
landingpage.Execute(w, struct {
|
||||||
BasePath string
|
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) {
|
r.NotFoundHandler = http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func Article(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
ta := tmplArticle{
|
ta := tmplArticle{
|
||||||
Title: article.Title,
|
Title: article.Title,
|
||||||
BasePath: config.Address + path.Join("/", config.SubPath),
|
BasePath: config.Address + path.Join("/", config.SubPath) + "/",
|
||||||
Summary: article.Summary,
|
Summary: article.Summary,
|
||||||
Image: article.Image,
|
Image: article.Image,
|
||||||
Authors: authors,
|
Authors: authors,
|
||||||
|
|||||||
Reference in New Issue
Block a user