diff options
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index 0622a15fe..5d083fd5b 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -22,6 +22,7 @@ import ( "github.com/gohugoio/hugo/hugofs" "github.com/gohugoio/hugo/hugolib/doctree" + "github.com/gohugoio/hugo/hugolib/segments" "github.com/gohugoio/hugo/identity" "github.com/gohugoio/hugo/media" "github.com/gohugoio/hugo/output" @@ -152,6 +153,19 @@ func (p *pageState) reusePageOutputContent() bool { return p.pageOutputTemplateVariationsState.Load() == 1 } +func (p *pageState) skipRender() bool { + b := p.s.conf.C.SegmentFilter.ShouldExcludeFine( + segments.SegmentMatcherFields{ + Path: p.Path(), + Kind: p.Kind(), + Lang: p.Lang(), + Output: p.pageOutput.f.Name, + }, + ) + + return b +} + func (po *pageState) isRenderedAny() bool { for _, o := range po.pageOutputs { if o.isRendered() { |