node to page: Make Kind a string

Having a custom string type isn't worth it when it doesn't work
with `where`, `eq` etc.

Fixes #2689
Updates #2297
This commit is contained in:
Bjørn Erik Pedersen
2016-11-13 12:33:11 +01:00
parent 9fba2a30a9
commit 9347084d61
7 changed files with 57 additions and 61 deletions

View File

@@ -1561,7 +1561,7 @@ func (s *Site) assembleSections() {
}
}
func (s *Site) nodeTypeFromSections(sections []string) Kind {
func (s *Site) nodeTypeFromSections(sections []string) string {
if _, isTaxonomy := s.Taxonomies[sections[0]]; isTaxonomy {
if len(sections) == 1 {
return KindTaxonomyTerm
@@ -1662,7 +1662,7 @@ func (s *Site) Stats() {
// This will return nil when no page could be found.
//
// The valid page types are: home, section, taxonomy and taxonomyTerm
func (s *SiteInfo) GetPage(typ Kind, path ...string) *Page {
func (s *SiteInfo) GetPage(typ string, path ...string) *Page {
return s.getPage(typ, path...)
}