Print ERROR on theme vs Hugo version mismatch

Fixes #1070
This commit is contained in:
bep
2015-04-28 20:39:11 +02:00
parent a8f91ace11
commit be29c0bfbd
2 changed files with 68 additions and 0 deletions

View File

@@ -251,6 +251,12 @@ func InitializeConfig() {
}
jww.INFO.Println("Using config file:", viper.ConfigFileUsed())
themeVersionMismatch, minVersion := helpers.IsThemeVsHugoVersionMismatch()
if themeVersionMismatch {
jww.ERROR.Printf("Current theme does not support Hugo version %s. Minimum version required is %s\n",
helpers.HugoReleaseVersion(), minVersion)
}
}
func build(watches ...bool) {