Where is a list of config variables

I would like to know the list of variables supported by config file.

For example, is there a way to specify theme in config file, so I don’t have to specify it on command line all the time?

Thanks

There are two answers. You can add theme = "foobby" to your config. Or, you could put the theme in your layouts directory. You don’t need a theme to work with hugo. Themes and the theme directory are intended for themes you want to share with others.

Config entries aren’t fully documented yet. The source (https://github.com/spf13/hugo/blob/master/commands/hugo.go) lists them:

("Watch", false)
("MetaDataFormat", "toml")
("DisableRSS", false)
("DisableSitemap", false)
("ContentDir", "content")
("LayoutDir", "layouts")
("StaticDir", "static")
("ArchetypeDir", "archetypes")
("PublishDir", "public")
("DefaultLayout", "post")
("BuildDrafts", false)
("BuildFuture", false)
("UglyUrls", false)
("Verbose", false)
("CanonifyUrls", false)
("Indexes", map[string]string{"tag": "tags", "category": "categories"})
("Permalinks", make(hugolib.PermalinkOverrides, 0))
("Sitemap", hugolib.Sitemap{Priority: -1})
("PygmentsStyle", "monokai")
("PygmentsUseClasses", false)
("DisableLiveReload", false)
("PluralizeListTitles", true)
("FootnoteAnchorPrefix", "")
("FootnoteReturnLinkContents", "")
3 Likes