Hugo does not generate content files

Hello Everyone,

I’m tring to use for the second time Hugo to create a static website. But in this my new project I’m facing with two strange behaviours.

  1. Hugo not generate my content pages except for index.md file;
  2. When I run “hugo” command in public/index.html the content changes every time: sometime Hugo use the index.md content, other time is like it’s not get the source.

For this project I’m working with following specs:

  1. Hugo version: hugo v0.86.1+extended linux/amd64 BuildDate=unknown
  2. I’m using wsl2 with Ubuntu 18.04.2 LTS;
  3. If I’ve run “hugo -v” I don’t get any error;
  4. I’m creating my website without theme but using layout only.

Here the “hugo -v” log:

raff@LAPTOP-TTHLIU8C:/mnt/d/Lavoro/hugo/nudaerrante.com$ hugo -v
INFO 2022/01/16 12:29:04 Translation func for language it not found, use default.
INFO 2022/01/16 12:29:04 i18n not initialized; if you need string translations, check that you have a bundle in /i18n that matches the site language or the default language.
Start building sites …
hugo v0.86.1+extended linux/amd64 BuildDate=unknown
INFO 2022/01/16 12:29:04 syncing static files to /mnt/d/Lavoro/hugo/nudaerrante.com/public/
WARN 2022/01/16 12:29:04 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2022/01/16 12:29:04 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

               | IT  

-------------------±----
Pages | 9
Paginator pages | 0
Non-page files | 0
Static files | 2
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0

Total in 183 ms

My repo is: GitHub - Theriol666/nudaerrante.com: Sito per Nuda Errante.com

For now I don’t have a lot of content, I’m just build the structure in order to organize work.

If you need further information I’ll glad to answer.

Thank you and best regards,

Raffaele

In your repo you have /content/index.md

The result of the above is that the homepage is a leaf Page Bundle with no children only Page Resources.

To fix simply change index.md to _index.md so that the homepage becomes a branch Page Bundle with children pages.

1 Like

Hello @alexandros and thank you for reply.

If I understand well, index.md is a single page while _index.md is a list of contents. What I want in homepage is it’s a normal page, so that why is content/index.md. And about this, all I wanted to report is the different behaviour during building for the same file (content/index.md) without edit it.

About the missing generating contents (for example content/ambientazione/index.md), what can be the cause of it?

Thanks again.

Best regards.

I already answered. You will not be able to render sections and other children pages, if you keep /content/index.md. Please have a look at the documentation, also search the forum.

If you want for the homepage to use the single page template then in its front matter set:
layout = "single"

Hello @alexandros,

I edit files following your recommendation, and now works! Thank you really much for the support!
I would never have been able to find the solution on my own.

Thanks again.

Best regards,

Raffaele

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