HUGO

When building Hugo is double nesting my single pages?

@bep I’m struggling with adding a single page from the theme.

I read your post Content in data files which solved my original problem. I have a complex single page and needed two sections as described in your answer.

The /layouts/services/single.html file does the processing, reads the data, and builds the page.

My /content/services/services.md only has the Front Matter.

I can’t understand what I’m doing incorrectly.

How can I get my /public/services/index.html to not be nested /services/services?

Thank you very much for the guidance. I love Hugo and am almost done porting one of my websites from WordPress to Hugo. I just learned about Hugo and am grateful for such a splendid product.

Best regards,

Karl

I found a theme that was doing what I needed.

This worked (assume it’s the recommended technique)

  1. Rename /content/services/services.md to /content/services/_index.html

  2. Rename /layouts/services/single.html to /layouts/services/list.html

Presto worked perfectly.

I had read the docs on the special use for _index.html which is why I didn’t try to use it with a list.html.

Learning curve…

Great product,

Karl

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