mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
@@ -63,7 +63,13 @@ func kp(in string) string {
|
||||
return helpers.MakePathSanitized(in)
|
||||
}
|
||||
|
||||
func (i Taxonomy) Get(key string) WeightedPages { return i[kp(key)] }
|
||||
func (i Taxonomy) Get(key string) WeightedPages {
|
||||
if val, ok := i[key]; ok {
|
||||
return val
|
||||
}
|
||||
return i[kp(key)]
|
||||
}
|
||||
|
||||
func (i Taxonomy) Count(key string) int { return len(i[kp(key)]) }
|
||||
func (i Taxonomy) Add(key string, w WeightedPage, pretty bool) {
|
||||
if !pretty {
|
||||
|
Reference in New Issue
Block a user