Some content not generated on Netlify deploy

Hi there. I’m launching my first Hugo site and got everything running on Netlify with NetlifyCMS in working order. There’s just one problem I can’t solve: when deploying the site on Netlify, on 2 pages the list of subpages is not generated. All content is in my repo and when I run hugo serve locally the pages are like they should be.

When I check the ‘public’ folder on github, I see that the list items are present in the index.html source code. Also in the CMS the pages are there. But on the frontend the list of subpages is not displayed in the page and also not present according to the browsers inspector.

Hugo seems to generate the correct content, but somewhere down the line it seems to get lost. I’m out of ideas, so if anybody has a clue it would be most welcome!

Hi there,

Please have a read about Requesting Help and follow the advice there.

1 Like

Thanks for pointing that out. I will read it carefully and add any resources necessary.

1 Like

Hello again, I hope I can provide more info that could help solving this problem. Out of all 138 pages 2 pages are missing content. First I will mention my sources:

The pages that are not correctly generated are:

| - vondelingen
| - | - vondelingen
| - | - | - (this one)
| - | - minnen
| - | - | - (and this one)

The URL’s of these pages are:

Both pages should contain links to subpages. In the source in the public folder the content is there. When I run hugo server on my local dev the pages are generated correctly. Only in the Netlify deploy the pages are missing content.

The output on local dev in the terminal is this:

$ hugo server

                   | EN   
  Pages            | 138  
  Paginator pages  |   0  
  Non-page files   |   0  
  Static files     | 155  
  Processed images |   0  
  Aliases          |   2  
  Sitemaps         |   1  
  Cleaned          |   0  

Built in 451 ms
Watching for changes in /Users/marcoverheul/Sites/corneel/development/geuzebroek/{content,data,layouts,static,themes}
Watching for config changes in /Users/marcoverheul/Sites/corneel/development/geuzebroek/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address
Press Ctrl+C to stop

The output of the netlify deploy is this:

9:40:09 AM: Build ready to start
9:40:11 AM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
9:40:11 AM: build-image tag: v3.3.7
9:40:11 AM: buildbot version: 7f867b365e4c3934ca5b72b9d51f0a4d1f96685d
9:40:12 AM: Fetching cached dependencies
9:40:12 AM: Starting to download cache of 254.9KB
9:40:12 AM: Finished downloading cache in 73.626588ms
9:40:12 AM: Starting to extract cache
9:40:12 AM: Failed to fetch cache, continuing with build
9:40:12 AM: Starting to prepare the repo for build
9:40:12 AM: No cached dependencies found. Cloning fresh repo
9:40:12 AM: git clone
9:40:13 AM: Preparing Git Reference refs/heads/master
9:40:14 AM: Starting build script
9:40:14 AM: Installing dependencies
9:40:16 AM: v10.19.0 is already installed.
9:40:16 AM: Now using node v10.19.0 (npm v6.13.4)
9:40:16 AM: Attempting ruby version 2.6.2, read from environment
9:40:18 AM: Using ruby version 2.6.2
9:40:18 AM: Using PHP version 5.6
9:40:18 AM: Started restoring cached go cache
9:40:18 AM: Finished restoring cached go cache
9:40:18 AM: unset GOOS;
9:40:18 AM: unset GOARCH;
9:40:18 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
9:40:18 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
9:40:18 AM: go version >&2;
9:40:18 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
9:40:18 AM: go version go1.12 linux/amd64
9:40:18 AM: Installing missing commands
9:40:18 AM: Verify run directory
9:40:18 AM: Executing user command: hugo
9:40:18 AM: Building sites …
9:40:19 AM:                    |
9:40:19 AM:  EN
9:40:19 AM: +------------------+-----+
9:40:19 AM:   Pages            | 138
9:40:19 AM:   Paginator pages  |   0
9:40:19 AM:   Non-page files   |
9:40:19 AM:    0
9:40:19 AM:   Static files     | 152
9:40:19 AM:   Processed images |   0
9:40:19 AM: Aliases          |   2
9:40:19 AM:   Sitemaps         |   1
9:40:19 AM:   Cleaned          |   0
9:40:19 AM: Total in 542 ms
9:40:19 AM: Skipping functions preparation step: no functions directory set
9:40:19 AM: Caching artifacts
9:40:19 AM: Started saving pip cache
9:40:19 AM: Finished saving pip cache
9:40:19 AM: Started saving emacs cask dependencies
9:40:19 AM: Finished saving emacs cask dependencies
9:40:19 AM: Started saving maven dependencies
9:40:19 AM: Finished saving maven dependencies
9:40:19 AM: Started saving boot dependencies
9:40:19 AM: Finished saving boot dependencies
9:40:19 AM: Started saving go dependencies
9:40:19 AM: Finished saving go dependencies
9:40:23 AM: Build script success
9:40:23 AM: Starting to deploy site from 'public'
9:40:23 AM: Creating deploy tree 
9:40:24 AM: Creating deploy upload records
9:40:24 AM: 0 new files to upload
9:40:24 AM: 0 new functions to upload
9:40:24 AM: Starting post processing
9:40:25 AM: Post processing done
9:40:25 AM: Site is live
9:40:45 AM: Finished processing build request in 33.276656711s

Here is a screenshot:

I hope I was able to give a clear picture on what is happening. Please let me know if you need more info. Thanks!

What version of Hugo are you using on Netlify vs local? I tested your site, and I see the missing sub-sections go missing running hugo server in versions <=0.56. There were some changes to how .Pages works right around that time.

I’m using version 0.68.3 on local dev. I’m not sure about netlify. I did set this version in the netlify.toml file.

Got it! When I set the HUGO_VERSION environment variable the page content is there.
Thank you for pointing me in the right direction!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.