Folder name in shortcode

Hello,
My folder structure goes like this:

content/sub-folder/post.md

The sub-folder is the .Section.

How can I access the sub-folder folder name, that is, .Section, from within a shortcode?

All I get is can't evaluate field Section in type *hugolib.ShortcodeWithPage

Try

{{ .Page.Section }}
2 Likes

Yup! That did the trick!