Hello @DavidDarnes and Team,
I continue in my effort to build my personal blog, and I have come across a doubt, which I cannot decipher. I want to personalize my website, with a personalized home. To do this, I modified the routes.yaml
file, built the home.hbs
page, assigned the routes in the menu correctly (back-end) and managed to establish the connection. But, I can’t discover the assignment of routes.yaml
data, nor the structure that I need within index.hbs
so that the {{#foreach posts}}{{> "post-card"}}{{/foreach}}
are displayed correctly (Currently, it disappears, it looks blank.). I would be very grateful if you could help me discover what I am failing.
Current routes.yaml file
routes:
collections:
/:
permalink: /{slug}/
data: page.home
template: home
/blog/:
permalink: /blog/{slug}/
template: index
taxonomies:
Current index.hbs file
{{!< default}}
<main>
<div class="container">
<h2>Personal title</h2>
{{#foreach posts}}
{{> "post-card"}}
{{/foreach}}
{{pagination}}
</div>
</main>
Thanks a million in advance.
Jesús.