Do not shout about missing baseURL if relativeURLs is set
authorbep <bjorn.erik.pedersen@gmail.com>
Sat, 16 May 2015 13:42:10 +0000 (15:42 +0200)
committerbep <bjorn.erik.pedersen@gmail.com>
Sat, 16 May 2015 13:42:15 +0000 (15:42 +0200)
commands/hugo.go

index ce7820d5a11eb62cf8ccbe7867e3b8dc64f4fe31..067d82cce52a2b9977b1f5cba34f6f30ebc1d4dc 100644 (file)
@@ -199,7 +199,7 @@ func InitializeConfig() {
                viper.Set("BaseURL", BaseURL)
        }
 
-       if viper.GetString("BaseURL") == "" {
+       if !viper.GetBool("RelativeURLs") && viper.GetString("BaseURL") == "" {
                jww.ERROR.Println("No 'baseurl' set in configuration or as a flag. Features like page menus will not work without one.")
        }