I am creating a landing page for the newsletter portion of my new site. I want logged out members to see the landing page, and logged in/subscribed members to see a complete archive of all past issues. I know how to do this within the same template using {{#if member}}
, but I would love to be able to create and maintain the landing page with the Ghost editor.
I tried creating a custom-newsletter.hbs
page template that I can select in the Ghost editor, but I cannot figure out how to route that page to my newsletters collection in routes.yaml
. I tried this:
collections:
/newsletter/:
permalink: /newsletter/{slug}/
template: custom-newsletter
filter: tag:newsletter
The routing seems to work, but I canβt get any context in the template β {{#post}}
for example β to return data or even render HTML.
Am I wasting my time, or is there a practical way to do this?