Trouble with setting a static home page


#1

Hello! I am trying to set a static homepage in Ghost with routes.yaml, but it’s giving me some trouble.

I want to set the static page Start as the starting site, but when I visit the site, it just shows the site with no content. Only the footer is visible, which indicates that it can’t grab the content for some reason.

Is there anything I did wrong?

This is what my routes.yaml looks like:

routes:
  /:
    data: page.start
    template: page

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

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

#2

Hey marvin, you’ll need to get the content inside page.hbs using {{#page}} - have you got that set up?


#3

Ah, that did the trick. The Theme I have installed used the {{#post}} helper in the page.hbs file :face_with_raised_eyebrow:


#4

Yeah that’s actually a dodgy default which works fine w/ default routing and not with custom routing - I ran into the exact same thing myself just last week :slight_smile:

We’ll get that improved shortly. Actually it seems like the docs aren’t super clear about this either, I’ll update and make sure that’s specifically mentioned!


#5

Ok updated the example here:

There’s also a mention in the properties section here:


closed #6

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