SNathJr / ghost-on-heroku

One-button Heroku deploy for the Ghost 3.2.0 blogging platform.

Home Page:https://snathjr.github.io/ghost-on-heroku/

Repository from Github https://github.comSNathJr/ghost-on-herokuRepository from Github https://github.comSNathJr/ghost-on-heroku

Modifying routes.yaml in theme (Lyra - a supported one), vs. modifying content>settings>routes.yaml

codechair opened this issue · comments

Describe your problem
Finding inconsistencies should I change routes.yaml in the theme (Lyra) vs changing the content > settings > routes.yaml.

Describe the things you have tried so far
How to reproduce:

Send two emails out with Ghost's send email feature.

Add the following to Lyra specific routes.yaml (under collections)

  /newsletter/:
            permalink: /{slug}/
            template: index

you get this:

Screenshot 2020-01-27 at 17 17 51

The cool thing is that those two “emails” are actually emails that were successfully sent out, so that part of my objective is working.

Issue: the header banner does not work and I get a 404 error.

Now, should I, instead, add the same to content > settings > routes.yaml (under collections)

/newsletter/:
               permalink: /{slug}/
               template: index

I get a working header banner, it renders, but the sent newsletters won’t show up, it will be empty of content. The “emails” that were sent out do not load as list.

Screenshot 2020-01-27 at 17 46 53

The same happens (working banner but no newsletter content) if I modify both Lyra’s routes.yaml and content > settings > routes.yaml.

Would love any pointers on how to fix this.

Again, the objective is : working banner and list of emails sent out underneath it

Have you checked for similar issues?
Yes

Additional context
I’m following these instructions to add a newsletter directory:
https://ghost.org/docs/members/recipes/#newsletter-directory

Objective: working banner and list of emails sent out underneath it.

Trying to implement a newsletter archive page similar to
https://publisherweekly.org/newsletter/

For others in the future:

This full set of configurations (done on content > settings > routes.yaml) makes the filtering work (the route under "/" is needed)

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: visibility:public
  /newsletter/:
    permalink: /{slug}/
    template: index
    filter: visibility:-public

This will not, however, list down emails that have been sent out (which is a completely different issue, not solved by above)