mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Add themesDir option to configuration
themesDir can be used to change the default path of the themes folder. Fixes 1556
This commit is contained in:
committed by
Steve Francia
parent
40fccf2251
commit
47587321d9
@@ -142,7 +142,7 @@ func GetStaticDirPath() string {
|
||||
// If there is no theme, returns the empty string.
|
||||
func GetThemeDir() string {
|
||||
if ThemeSet() {
|
||||
return AbsPathify(filepath.Join("themes", viper.GetString("theme")))
|
||||
return AbsPathify(filepath.Join(viper.GetString("themesDir"), viper.GetString("theme")))
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user