mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-09 23:50:41 +02:00
Adding IsNode & IsPage functions to Page & Node
This commit is contained in:
@@ -47,6 +47,14 @@ func (n *Node) RSSlink() template.HTML {
|
||||
return n.RSSLink
|
||||
}
|
||||
|
||||
func (n *Node) IsNode() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (n *Node) IsPage() bool {
|
||||
return !n.IsNode()
|
||||
}
|
||||
|
||||
type UrlPath struct {
|
||||
Url string
|
||||
Permalink template.HTML
|
||||
|
Reference in New Issue
Block a user