Am missing something obvious here? I have a ghost blog site recently set up, I have created test posts tagged with “profile”.
I’d prefer not to show profile posts on the index page at https://bundupress.com/ as they are a sort of company profile directory, which will amount to 1000’s, so these should only be found at https://bundupress.com/directory/
I edited my routes.yaml as follows:
I created a route for posts tagged with “profile”.
routes:
/directory/:
controller: channel
filter: tag:profiles
theme: profiles
I filtered posts tagged with “profile” from route.
collections:
/:
permalink: /{slug}/
template: index
filter: tag:-[profiles]
The filter removes “profile” tagged posts as expected at bundupress.com/ and I can navigate to url and see the looped profile posts ie. /directory/
The issue: When you select a profile post to show the profile post ie. /directory/profile-one/, you get 404 error!
Sorry new to ghost and probably rookie error, not sure if there is a rule or better way to do this that I have missed.
Steps I have taken to test various scenarios.
- I tried different themes.
- I changed “profiles” in routes.yaml to filter tag “startups”, same 404 issue but now on startups.
- I created a separate home.hbs page as site root, same issue.
- I created separate templates ie. theme: profiles.
- I used {{#get “posts” filter="tags:-[profile] in index.hbs instead of routes.yaml, which works but still get 404 error.
Sorry babbling… any suggestions would be awesome.