hugolib: Extend the sections API
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sun, 2 Jul 2017 18:14:06 +0000 (20:14 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Tue, 4 Jul 2017 07:11:49 +0000 (09:11 +0200)
commita1d260b41a6673adef679ec4e262c5f390432cf5
treef9a86343fb6a73defb0805578d25eb72c6afb534
parentdd9b1baab0cb860a3eb32fd9043bac18cab3f9f0
hugolib: Extend the sections API

This commit adds some section related methods that have been asked for:

* .CurrentSection
* .IsDescendant
* .IsAncestor

Fixes #3591
helpers/general.go
helpers/general_test.go
hugolib/permalinks.go
hugolib/site_sections.go
hugolib/site_sections_test.go