.Site.Pages is a empty list in single.html

.Site.Pages return empty list in single.html template, while it works in index.html.

However sometimes .Data.Pages also works. It’s really confusing :frowning:

$ ./bin/hugo_0.16_darwin_x86_64 version
Hugo Static Site Generator v0.16 BuildDate: 2016-06-06T20:29:38+08:00

? any one here?

Is your project public so we can look at it?

not public.

I’m working into the source code and will have a feedback when I solve the problem.

I have the same problem with .Data.Pages and with hugo 0.18.1. My project is also not public. It’s strange that everything is fine in index.html but .Data.Pages is empty in a single.html file.

Edit: never mind, I think I just misunderstood something again. .Data.Pages is empty, but .Site.Pages works.

@balazswmann .Data.Pages is only for lists/sections. .Site.Pages is a global object that can be called anywhere…