Limit to how many markdown files you can have in a content folder

I’ve noticed that if I have more than 250* markdown files Hugo renders the page differently by adding padding to the right side of the browser. I only notice this on the iPhone 6s; no change is visible on a larger viewport.

As soon as I limit the amount of markdown files, the issues disappears. Any thoughts?

Hierarchy: Content > Files > 250+ markdown files

  • It’s possible that 260 files might work as well, I haven’t tried to find the exact number that causes the issue. I know that 300 files cause an issue.

  • I’m using Hugo v0.13

250+ posts can be handled easily by Hugo. Take a look at this post. This dimensions are clearly over your needs but they showcase nicely the capabilities of Hugo.

I would rather think that your templates or stylesheets create this rendering issues.

Thanks for the link. I’ll go back and have a look again.

Hugo shouldn’t be responsible for how your site looks. It’s possible that there’s something in your page’s styling that adds the padding. Is there any way that you could post a link to a demo site showing the behavior?

You’re absolutely right. It was a mistake in my code. Spent 10+ hours trying to figure it out and thought I had solved it when I limited the amount of markdown files, but it didn’t. All is good now, an error in my CSS. Thanks for helping out.

1 Like