I recently migrated from a dynamic CMS => Hugo [and love it], but appears I’ve screwed something up in trying to get sneaky… I think I know how to fix it, but not the ideal solution.
My old content tagging used /tags/ vs. /Tags/ in the URL. I wanted to support both and have one redirect to Hugo’s use of /tags/. In addition, I wanted to recategorize a lot of my content and consolidate some tags, so I created a ./content/tags folder and for each tag, I created a subfolder and _index.md file. Within that index file, I added aliases… like so:
This migrated me from the old tag “SPFx” => “SharePoint Framework” and added support for the sentence case URLs with Tags.
It appears this has screwed up the rollup generation as my rollups for those categories are coming up blank. There are multiple pages created for paging, but all of them have no content in them, just the HTML from the theme of the site.
I can confirm this is what caused it because when I remove the ./content/tags/SharePoint Framework folder and rebuild, it works as desired, just without my aliases.
My question after trying to figure this out for the last day is how do you control the front matter for tag rollup pages, such as overriding the title, description, seo & creating aliases without breaking the content?
I don’t understand the link to taxonomies… I read the docs & I’ve done what it shows, by adding frontmatter to an index page, but when I do that, there’s no content added to the page (as you can see from my previous link).
I’ve further noticed that this is affecting only those tags with spaces in them. From the link above, if you try other tags without spaces, there’s no issue, but tags with spaces are causing an issue.
The part that’s really confusing me is why hugo serve and hugo are generating different results, serving content from memory vs. disk. Running 0.57.2 but had the same issue with 0.57.0.
Yes, the content is in a private repo (not on GitHub, but Azure DevOps… that shouldn’t matter though). If you’re asking so you can see what I’m doing, what exactly are you looking for and I can share a subset of it. however, the contents of the ./content/tags/SharePoint Framework/_index.md file that’s used to set the front matter on the tag that I linked to above is in my OP above.
It’s difficult to say what’s wrong with your code. Maybe it’s the whitespace in the aliases urls, maybe it’s something else in your config somewhere. You have mentioned that you have your repo private somewhere; if you are unable to share that, please make a smaller repo with dummy content reproducing the problem that we can have a look at, as per Requesting Help . It’s easier for us to help when there’s a repo we can clone instead of creating one ourselves hoping to match yours.
Correct… I have done this, but I can’t tell if this is causing the issue or not. I’m trying to provide alternate links via aliases due to my different casing & renamed tags from my old platform.
Azure = Microsoft’s public cloud, but the storage used for the site is case sensitive (ie: not Windows where casing doesn’t matter).
Sorry on the terminology… when I said “rollup”, i’m referring to the page that’s summarizing content in the taxonomy. So, the site homepage is a summary, or rollup, of excerpts of my most recent 15 posts.
That’s sort of my problem, I can’t tell where that’s coming from. I hired someone to build the theme from my existing (now previous) dynamic CMS site. Looking at the theme, I can’t figure out what’s generating these pages for tags.
Agreed… it’s only the first page (but that first page is also losing the pagination at the bottom of the page, so users can’t get to page 2. I have to think this has something to do with the space in the tag, because other tags without spaces don’t have this issue… ie: https://www.andrewconnell.com/tags/Azure
I’ve looked at the config.yml & so far after a lot of testing, I haven’t found anything that would address the issue, or anything in my templates that’s causing it. Your advice is why I came here… I agree… but I’m at a loss…
Not sure if it helps, but above I linked to a public repo of my site so you can see the config & theme for yourself… appreciate the reply, but still unsure what else to look at from what I’ve already done…