Netlify deploy is excluding some folders / Netlify build is not identical to localhost

Hey Folks!

While preparing a website for a university course I am confronted with a deploy problem. I am creating the website via Hugo in R, using the Hugo-Apero-Theme.

The website ( is working well in every area: it properly updates when I push my commits to my GitHub-repository except for some folders/files. One part of the website shall be called “lecture”. Here I want to publish all the different lecture slides I use in my lectures. In my localhost / local build all the 8 lectures can be seen without any problems. In the netlify deploy / publish only the first 4 lectures are uploaded. The folders are identical to each other except for the names and the content, ofc. All the other stuff I am adding to the website is properly getting synchronised with my local build.

I tried the following things already without success:

  • deleted the lectures and created them again
  • trigger deploy (with cache clearing and without)
  • read several forum entries and netlify/hugo/r documentations
  • changed the baseURL to /
  • created a new test website with the same repository
  • checked and played aroung with some netlify build settings

Moreover, I checked my first deploys and realised that the problem seemed to appear on the 17th of April. The first deploy worked well (all lecture chapters are uploaded), all the deploys after do not include every folder/file. So I also checked the differences between these two codes and this didn’t get me any further.

I am quite new to programming, R, Hugo, Git and Netlify. Please excuse any missing information or ambiguities. Just let me know if you need further information! Thank you so much for your help.

P.S. Because the information on the website are kind of sensitive until now, I prefer to not upload the website already (so there is no link included in here). If you really need a link to the website I can delete the content and keep the structure so you can follow my train of thoughts. There is also no build log screenshot because everything is built properly without any errors. Just the 4 folders which include 4 lecture chapters are missing on the website…

Kind regards,

@AcademicMJS You should confirm:

  1. That the relevant data is in the repository
  2. The output of a local “build” (not a local “develop” command)

E.g. If you were to start with an empty folder, pull your repository down into it, and run the same build command as on Netlify, you should see the same result locally.

If you do this, it’ll likely help you determine where the issue is.


Thanks so much for that advice! I was kind of blind to this approach of finding the problem (probably because i spent a lot of time thinking to complicated). Your idea helped me finding the issue very fast and reminded me to determine the problem in a calm and slow way is rather a good idea :slight_smile: .

For anyone who experiences a similar problem: The problem in my case was a small thing in the YAML of the RMarkdown documents. I used dates in the future (5th May, 5th August, …). Apparently this caused the issue. Changing the date to a date which lays in the past makes the entries visible! :bulb: