Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Harniakou <anton.harniakou@gmail.com>2019-01-13 12:44:38 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-01-13 23:13:59 +0300
commitdb3c49d049193e0fc225fe4bdb95712c311d6615 (patch)
tree6b888da6387d577a6ff9ccfc66935e79c42759d3 /commands/commands.go
parente3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647 (diff)
Make hugo server -t work again
This commit solves an issue where hugo would ignore the cli -t flag and only use a theme defined in config.toml. Also allow -t flag to accept a string slice. Closes #5569 Closes #5061 Related #4868
Diffstat (limited to 'commands/commands.go')
-rw-r--r--commands/commands.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/commands.go b/commands/commands.go
index f835e67a1..c2fb90830 100644
--- a/commands/commands.go
+++ b/commands/commands.go
@@ -250,7 +250,7 @@ func (cc *hugoBuilderCommon) handleFlags(cmd *cobra.Command) {
cmd.Flags().StringP("cacheDir", "", "", "filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/")
cmd.Flags().BoolP("ignoreCache", "", false, "ignores the cache directory")
cmd.Flags().StringP("destination", "d", "", "filesystem path to write files to")
- cmd.Flags().StringP("theme", "t", "", "theme to use (located in /themes/THEMENAME/)")
+ cmd.Flags().StringSliceP("theme", "t", []string{}, "themes to use (located in /themes/THEMENAME/)")
cmd.Flags().StringP("themesDir", "", "", "filesystem path to themes directory")
cmd.Flags().StringVarP(&cc.baseURL, "baseURL", "b", "", "hostname (and path) to the root, e.g. http://spf13.com/")
cmd.Flags().Bool("enableGitInfo", false, "add Git revision, date and author info to the pages")