mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
handle https prefixes in baseUrl
This commit is contained in:
@@ -136,7 +136,7 @@ func fixUrl(s string) (string, error) {
|
||||
s = viper.GetString("BaseUrl")
|
||||
useLocalhost = true
|
||||
}
|
||||
if !strings.HasPrefix(s, "http://") {
|
||||
if !strings.HasPrefix(s, "http://") && !strings.HasPrefix(s, "https://") {
|
||||
s = "http://" + s
|
||||
}
|
||||
u, err := url.Parse(s)
|
||||
|
Reference in New Issue
Block a user