Problems with extra single.html for leaf bundle

Since my last thread was closed i am not really further with my test. Yes, the _index.md in the root helps to solve the asked problem in the original question. But onedrawingperday asked why i created the index.md and an answer was not possible in an closed thread. :roll_eyes: The intention was that i regarded the root as an leaf bundle and not as a list (or branch bundle). So this problem was gone, but now i want to create a real leaf bundle. Again i had my folder privacy and like in the documentation about leaf bundles, i created a index.md and some content files. To see what hugo makes, i setup a new and empty theme, filled it out with the minimal html structure and give list.html an heading “_default/list.html” and single.html “_default/single.html”. I used no css or other things. The minimal html only which was necessary to render an html file. The result was fine and i got for my leaf bundle the output from single.html. But the second step is to use a special single html for the leaf bundle in privacy, so i had a look a the lookup order from hugo. From this explanation, i created a “privacy” folder inside the theme folder layout and created there a second single.html. So it is the same like the shown example "layouts/posts/single.html " from the documentation, only the section name is changed. To see if this file is used, i change the header output also to “privacy/single.html”. But this file will never used. To be sure, i used hugo server --disableFastRender and also cleared the cache of Safari and Chrome (hugo runs in macOS 10.13.5). No success. So last test and this is why i now post again, i moved the _default/single.html file out of this folder, while hugo server was running. But nothing happened. I expect and 404 or using my second single.html file. But i saw again the output from _default. Clearing the cache again and nothing happens. But when i stop the hugo server and restart, i got the 404, because now he missed his single.html file.
So, yes, i am a beginner and i now less about hugo. But in my understanding i think that the 404 must be coming directly and not only after a restart. And this behavior was similar to my linked first post, where hugo worked when i moved files around. This makes debugging and understanding very hard for a beginner. And also the question, why he never used the second single.html file, while the documentation said that this should worked. For me it seems a little bit, that posts are refreshed directly live in server mode, but that hugo had some problems with refreshing template files, even if the structure of the templates changes. Actually i used the 0.42.1 version in 64bit.

Welcome to our community! Your immediate next step is to read Requesting Help, and follow thos instructions. I will leave this topic open so you can update the thread with the required information. You need to share your code, or we can not help you. We can’t just figure out your issue, we need to see the template files, and run it locally.

It is frustrating to not know how to ask questions. I recommend you start slow, share your code and explain a single issue you are having. And share your project code; that is normally done by linking to it as an online git repo.

I though that the explanation was very clear what happened. But you will find this example on https://github.com/lgusewski/hugo_template_test and the information of hugo env is:

Hugo Static Site Generator v0.42.1 darwin/amd64 BuildDate: 2018-06-13T10:16:36Z
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.10.1"

Looking at your repo, it looks like you want to create a custom layout for your leaf bundle at privacy, but when you created the template using the lookup order, the new template wasn’t used as expected. Is that correct?

Is that correct?

Yes, this was the original intention and the main problem i hope to solve.

The second is the reaction of hugo server, when moving files around, that there is no real time reaction and only sometimes a restart of the server gives the expected result.

Supplement (2018/06/20): I found out that this template works shortly with an older version like 0.32.4. In the release notes for 0.33 i found a comment for changing the lookup order. But now, when i moved different older hugo versions around, it breaks again. Very frustrating.