I am having an issues with tags. I’m currently using the PinPress skeleton. Normally blog posts have the URL mydomain.com/blog/post-title. In order to have a more SEO friendly URL, I created category folders inside of 01.blog. For example, I created a folder called “Finance” inside of the 01.blog folder with a .md file containing
title: Finance
published: false
body_classes: header-image fullwidth
sitemap:
changefreq: monthly
priority: 1.03
content:
items: @self.descendants
order:
by: date
dir: desc
limit: 5
pagination: true
pagination: true
Let’s say I create a new post called “New Post” with a tag “Apple” and create it inside of the 01.blog/Finance folder. The new post will appear on the front page (blog page) and if I click the new post it will have the URL mydomain.com/blog/finance/new-post.
If I am on the homepage (blog page), where I can see a descending list of all posts, and I press the “Apple” tag on “New Post” it will take me to mydomain.com/tag:Apple and properly show me all of the posts with tag “Apple”. However, if I click on New Post and follow its URL mydomain.com/blog/finance/new-post an issue arises. If I am on the post’s page and click the tag “Apple”, it takes me to mydomain.com/blog/finance/tag:Apple. This page is a 404 Error page. Clearly, the URL is incorrect. It is adding the extra /blog/finance to the URL because of the folder structure.
Is there anyway to maintain the folder structure but have all tag URLs point in the proper direction?