mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
@@ -31,6 +31,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/hugofs/files"
|
||||
"github.com/gohugoio/hugo/tpl"
|
||||
|
||||
"github.com/gohugoio/hugo/common/types"
|
||||
|
||||
@@ -217,6 +218,7 @@ func initializeFlags(cmd *cobra.Command, cfg config.Provider) {
|
||||
"force",
|
||||
"gc",
|
||||
"printI18nWarnings",
|
||||
"printUnusedTemplates",
|
||||
"invalidateCDN",
|
||||
"layoutDir",
|
||||
"logFile",
|
||||
@@ -501,7 +503,6 @@ func (c *commandeer) build() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO(bep) Feedback?
|
||||
if !c.h.quiet {
|
||||
fmt.Println()
|
||||
c.hugo().PrintProcessingStats(os.Stdout)
|
||||
@@ -513,6 +514,11 @@ func (c *commandeer) build() error {
|
||||
c.logger.Warnln("Duplicate target paths:", dupes)
|
||||
}
|
||||
}
|
||||
|
||||
unusedTemplates := c.hugo().Tmpl().(tpl.UnusedTemplatesProvider).UnusedTemplates()
|
||||
for _, unusedTemplate := range unusedTemplates {
|
||||
c.logger.Warnf("Template %s is unused, source file %s", unusedTemplate.Name(), unusedTemplate.Filename())
|
||||
}
|
||||
}
|
||||
|
||||
if c.h.buildWatch {
|
||||
|
Reference in New Issue
Block a user