Error with config.yaml format

I develop with yaml as config file format

config file entry

description: dowdow


layouts/index.html entry

<title>{{ .Site.Title }}</title>
{{.Site.Title}}
{{ .Site.Description }}

error while compiling with hugodev

ERROR: 2017/01/02 20:36:43 general.go:236: Error while rendering "page ": template: index.html:10:8: executing “index.html” at <.Site.Description>: can’t evaluate field Description in type *hugolib.SiteInfo

What mistake I am committing. Please help.

.site.title rendering.

.site.description not rendering. that output line is blank.

Hugo Static Site Generator v0.19-DEV BuildDate: 2016-12-30T09:07:33+05:30

Try {{ .Description }} instead of {{ .Site.Description }}

While .site.description gives the above error while compiling the site,
just {{.Description}} compiles without error even in verbose mode, but the output for that field is blank space.

<i have tried this many times with latest hugo.

@digitalcrafrsman - I take this opportunity to thank you for your ealier help regarding compiling latest docs which worked for me. :slight_smile:

I had solved it myself looking at the docs.

I had to mention description like this in config.yaml

params:
description: dowdow

and then refer that in layouts/index.html as

{{,Site.Params.Description}}

site.description
or
.description

dont work here.

Thanks.

That’s indeed an important detail as you already noticed ;I[quote=“vsopvsop, post:4, topic:4989”]
site.descriptionor
or
.description

dont work here.
[/quote]

.Description can be used if your define in the config file globally (outside blocks like params).