mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +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
@@ -176,8 +176,8 @@ func NewTheme(cmd *cobra.Command, args []string) error {
|
||||
return newUserError("theme name needs to be provided")
|
||||
}
|
||||
|
||||
createpath := helpers.AbsPathify(filepath.Join("themes", args[0]))
|
||||
jww.INFO.Println("Creating theme at", createpath)
|
||||
createpath := helpers.AbsPathify(filepath.Join(viper.GetString("themesDir"), args[0]))
|
||||
jww.INFO.Println("creating theme at", createpath)
|
||||
|
||||
if x, _ := helpers.Exists(createpath, hugofs.SourceFs); x {
|
||||
return newUserError(createpath, "already exists")
|
||||
|
Reference in New Issue
Block a user