Hugo

Public Folder Size Increasing in Size

I noticed that between yesterday and today the size of my public folder went from 2.6 mb to 9 mb. I then ran hugo --cleanDestinationDir and now the folder size is at 26 mb.

Anyway to debug what happened ?

The only changes I made today was to add syntax highlight for python in about 5 posts. The over md folder is only about 439 kb. I dont have any images etc. since I keep those on a separate CDN

My repo is here https://gitlab.com/kashifk/kashifs-blog/

Do you use the default directory for public? -d switch with hugo?

  • delete it manually and try again
  • run again and check the differences

Yes I am using the default folder that is generated by hugo. I did the following, deleted the public folder and ran just the “hugo” command, which I think is prod mode. The folder still clocks in at 27 MB. What I have seen is that the categories and tags folder combined is 20 MB.

update:- going through git, it seems that after I made the change for the RSS.xml and index page from .Page to .Site.RegularPages the categories and tags folders ballooned in size.

I had to disableKinds to get the size down to 6.6 MB - with no categories or tags generated at all. Something changed between hugo versions that caused it to balloon. Its still about 3 times bigger than before.

update:- adding in limits on the output for RSS to only 1 file dropped everything to 6 MB

If you have a lot pages, I truncated the feeds

{{ range first 25 site.RegularPages }}

It depends, how often you publish. The NEWS shouldn’t contain very old links.

PS:
i publish the summary and not the content

<description>{{ .Summary | plainify | chomp }}</description>

Yes Im adding truncations as well. Still a mystery as to what happened with the categories folder between versions because looking at older builds that folder was a few Kb and them boom it became MB. I had to disableKinds to get it to stop building those two folders.

The RSS file is small, even with everything posted in it.

some MB are not a big deal today.

my private “playground” has now 490MB with 5GB for panorama pictures.
All running an Raspberry :wink:

Don’t care a lot about size.