Hugo: current docs: Front matter page doesn't list "layout" variable

Created on 4 Jun 2017  路  7Comments  路  Source: gohugoio/hugo

https://gohugo.io/templates/content/#which-template-will-be-rendered states

Users can specify the type and layout in the front-matter.

but when I read https://gohugo.io/content/front-matter/, layout isn't listed as a possible variable. Should it? I'm confused. I'm new to Hugo, but when I tried to override layout in my front-matter I wasn't succesful.

Docs

All 7 comments

Hello @JensRantil,

please ask questions like these on the Hugo forum; GitHub is used for concrete issues and requests/enhancements.

@digitalcraftsman Did some more digging. This issue is a documentation issue. layout should be listed on https://gohugo.io/content/front-matter/. It's not. Please reopen.

I got layout to work after some fiddling. If someone documents layout there, it might be worth mentioning that it's not supposed to refer to a specific layout file, but rather a layout directory. Could also be nice to mention if it can refer to something "mylayout/mysublayout" (which I believe isn't possible).

Thanks for the update and you'r right about the missing option in the documentation. Currently, we're working on a revamped version of the docs (content + design) which you can see here. It lists layout as a possible variable in the front matter.

We try to migrate to this version as soon as possible so I don't know if the current docs will become updated accordingly. Anyway, I'll leave this issue open for now.

Anyway, I'll leave this issue open for now.

Did you forget to reopen the issue?

Yes, I did. Thanks for the note. It's now reopened.

Soon we'll switch to a rewritten version of the docs. This issue was already covered during the rewrite. See https://github.com/rdwatters/hugo-docs-concept/issues/130. Hence this issue can be seen as fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moorereason picture moorereason  路  3Comments

antifuchs picture antifuchs  路  3Comments

crash-dive picture crash-dive  路  3Comments

ianbrandt picture ianbrandt  路  3Comments

VoidingWarranties picture VoidingWarranties  路  3Comments