Adding text to a list page

I have a list page generated with layout/_default/list.html
All good so far.

If I want multiple list pages each almost the same but with a idiosyncratic paragraph at the top, where do I put that text?

In this example the art/ directory will have two sub-directories each with set of sub-directories each for a single art work. Currently there is only one so I can put the text in layouts/_default/list.html but when I make the change to `art/ that will not work.

I tried the _index.md in the art/ directory but that is not the correct place.

My content tree is like:

.
β”œβ”€β”€ _index.md
β”œβ”€β”€ about
β”‚   β”œβ”€β”€ who.md
└── art
    β”œβ”€β”€ Abc
    β”‚   β”œβ”€β”€ Abc.png
    β”‚   β”œβ”€β”€ index.md
    β”œβ”€β”€ Kdg
    β”‚   β”œβ”€β”€ Kdg.png
    β”‚   β”œβ”€β”€ index.md

After the change…

.
β”œβ”€β”€ _index.md
β”œβ”€β”€ about
β”‚   β”œβ”€β”€ who.md
└── art
    β”œβ”€β”€ 2019
    β”‚   β”œβ”€β”€ Abc
    β”‚   β”‚   β”œβ”€β”€ Abc.png
    β”‚   β”‚   β”œβ”€β”€ index.md
    β”‚   └── Kdg
    β”‚       β”œβ”€β”€ Kdg.png
    β”‚       β”œβ”€β”€ index.md
    β”œβ”€β”€ 2020
    β”‚   β”œβ”€β”€ Mam
    β”‚   β”‚   β”œβ”€β”€ Mam.png
    β”‚   β”‚   β”œβ”€β”€ index.md
    β”‚   └── Mum
    β”‚       β”œβ”€β”€ Mum.jpg
    β”‚       β”œβ”€β”€ index.md
    β”œβ”€β”€ _index.md

Is this clear? The 2019/ and 2020 list templates (is that the correct term?) will each will need different content and the art/ list template will be completely different.

My layout tree is:

.
β”œβ”€β”€ _default
β”‚   β”œβ”€β”€ baseof.html
β”‚   β”œβ”€β”€ list.html
β”‚   β”œβ”€β”€ single.html
β”œβ”€β”€ about
β”‚   β”œβ”€β”€ single.html
β”œβ”€β”€ index.html
└── partials
    β”œβ”€β”€ date-and-tags.html
    β”œβ”€β”€ head.html
    β”œβ”€β”€ nav.html
    β”œβ”€β”€ script.html
    └── style.html

Duh!

layouts/art/list.html
That is the correct place, correct?

_default/... is most general and make more specific by copying the layout structure of content/ under layout/???

Correct. A section can have its own templates.

FYI if you wanna force a page to use a different template, checkout the type and layout front matter params.

1 Like