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??
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!
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!!
Looking to tweak @Cathy_Sarisky 's elegant routes.yaml approach here.
Is there a simple code-injection solution for a landing page that removes all (or nearly all) nav and other links, etc., to create a simple, focused, Substack-like landing/signup page? The âno thanksâ (or âMaybe laterâ/etc.) link would then go to the siteâs main page.
If not, can a page template do this?
I think you could build something similar as a page, including a sign up card. Youâd just need to use some code injection to hide the navigation
Gotcha, going to try and see how it does.
If I want a logged-in free or paid member to not be shown that page, and go to the regular home page, where would I test for that?
If you can edit the theme, make a custom .hbs file. Then use handlebars to check for logged in status. If itâs got to be code injection/html card, then check for /member/api/session returning a value, and redirect if it does, using javascript.