Section title and introduction content

Hello,

I’m learning hugo at the moment, and I’m struggle for a way to create a custom title and introduction content to use on the section list pages. I have achieved what I want to do using a layout/section/my-section-name.html file but I fear this is not the right approach given I’m putting content in a layout file.

Kevin

On the section list pages, I would say what you do is fine (it’s your layout files, pulling the data out into some other file would just be work).

For content pages, I suggest putting the custom titles and extra content into params and then use the markdownify template function to do the formatting.

See an example from my site below. I use title_main when I want special formatting (split lines, add some bold formatting etc.) of my article titles.

https://github.com/bep/bepsays.com/blob/master/layouts/_default/single.ace

(do not get confused by the ace template syntax)

Of course, with the new /data support in 0.13, this could be expanded.

Thank you! That’s given me some ideas to follow up on.