mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
parent
923419d7fd
commit
f2e7b49acf
12 changed files with 167 additions and 9 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue