diff options
author | digitalcraftsman <digitalcraftsman@users.noreply.github.com> | 2015-11-23 20:44:59 +0100 |
---|---|---|
committer | Steve Francia <steve.francia@gmail.com> | 2016-01-01 14:46:40 -0500 |
commit | 47587321d9a153ef4158739e8f238c850fb1ee7a (patch) | |
tree | 1fc48bfcfe2c93096f0e84b9dcc291ef49606b71 /commands/new.go | |
parent | 40fccf2251a7187f002165653d42178e2f53a49b (diff) |
Add themesDir option to configuration
themesDir can be used to change the default
path of the themes folder.
Fixes 1556
Diffstat (limited to 'commands/new.go')
-rw-r--r-- | commands/new.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/new.go b/commands/new.go index a30c9f55b..8c2e4850f 100644 --- a/commands/new.go +++ b/commands/new.go @@ -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") |