diff --git a/src/types.go b/src/types.go index 85878512..5d0b3403 100644 --- a/src/types.go +++ b/src/types.go @@ -531,8 +531,12 @@ func initConfig() { } if config.SiteWebfolder == "" { - println(0, "SiteWebfolder not set in gochan.json, halting.") - os.Exit(2) + println(0, "SiteWebFolder not set in gochan.json, using / as default.") + } else if string(config.SiteWebfolder[0]) != "/" { + config.SiteWebfolder = "/" + config.SiteWebfolder + } + if config.SiteWebfolder[len(config.SiteWebfolder)-1:] != "/" { + config.SiteWebfolder += "/" } if config.DomainRegex == "" { diff --git a/templates/img_boardpage.html b/templates/img_boardpage.html index 6ce66861..470aec20 100644 --- a/templates/img_boardpage.html +++ b/templates/img_boardpage.html @@ -70,7 +70,7 @@ {{else}}Next{{end}}
diff --git a/templates/img_header.html b/templates/img_header.html index e01c6fa8..398f1b82 100644 --- a/templates/img_header.html +++ b/templates/img_header.html @@ -10,7 +10,7 @@