diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-06 13:40:06 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-27 15:43:56 +0200 |
commit | 254cd89c8e50f46bb733cc170a79e9d3089ae5a8 (patch) | |
tree | 03916d978d50a774f993aac615702a7631512d1f /hugolib/page.go | |
parent | 10de077164501e18a253e7abb77af8824cfebb8a (diff) |
hugolob: A first incorporation of output types in rendering
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index fb842ca37..17d3e9af6 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -23,6 +23,7 @@ import ( "github.com/mitchellh/mapstructure" "github.com/spf13/hugo/helpers" + "github.com/spf13/hugo/output" "github.com/spf13/hugo/parser" "html/template" @@ -36,11 +37,8 @@ import ( "time" "unicode/utf8" - "github.com/spf13/hugo/output" - "github.com/spf13/cast" bp "github.com/spf13/hugo/bufferpool" - "github.com/spf13/hugo/media" "github.com/spf13/hugo/source" ) @@ -203,9 +201,8 @@ type Page struct { lang string - // The media types this page will be rendered to. - // TODO(bep) probably wrap this to add additional information like template evaluation? - mediaTypes media.Types + // The output types this page will be rendered to. + outputTypes output.Types // Used to pick the correct template(s) layoutIdentifier pageLayoutIdentifier @@ -676,6 +673,7 @@ func (p *Page) Section() string { } func (p *Page) layouts(layouts ...string) []string { + // TODO(bep) output if len(p.layoutsCalculated) > 0 { return p.layoutsCalculated } @@ -1879,8 +1877,8 @@ func kindFromFilename(filename string) string { // TODO(bep) output var ( - mediaTypesWithRSS = media.Types{media.HTMLType, media.RSSType} - mediaTypesHTML = media.Types{media.HTMLType} + outputTypesWithRSS = output.Types{output.HTMLType, output.RSSType} + outputTypesHTML = output.Types{output.HTMLType} ) func (p *Page) setValuesForKind(s *Site) { |