Accessing Template Variables in for Homepage

I just arrived at Hugo a few hours back so pardon me if the questions is too silly

Is it possible to access variables inside like so {{ .Data.Pages }}?

Here’s the directory structure & I’m trying to do this within the homepage content/_index.html


index.html in the layouts directory has {{.Content}} in it.

I thought I could access variables in the so I’m trying to create the content for homepage in & use the layout from index.html

Any help on this is appreciated. Thanks

You need to use a shortcode.

You mean create a custom shortcode (that does the required work with variables) & call it in ?