Showing custom home page in root URL



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.


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


John, thank you for the quick response.

This is what my routes.yaml looks like.

    data: page.home # I have a page named home
      - home

    permalink: /blog/{slug}/
      - index

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

And in my home.hbs, I am doing:


But this outputs undefined.



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.


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