i trying to set a page as homepage
i read some route things and handlebars theme docs but i cant still understand well
most of guides and docs are about filtering and somethings
but i want show contents inside of page as homepage
i build some kind of game wiki with lot of link each other
basic ghost index.hbs is not good for wiki blog
its blog link
https://wiki.chocosobo.com/remnant/
and page that i want to set as homepage
https://wiki.chocosobo.com/remnant/home/
or any way to redirect homepage to page?
i tried to edit redirect.json and add from “/” to “/home/”
looping redirect happens so i roll back this
ok, now i successfully add page content in homepage
but hyperlink that setted on page looks not work on homepage
how can i fix?
@chocosobo can you please clarify your English translation and provide screenshots of the link you refer to?
you can see html lines with F12 on browser
all lines has <a href~~> properly
but not work on homepage, worked on original page content
@chocosobo Where is your homepage?
sergi
October 7, 2020, 10:46am
8
I’m the original author of the post that shared @denvergeeks
To do what you want, make sure to follow these steps:
Create a “home.hbs” file in the root folder of your theme in your editor of choice.
Change the {{#post }} and {{/post}} for {{page}} and {{/page}} with the content inside.
{{#page}}
<article class="post-content {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
<header class="post-content-header"><h1 class="post-content-title">{{title}}</h1></header>
{{#if feature_image}}<div class="post-content-image">
<img class="kg-image" src="{{feature_image}}" alt="{{title}}" /></div>
{{/if}}
<div class="post-content-body">{{content}}</div>
</article>
{{/page}}
Edit your routes.yaml file to be something like this.
routes:
/:
data: page.home
template: home
collections:
/blog/:
permalink: /blog/{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
Upload the “routes.yaml” code in Settings > Labs and your compressed theme folder in Settings > Design.
Create the page “Home” and “Blog” in the admin with the exact slug.
Enjoy! Demo at https://raidata.com
i set well now, and it display page that named “home” as homepage
but page css is not work at homepage
i gave it up after 3 hours of edit cause its not ghost basic theme
its just functional table of contents page so i done my job at here
ty for all your help guys
behoyh
October 5, 2022, 1:59pm
10
My solution without editing the theme is here:
Simply upload the redirect and routes yaml.