summaryrefslogtreecommitdiffstats
path: root/hugolib/page.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-25 17:46:09 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-03-27 15:43:56 +0200
commit3cd97951f1cb6d7169a8a84a7b86984c05b2d35c (patch)
tree17adf86a0af091981ee5f8145db70cc251b4d994 /hugolib/page.go
parentee75e2999b66bd9f258a241c487b6677cf2fa071 (diff)
hugolib, layout: Consolidate RSS template handling
Diffstat (limited to 'hugolib/page.go')
-rw-r--r--hugolib/page.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/hugolib/page.go b/hugolib/page.go
index 11754fb5f..e23f8e1e8 100644
--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -661,30 +661,6 @@ func (p *Page) Section() string {
return p.Source.Section()
}
-// TODO(bep) consolidate and test these KindHome switches (see other layouts methods)s
-// rssLayouts returns RSS layouts to use for the RSS version of this page, nil
-// if no RSS should be rendered.
-// TODO(bep) output
-func (p *Page) rssLayouts() []string {
- switch p.Kind {
- case KindHome:
- return []string{"rss.xml", "_default/rss.xml", "_internal/_default/rss.xml"}
- case KindSection:
- section := p.sections[0]
- return []string{"section/" + section + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
- case KindTaxonomy:
- singular := p.s.taxonomiesPluralSingular[p.sections[0]]
- return []string{"taxonomy/" + singular + ".rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
- case KindTaxonomyTerm:
- singular := p.s.taxonomiesPluralSingular[p.sections[0]]
- return []string{"taxonomy/" + singular + ".terms.rss.xml", "_default/rss.xml", "rss.xml", "_internal/_default/rss.xml"}
- case KindPage:
- // No RSS for regular pages
- }
-
- return nil
-}
-
func (s *Site) NewPageFrom(buf io.Reader, name string) (*Page, error) {
p, err := s.NewPage(name)
if err != nil {
@@ -856,7 +832,6 @@ func (p *Page) RelPermalink() string {
}
func (p *Page) initURLs() error {
- // TODO(bep) output
if len(p.outputFormats) == 0 {
p.outputFormats = p.s.outputFormats[p.Kind]
}