Put a landing page as home

Hello, I am not able to find this:

I have created a page, how to set up as homepage instead default home of any theme??

On one of my sites, I created a custom homepage, and moved the usual layout to /blog. This necessitates a custom routes.yaml, and homepage template.

routes:
  /:
    data: page.home
    template: home
  /rss/:
    template: rss
    content_type: text/xml

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

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

I am not able to replicate =(

It crashes.

I just want this: I create a page mipage.com/landing

I want that home page (mypage.com) ere that created.

=(

Did you create a page with the slug ‘home’? And do you have a home.hbs file in your theme? If you didn’t, that’s probably why it isn’t working… (You could change the template to index.hbs instead if your theme doesn’t have a home.hbs.)

If you can provide more details on what’s not working (“it crashes” ?) we can try to help more!

2 Likes

I am new to Ghost and having a similar issue. I am currently using the Source theme and I am trying to create a static page in Ghost in my account that will be my home/landing page. I created that page and it is named home (_____.ghost.io/home/). I updated the routes to be:

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

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

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

Is the route info wrong and/or am I missing something that has to also be updated in the home.hbs file?

Thanks!

Routes.yaml is very fussy about spacing. Can you paste yours back in using the </> button to make sure it doesn’t get mangled?

You probably do NOT want to use the home template for your static page - the home template is an index-type template and displays a bunch of posts, not the content of a page. You probably want the ‘page’ template instead.

Here’s a working example:

Thank you so much, Cathy!!

2 Likes