How can I return the parent directory from singles page?

http://localhost:1313/foo/bar/ Iā€™d like to return foo (the list directory) from the bar (the singles page)

content
ā””ā”€ā”€ foo
    ā””ā”€ā”€ bar.md

When visiting http://localhost:1313/foo/bar/

{{ .Type }} = foo
{{ .Section }} = foo
{{ .Parent }} = Page(/foo)
{{ .FirstSection }} = Page(/foo)
{{ .CurrentSection }} = Page(/foo)

{{ .Parent.Permalink }} = http://localhost:1313/foo/

See:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.