diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-24 09:19:51 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-27 15:43:56 +0200 |
commit | 0c4701f0effbf651891979b925073f6fc5d26a82 (patch) | |
tree | b02b71a06196c5bd3f97d39d3c58f40f65cd3b27 /hugolib/hugo_sites_build.go | |
parent | d851d6b98fefbe7de91c8c58b883cca4da17eea9 (diff) |
hugolib: Update site stats to take output formats into account
Diffstat (limited to 'hugolib/hugo_sites_build.go')
-rw-r--r-- | hugolib/hugo_sites_build.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hugolib/hugo_sites_build.go b/hugolib/hugo_sites_build.go index 970948bb3..e694ab52f 100644 --- a/hugolib/hugo_sites_build.go +++ b/hugolib/hugo_sites_build.go @@ -174,11 +174,19 @@ func (h *HugoSites) assemble(config *BuildCfg) error { } for _, s := range h.Sites { + s.siteStats = &siteStats{} for _, p := range s.Pages { // May have been set in front matter if len(p.outputFormats) == 0 { p.outputFormats = s.outputFormats[p.Kind] } + + cnt := len(p.outputFormats) + if p.Kind == KindPage { + s.siteStats.pageCountRegular += cnt + } + s.siteStats.pageCount += cnt + if err := p.initTargetPathDescriptor(); err != nil { return err } |