How can I test whether a page/section is a direct descendant (first child) of the homepage?
.IsDescendant .Site.Home
returns true for every nth-child.
How can I test whether a page/section is a direct descendant (first child) of the homepage?
.IsDescendant .Site.Home
returns true for every nth-child.
As long as you are correctly defining subsections with the presence of _index.md
files, this should work:
{{ if eq .CurrentSection .FirstSection }}
Thanks!
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.