Kia ora!
I’ve just been working on setting up dynamic routing so I can combine my Ghost site with my portfolio site without clogging up my newsletter. I’m pretty much all set except for an odd pagination issue!
I’m self hosting, running 5.94.0 and using a modified version of Source 1.3.2.
The issue I have is that pagination on my home (/
) page triggers the same home
template on /page/2
, showing the exact same content, rather than the index
template that often triggers with other Source installs.
Here’s my routes.yaml - I’m wondering if there’s something missing to get pagination working correctly?
routes:
collections:
/:
template: home
permalink: /newsletter/{slug}/
filter: primary_tag:newsletter
/art/:
permalink: /art/{slug}/
template: collection
filter: primary_tag:art
data: tag.art
/speaking/:
permalink: /speaking/{slug}/
template: collection
filter: primary_tag:speaking
data: tag.speaking
/essays/:
permalink: /essays/{slug}/
template: collection
filter: primary_tag:essay
data: tag.essay
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
home.hbs
is largely unmodified from Source:
{{!< default}}
{{!-- The tag above means: insert everything in this file into the body of the default.hbs template --}}
{{> "components/header" headerStyle=@custom.header_style}}
{{#match @custom.header_style "!=" "Highlight"}}
{{> "components/featured" showFeatured=@custom.show_featured_posts limit=4}}
{{/match}}
{{> "components/cta"}}
{{> "components/post-list" feed="home" postFeedStyle=@custom.post_feed_style showTitle=true showSidebar=@custom.show_publication_info_sidebar}}
and the only modification I’ve made otherwise is inserting a custom about-card
into header-content
.
Is there a way to force /page/2
to load index
rather than home
? Thanks in advance!