Ghost V3 Can't create custom homepage

Hi, I’m trying to create a custom homepage in Ghost 3, using the default Casper theme.

What I’ve done so far is copy the theme files from Github, create a new home.hbs file which is a copy & paste of the page.hbs file. I have then uploaded this file via the control panel.

In my routes I have the following:

routes:

/:
    data: page.home
    template: home

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

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

I have created a page which a URL slug of “home”.

When I navigate to the homepage URL, I get a 404 error. Navigating to /blog works correctly and displays the default Casper index page.

Any idea what I’m doing wrong?

Looks like your indentation is off. Your routes need to be indented under the routes: key like this:

routes:
  /:
    data: page.home
    template: home

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

taxonomies:
  tag: /blog/tag/{slug}/
  author: /blog/author/{slug}/
3 Likes

🤦 Derp. Thank you @Hannah

So that worked, I also had to change the content of home.hbs to include a {{#page}} tag rather than the {{#post}} tag that was in the page.hbs template.