# .Site.GetPage empty

**URL:** <https://discourse.gohugo.io/t/site-getpage-empty/32292>\
**Category:** support\
**Created:** [April 10, 2021, 10:06am UTC](https://discourse.gohugo.io/t/site-getpage-empty/32292 "2021-04-10T10:06:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fount-via](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@fount-via](https://discourse.gohugo.io/u/fount-via)\
**Post date:** [April 10, 2021, 10:06am UTC](https://discourse.gohugo.io/t/site-getpage-empty/32292/1 "2021-04-10T10:06:36Z")

</div>

I’ve recently upgraded to 0.80 and a site built using 0.59 is not returning content for the following code:

```
  {{ with .Site.GetPage "index.md" }}
  {{ .Params.Details | safe.HTML }}
  {{ end }}

```

It’s a single-page site (index.html only) and all the page content is in index.md within the content folder. I can’t find any detail about .Site.GetPage usage changing?

Any help appreciated!

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [April 10, 2021, 2:37pm UTC](https://discourse.gohugo.io/t/site-getpage-empty/32292/2 "2021-04-10T14:37:43Z")

</div>

Rename `index.md` to `_index.md`.

```nohighlight
├── content
│ └── _index.md
└── layouts
    └── _default
        ├── baseof.html
        └── index.html

```

I don’t understand why you need to use `.GetPage` with a single page site, but if you must, any of these will work:

```auto
{{ with .Site.GetPage "_index.md" }}
{{ with .Site.GetPage "home" }}
{{ with .Site.GetPage "" }}

```

---

<div class="post-metadata">

**Author:** ![fount-via](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@fount-via](https://discourse.gohugo.io/u/fount-via)\
**Post date:** [April 11, 2021, 9:57am UTC](https://discourse.gohugo.io/t/site-getpage-empty/32292/3 "2021-04-11T09:57:59Z")

</div>

Wonderful. Thanks for your help!  
I’ve also removed the {{ with .Site.GetPage }} statements as you suggest.  
(I’m unsure why I used them in an earlier version of the site but I do remember struggling to build a single index.html page.)

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 13, 2021, 9:58am UTC](https://discourse.gohugo.io/t/site-getpage-empty/32292/4 "2021-04-13T09:58:42Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
