Unable to add extra page in section

I have a working Hugo blog and I want to add an extra page below Books - Wim Deblauwe For example …/books/taming-thymeleaf

The source of my blog is at wimdeblauwe.com/content/books at master · wimdeblauwe/wimdeblauwe.com · GitHub

I have an index.html page there that gets rendered. I tried now to add a taming-thymeleaf.html page there, but it does not get rendered.

I also tried renaming index.html to _index.html. This makes the taming-thymeleaf.html render, but my /books URL no longer shows the content that I had before.

What am I doing wrong?

Your content structure should look like this as you add more books:

├── _index.html
├── practical-guide-to-building-an-api-back-end-with-spring-boot.md
└── taming-thymeleaf.md

The content of _index.html is not displayed when you visit http://localhost:1313/books because the template responsible for displaying list pages (i.e., _index.md) does not include the {{ .Content }} field.

To modify the template:

cp themes/ezhil/layouts/_default/list.html layouts/_default/

Now edit layouts/_default/list.html, placing {{ .Content }} before it starts ranging through the pages.

You can of course create a layout that does display {{ .Content }} on a list page, or more specifically the books list page (:exclamation:), but I’m not sure how much you want to get into customizing the theme you are using, and how much you want to delve into the mysteries of

It might help to read:

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