Get _index.md Title

I’m using page bundles, with a directory structure like this:

content/
├── comic
│ ├── xkcd
│ │ ├── _index.md
│ │ ├── 1.md
│ │ ├── 2.md
│ │ ├── 3.md
│ │ ├── 4.md
│ │ └── 5.md
│ ├── funny-comic
│ │ ├── _index.md
│ │ ├── 1.md
│ │ ├── 2.md
│ │ ├── 3.md
│ │ ├── 4.md
│ │ └── 5.md
│ ├── manga
│ │ ├── _index.md
│ │ ├── 1.md
│ │ ├── 2.md
│ │ ├── 3.md
│ │ ├── 4.md
│ │ └── 5.md

There is a title in each _index.md file.

I’m trying to get each _index.md title and put it somewhere to their respective branch contents.

Thank you.

For example, in the template that renders comic/xkcd/2.md…

{{ .CurrentSection.Title }} --> title of comic/xkcd/_index.md

Thank you so much.

1 Like

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