.Content is not type HugoLib.Node error

37 views
Skip to first unread message

Pawel Urbanski

unread,
Sep 28, 2014, 7:11:40 AM9/28/14
to hugo-d...@googlegroups.com
Hi Everyone,
I'm using Hugo 0.11 on Windows 7 32-bit. Whatever theme I use I get
the error that .Content is not of a type HugoLib.Node.

The layout I use is verysimple and I use the single.html template in
the _default directory. If the template does not contain the {{
.Content }} directive all the pages get generated together with the
sitemap file.
If I put the already mentioned directive I get the eror. Pages get
generated but there is no sitemap file. I wanted to check the simplest
template and created a single.html file with the {{ .Content }}
directive only. I got the same error and the same behavior - pages
generated but no sitemap.

And hints on how to fix it? I'm afraid that it may get problematic
when I start adding more templates.

Greetings, thanks,
Pawel

Becky

unread,
Dec 21, 2014, 4:21:51 PM12/21/14
to hugo-d...@googlegroups.com
Instead of

{{ .Content }}

put

{{ if .IsPage }}
    {{ .Content }}
{{ end }}

Got this solution from https://github.com/spf13/hugo/pull/469
Reply all
Reply to author
Forward
0 new messages