I’m following these instructions to add a newsletter directory:
Objective: working banner and list of emails sent out underneath it.
Trying to implement a newsletter archive page similar to
But I’m failing miserably as find inconsistencies should I change routes.yaml
in the theme (Lyra) vs changing the content > settings > routes.yaml
.
How to reproduce:
Add the following to Lyra specific routes.yaml
(under collections)
/newsletter/:
permalink: /{slug}/
template: index
And you get this:
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.
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