Renamed Indexes to Taxonomies. Old template and config parameters still work.

This commit is contained in:
spf13
2014-04-08 23:15:57 -04:00
parent aae6fa0b6b
commit 93bcddebb3
8 changed files with 171 additions and 150 deletions

18
hugolib/taxonomy_test.go Normal file
View File

@@ -0,0 +1,18 @@
package hugolib
import (
"strings"
"testing"
)
func TestSitePossibleTaxonomies(t *testing.T) {
site := new(Site)
page, _ := ReadFrom(strings.NewReader(PAGE_YAML_WITH_TAXONOMIES_A), "path/to/page")
site.Pages = append(site.Pages, page)
taxonomies := site.possibleTaxonomies()
if !compareStringSlice(taxonomies, []string{"tags", "categories"}) {
if !compareStringSlice(taxonomies, []string{"categories", "tags"}) {
t.Fatalf("possible taxonomies do not match [tags categories]. Got: %s", taxonomies)
}
}
}