mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-27 22:09:53 +02: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:
committed by
Bjørn Erik Pedersen
parent
e3cb8e6c78
commit
db3c49d049
@@ -176,7 +176,7 @@ func New(fs *hugofs.Fs, cfg config.Provider) (*Paths, error) {
|
||||
PaginatePath: cfg.GetString("paginatePath"),
|
||||
}
|
||||
|
||||
if cfg.IsSet("allThemes") {
|
||||
if !cfg.IsSet("theme") && cfg.IsSet("allThemes") {
|
||||
p.AllThemes = cfg.Get("allThemes").([]ThemeConfig)
|
||||
} else {
|
||||
p.AllThemes, err = collectThemeNames(p)
|
||||
|
Reference in New Issue
Block a user