Having trouble manipulating the routes.yaml file

I am trying to simply do the following:

  1. Separate blog posts into certain categories for navigational purposes
  2. The categories can change in the future, so I am opting to add all posts permlinks to one place
  3. If possible, if someone navigated through the tree, the link in the address bar can continue down that path. for example, if the article lives at mysite/blog/{slug}, but the person found the article in mysite/blog/category1 then if they were to click on the article, it would show as mysite/blog/category1/{slug}
  4. If someone clicked on an articles first tag, it would take them to the defined page mysite/blog/category1 not mysite/blog/tag

currently, /career-guide/resume-portfolio/ is returning a 400 parsing filter error
and when clicking on a link that goes to /tag/resume-portfolio it is not redirecting

Thank you in advance.

Here is my file thus far:
controller: channel
filter: tag[Resume & Portfolio]
controller: channel
filter: tag[Search & Apply]
controller: channel
filter: tag[Master the Interview]
controller: channel
filter: tag[Jabord in Review]

permalink: /career-guide/{slug}/
template: index

tag: /tag/{slug}/

and my json is:
“from”: “/tag/resume-portfolio/”,
“to”: “/career-guide/resume-portfolio/”,
“permanent”: true,

“from”: “/tag/search-apply/”,
“to”: “/career-guide/search-apply/”,
“permanent”: true,

“from”: “/tag/master-the-interview/”,
“to”: “/career-guide/master-the-interview/”,
“permanent”: true,

“from”: “/tag/job-offer/”,
“to”: “/career-guide/job-offer/”,
“permanent”: true,

“from”: “/tag/succeeding-at-work/”,
“to”: “/career-guide/succeeding-at-work/”,
“permanent”: true,

“from”: “/tag/career-path/”,
“to”: “/career-guide/career-path/”,
“permanent”: true,

“from”: “/tag/pay-salary/”,
“to”: “/career-guide/pay-salary/”,
“permanent”: true,

“from”: “/tag/human-resources/”,
“to”: “/career-guide/human-resources/”,
“permanent”: true,

“from”: “/tag/jabord-in-review/”,
“to”: “/career-guide/jabord-in-review/”,
“permanent”: true

You might also be better simplifying / shortening your URLs? Something like this might be easier?


    permalink: /career/resume/{slug}/
    filter: primary_tag:resume
    template:  index
    permalink: /career/jobsearch/{slug}/
    filter: primary_tag:jobsearch
    template:  index
    permalink: /career/interview/{slug}/
    filter: primary_tag:interview
    template:  index
    permalink: /career/interview/{slug}/
    filter: primary_tag:jabord
    template:  index
    permalink: /career/interview/{slug}/
    filter: primary_tag:career
    template:  index
    permalink: /{slug}/
    template:  index

  tag: /tag/{slug}/
  author: /author/{slug}/

The docs recommend that you use primary_tag because you won’t end up with the same page appearing in two different collections.

Incidentally, I think there is an error in your filter syntax: you are missing : after tag

filter: tag[Resume & Portfolio]

but I think you mean: has tag resume OR portfolio

filter: tag:[resume,portfolio]

or possibly: has tag resume AND tag portfolio

filter: tag:resume+tag:portfolio

Hi Jeff,

thanks for this. can you clarify what is happening here:
/career/: permalink: /career/interview/{slug}/ filter: primary_tag:career template: index /: permalink: /{slug}/

Are there two permalinks for each article? one at /slug and one at /interview/slug (if the primary tag was interview)? or is /slug only for articles without a primary tag assigned somewhere else? I ask, because I believe that my categories will change overtime, and that I did not get them right on the first round, and wanted to make sure that articles lived at /slug. I only wanted them to appear in the other places to categorize. I am stuck between these two options…


Sorry Ethan, I don’t understand what you are asking?

Would you please format your YAML as code - the white-space is important. You need to indent it 4 spaces at the start of each line.

The docs explain that you use ROUTES kind of like a search - it doesn’t change the URL. You use COLLECTIONS to permanently rearrange your posts.

TBH, the simplest is the best - I think you should just use ROUTES and leave your articles on /{slug} URLs - this will let you change the ROUTES in the future, and any anyone that links to one of your /{slugs} will still have a good link, even after you change the ROUTES.

You can also have the same page in multiple ROUTES, e.g. you could have /career/ show all posts with tags[career, resume, jobsearch] etc and at the same time have /resume/ which only shows posts tagged with resume.

Once you set permalinks and then change them, anyone who links to your pages will have broken links.

Yes this was exactly what I was trying to explain. Let me format it correctly. Thank you for your help.