canonifyURLs bool
cleanDestination bool
enableRobotsTXT bool
+ disable404 bool
disableRSS bool
disableSitemap bool
draft bool
cmd.Flags().BoolVar(&cleanDestination, "cleanDestinationDir", false, "Remove files from destination not found in static directories")
cmd.Flags().BoolVarP(&draft, "buildDrafts", "D", false, "include content marked as draft")
cmd.Flags().BoolVarP(&future, "buildFuture", "F", false, "include content with publishdate in the future")
+ cmd.Flags().BoolVar(&disable404, "disable404", false, "Do not render 404 page")
cmd.Flags().BoolVar(&disableRSS, "disableRSS", false, "Do not build RSS files")
cmd.Flags().BoolVar(&disableSitemap, "disableSitemap", false, "Do not build Sitemap file")
cmd.Flags().StringVarP(&source, "source", "s", "", "filesystem path to read files relative from")
viper.SetDefault("cleanDestinationDir", false)
viper.SetDefault("Watch", false)
viper.SetDefault("MetaDataFormat", "toml")
+ viper.SetDefault("Disable404", false)
viper.SetDefault("DisableRSS", false)
viper.SetDefault("DisableSitemap", false)
viper.SetDefault("DisableRobotsTXT", false)
if flagChanged(cmdV.Flags(), "canonifyURLs") {
viper.Set("CanonifyURLs", canonifyURLs)
}
+ if flagChanged(cmdV.Flags(), "disable404") {
+ viper.Set("Disable404", disable404)
+ }
if flagChanged(cmdV.Flags(), "disableRSS") {
viper.Set("DisableRSS", disableRSS)
}