[SOLVED] Hugo blocks new partials

I am totally puzzled! I could not find any explanation to this problem:

I have a top menu item, its partial and its data/top.yml. I’ve created dropdown submenus under it - sub1, sub2, sub3.
I’ve copied the top partial and created partials to be called from sub1, sub2, sub3.
I’ve created data/sub1.yml, sub2.yml, sub3.yml and put correct data in there.
I’ve customized partials to take data from corresponding sub1.yml, sub2.yml, sub3.yml files.

The problem: hugo blocks those new partials and does not render them! Why???
They are correct: if I copy their contents and append them to the top partial - they are rendered fine when they are called from the top partial. But they are blocked when called from config.toml
If I call them from the address line like http://localhost:1313/sub1 - they are blocked, as if they are not there. On the screen: 404 page not found
Where are all that configured? How I can get permission to render them when called from config.toml?

I tried to read docs - I am unable to comprehend pages like https://gohugo.io/templates/template-debugging/#what-variables-are-available-in-this-context. It says: " You can use the template syntax, $. , to get the top-level template context from anywhere in your template. This will print out all the values under, .Site .

{{ printf "%#v" $.Site }}

Where should I put that?! Where will it print that?! I tried to put it into a working partial - it does not print anything, let alone not working one.

Or a page https://gohugohq.com/error/debug-in-hugo/ - I was unable to understand how to use it.

1 Like

So, if you’re having trouble understanding what’s going on, with access to the full site source; imagine us trying to guess.

Please post a link to your site source, alternatively a more concrete question.

2 Likes

I found what was the problem!
It looks like partials should be registered somewhere to be rendered, if not registered - hugo can’t find them. E.g. it renders partials/service.html but can not find partials/service1.html
For every partial newpartial.html you create, no matter where you store data for it, there should exist file content/newpartial.md!