Netlify: Hugo Site Build Failure - Configuration Error, Invalid Filename

2021.02.14 | 124 words |

Problem

I host my core sites on Netlify using Hugo (read: How I scale my sites to 500k users per month). Recently, my build started failing with errors:

Configuration error

Deploy did not succeed: Invalid filename 'tags/c#/index.xml'. Deployed filenames cannot contain # or ? characters

Solution

In my case, the solution was pretty simple. I could see that the page that was failing was a tags page, which Hugo generates based on the tags frontmatter (read: metadata) attached to my posts.

This meant that one of my posts was using the tag c# which was causing Netlify to fail. A quick search revealed a post that was doing this and I was able to resolve by changing c# -> csharp in my tags section.

 

About the Ham

Hi I'm Hamilton - I built this! If you want more content like this subscribe to my email list, connect with me around the web, or take a look at some of my other projects.

More Projects

comments powered by Disqus