Following this tutorial: https://ghost.org/tutorials/content-collections/
I’m trying to make a subcollection for Books, where if I go to /books, it will display all the posts with the tag books.
Here’s my routes.yaml
routes:
/painting/:
controller: channel
filter: tag:[Knigi]
template: books
/apple-news/:
controller: channel
filter: tag:Knigi
template: index
collections:
/:
permalink: /{slug}/
template: index
tag: -[hash-books]
/mybooks/:
permalink: /mybooks/{slug}/
template: index
filter: tag:Knigi
/thebooks/:
permalink: /thebooks/{slug}/
filter: tag:books
taxonomies:
tag: /tag/{slug}/
author: /author/{slug}/
I’ve been trying to achieve the functionality both by routes and collections, but I cant get it to work.
The issue is, when I now point the browser to /books, or /thebooks or /painting or /apple-news, I get an empty template page. No posts are loaded.
However, if I open /tag/books I can see that there are two posts fitting that description.
I’ve tried different templates, Casper, Massively, Edge, Headline, but nothing happens.
What am I doing wrong?
Technical details about setup:
Ghost URL: Localhost
Ghost version: Ghost-CLI version: 1.24.0
Ghost version: 5.39.0
Node version: v18.12.1
Not sure how to see issues in the console.