[solved] Baseof lookup order for type does not correspond with regular layouts

Hey there,

I’m not sure if I do something wrong or if its a bug.

Assuming I have the following structure.

|-- content /
|  |-- dummy.md
|-- themes /
|  |-- mytheme /
|  |  |-- layouts /
|  |  |  |-- _default /
|  |  |  |  |-- baseof.html
|  |  |  |  |-- list.html
|  |  |  |  |-- single.html
|  |  |  |-- dummytype /
|  |  |  |  |-- baseof.html
|  |  |  |  |-- single.html (just here for debugging)

In the dummy.md is the following content:

+++
title = "Dummy Content"
type = "dummytype"
+++

Currently the themes/layouts/dummytype/single.html is rendering. That gives me the prove, that the type is working fine. If I remove the type’s single template I expect it should use the themes/layouts/dummytype/baseof.html. Unfortunately the themes/layouts/_default/single.html is rendered.

According to the baseof-documentation, baseof and types should work properly…

I use the following version:

Hugo Static Site Generator v0.20.7 windows/amd64 BuildDate: 2017-05-13T06:54:59+02:00

Any hint is appreciated :slightly_smiling:


Solved! Sorry, I did a stupid mistake in understanding how baseof/blocks works here. Everything runs smooth :slightly_smiling:

1 Like