Leaf bundle pages not being built

I am still having a hard time with leaf bundles …

This is the structure I have:

/ content/post/2018-12-19-xmas2018/
|
|
|- Index.md
|- Pan1.md
|_ Pan2.md

For some reason, the Pan files don’t get built and aren’t even accessible from a shortcode with .GetPage:

{{ .Site.GetPage “Pan1.md” }} always returns nill.

index.md contains the following:

---
date: 2018-12-19T10:53:25Z
description: ""
draft: false
resources: 
- src: images/header-xmas2018.jpeg
  name: "header"
- src: "gallery/*.jpg"
  name: gallery-:counter
  title: gallery-title-:counter
- src:
  name: slide-1
slug:
subtitle: 
tags: 
  - Xmas 
  - Xmas2018
  - Xmas18
categories: 
  - Creativity
title: "Christmas 2018"
layout: single
type: post

options:
  unlisted: false
  showHeader: true
  hideFooter: false
  hideSubscribeForm: false
scripts:
  -
---

<div class="row">
{{< showpage >}}

What is it that I am not understanding correctly?

See the last row of the first table on https://gohugo.io/content-management/page-bundles/.

For leaf bundles, you cannot access the non-index.md pages as regular pages, because they are page resources.

You need to access the other pages as you would fetch resources.

Thanks for this. I ended up structuring the content like so:

/ content/post/2018-12-19-xmas2018/
|
|- xmas-1/index.md
|- Pan1/index.md
|- Pan2/index.md

This way I can keep the related content all in the same folder. I’m using params to keep the pan1 and pan2 content unlisted and get the same effect anyway. :slight_smile:

I believe it would be a more canonical style to instead make that a branch bundle:

/ content/
    | - post/
        | - 2018-12-19-xmas2018/ 
            |- _index.md 
            |- Pan1.md 
            |- Pan2.md

You can do the same in Pan1.md and Pan2.md too.

Now that this is a branch bundle, _index.md will default to using the list template. So you just need to override the layout front-matter in that.

That would also work, but my list template is very specific to split content into “chapters”. Since my only requirement was to keep the folders together, this will do nicely :slight_smile: