viper.SetDefault("HasCJKLanguage", false)
viper.SetDefault("EnableEmoji", false)
viper.SetDefault("PygmentsCodeFencesGuessSyntax", false)
+ viper.SetDefault("UseModTimeAsFallback", false)
}
// InitializeConfig initializes a config file with sensible default configuration flags.
p.Draft = !*published
}
- if p.Date.IsZero() {
+ if p.Date.IsZero() && viper.GetBool("UseModTimeAsFallback") {
fi, err := hugofs.Source().Stat(filepath.Join(helpers.AbsPathify(viper.GetString("ContentDir")), p.File.Path()))
if err == nil {
p.Date = fi.ModTime()