mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 14:40:43 +03:00
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
This commit is contained in:
parent
e3cb8e6c78
commit
db3c49d049
3 changed files with 3 additions and 3 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue