yong
September 18, 2021, 11:47am
1
Anyone know how to custom home page with Liebling theme? I have create an home.hbs and copy content of page.hbs, but it still showing it’s only display footer of the theme.
Liebling website: GitHub - eddiesigner/liebling: Beautiful and clean Ghost theme that is easy and comfortable to use. To get the latest version please head over the releases page 👉🏼
routes.yaml
routes:
/:
data: page.home
template: home
collections:
/:
permalink: /{slug}/
template: index
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
Have you tried copying the contents of index.hbs?
yong
September 18, 2021, 1:30pm
3
Yes, I works with copy index.hbs, but I did not see my Home page when I copy then content from page and replaced main …/main from page.hbs to home.hbs
<main class="main-wrap">
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}}
{{!-- Inject styles of the hero image to make it responsive --}}
{{> hero background=feature_image}}
<div class="m-hero__content" data-aos="fade-down">
<h1 class="m-hero-title bigger">{{title}}</h1>
{{#if custom_excerpt}}
<p class="m-hero-description">{{custom_excerpt}}</p>
{{/if}}
</div>
</section>
<article>
<div class="l-content">
<div class="l-wrapper in-post" data-aos="fade-up" data-aos-delay="300">
<div class="l-post-content">
<div class="pos-relative js-post-content">
{{content}}
</div>
</div>
</div>
</div>
</article>
{{/post}}
</main>
In your home.hbs file, try to replace {{#post}} with {{#page}} and {{/post}} with {{/page}}.
So, add your content between:
{{#page}}
{{/page}}
Instead of:
{{#post}}
{{/post}}
1 Like
yong
December 18, 2021, 9:43am
5
Thanks, it resolved my problem.
I also refer routes.yaml file from your post.
1 Like