Header not displayed on custom homepage


#1

Hello,

I have setup a custom homepage on my Ghost blog. I have a page created in Ghost web interface named “Home” which is available at /home/.

My routes.yaml file is
routes:
/:
data:
post: page.home
template:
- page

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

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

When i access the page with /home/ everythings is ok but when i access to the root of my website, the page is showing up whithout the header.

Exactly like @damosullivan here : Dynamic Routing with static home page not working as expected

Do you got some ideas ?


#2

I haven’t found the source of the problem yet, but I just noticed something curious. When I zoom the display or when I consult on mobile, the header appears well. I also noticed that the background is not the same color as on a classic page. If anyone knows where the problem may come from.



#3

Hello, this is because you changed the home page layout but didn’t change the styles.
To fix the header you need to remove this style specification https://github.com/TryGhost/Casper/blob/master/assets/css/screen.css#L101 .
Also, you need to change the background color of home page article here https://github.com/TryGhost/Casper/blob/master/assets/css/screen.css#L749 .

The last thing, I think, you need to improve is to show the logo in the home page header and remove logo duplicate in the /blog page. To achieve this just change the home to blog here https://github.com/TryGhost/Casper/blob/master/partials/site-nav.hbs#L3 .

I hope it will help you!


#4

Hello,
Thank you, it works perfectly!

Bonus question, do you know if it is possible to remove the display of the page name (in my case “home”) only for the home page?


closed #5

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