mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +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
@@ -210,6 +210,7 @@ func LoadDefaultSettings() {
|
||||
viper.SetDefault("ArchetypeDir", "archetypes")
|
||||
viper.SetDefault("PublishDir", "public")
|
||||
viper.SetDefault("DataDir", "data")
|
||||
viper.SetDefault("ThemesDir", "themes")
|
||||
viper.SetDefault("DefaultLayout", "post")
|
||||
viper.SetDefault("BuildDrafts", false)
|
||||
viper.SetDefault("BuildFuture", false)
|
||||
@@ -514,7 +515,7 @@ func getDirList() []string {
|
||||
filepath.Walk(helpers.AbsPathify(viper.GetString("LayoutDir")), walker)
|
||||
filepath.Walk(helpers.AbsPathify(viper.GetString("StaticDir")), walker)
|
||||
if helpers.ThemeSet() {
|
||||
filepath.Walk(helpers.AbsPathify("themes/"+viper.GetString("theme")), walker)
|
||||
filepath.Walk(helpers.AbsPathify(viper.GetString("themesDir")+"/"+viper.GetString("theme")), walker)
|
||||
}
|
||||
|
||||
return a
|
||||
|
Reference in New Issue
Block a user