# Showing custom home page in root URL

**URL:** <https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040>\
**Category:** Developer help\
**Created:** [September 12, 2018, 7:20pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040 "2018-09-12T19:20:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameer](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sameer/32/1486_2.png) [@sameer](https://forum.ghost.org/u/sameer)\
**Post date:** [September 12, 2018, 7:20pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040/1 "2018-09-12T19:20:34Z")

</div>

Hi,

I just created a self-hosted instance of Ghost 2.0 and I am trying to figure out how to solve below problem.

What I am trying to accomplish: I want to be able to show a custom home page in the root URL. For my use case this page needs to be one of the static pages that I can modify from ghost editor. I have already setup the blog posts to show up in the /blog route.

---

<div class="post-metadata">

**Author:** ![John](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/john/32/29288_2.png) [@John](https://forum.ghost.org/u/John)\
**Post date:** [September 12, 2018, 7:27pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040/2 "2018-09-12T19:27:39Z")

</div>

You’ll want to check out the Dynamic Routing documentation for details on how to do that

[https://docs.ghost.org/docs/dynamic-routing](https://docs.ghost.org/docs/dynamic-routing)

---

<div class="post-metadata">

**Author:** ![sameer](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sameer/32/1486_2.png) [@sameer](https://forum.ghost.org/u/sameer)\
**Post date:** [September 12, 2018, 7:32pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040/3 "2018-09-12T19:32:21Z")

</div>

John, thank you for the quick response.

This is what my routes.yaml looks like.

```
routes:
  /:
    data: page.home # I have a page named home
    template:
      - home

collections:
  /blog/:
    permalink: /blog/{slug}/
    template:
      - index

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/

```

And in my home.hbs, I am doing:

```
<main>
{{content}}
</main>

```

But this outputs `undefined`.

---

<div class="post-metadata">

**Author:** ![sameer](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/sameer/32/1486_2.png) [@sameer](https://forum.ghost.org/u/sameer)\
**Post date:** [September 12, 2018, 8:18pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040/4 "2018-09-12T20:18:09Z")

</div>

Solved.

I was able to do `ghost run` and see the output of my `page` context in the console using `{{log page}}` added to `index.hbs`. This object does not have a key called `content` that’s why it was outputting `undefined` earlier. I fixed this issue by using `{{{page.html}}}`. Notice the triple mustache to render unescaped HTML.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [September 26, 2018, 8:18pm UTC](https://forum.ghost.org/t/showing-custom-home-page-in-root-url/3040/5 "2018-09-26T20:18:16Z")

</div>

Closed on September 26, 2018, 8:18pm UTC

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