Local build renders new page, Netlify does not

I’m not sure where to ask for help with this, but maybe here’s the place.

My site is crediblecorvid.com .
I’m using HUGO_VERSION = "0.70.0" .
My theme is Hugo-Academic.
I’m creating my site with the R package blogdown.

In case it matters, I have two Git branches on GitHub. One for testing, and one for production.

In my development branch, I created a new page with an embedded video for an academic talk. On GitHub I created a pull request to merge that page into my production branch. The pull request passed all checks and Netlify created a preview, as expected. The new page is not showing up in the deploy preview. My local build (verified using the same Hugo version) has the new page, and I can see the markdown file for it in the pull request on GitHub, so I don’t know what’s going on.

The new page should be /talk/esa_2020/index.html
The markdown is in the testing branch at content/talk/ESA_2020/index.md
The pull request is here: https://github.com/gregorypenn/crediblecorvid/pull/4

Full build log follows:
10:10:37 AM: Waiting for other deploys from your team to complete
10:10:39 AM: Build ready to start
10:10:41 AM: build-image version: 8e315e54bc4032a32e73290be556cde4f8348c12
10:10:41 AM: build-image tag: v2.8.2
10:10:41 AM: buildbot version: 45cd00068410d70db72c9672cdd014995488e12a
10:10:42 AM: Fetching cached dependencies
10:10:42 AM: Starting to download cache of 166.6MB
10:10:42 AM: Finished downloading cache in 921.07072ms
10:10:42 AM: Starting to extract cache
10:10:48 AM: Finished extracting cache in 5.055365183s
10:10:48 AM: Finished fetching cache in 6.037766769s
10:10:48 AM: Starting to prepare the repo for build
10:10:48 AM: Preparing Git Reference pull/4/head
10:10:49 AM: Found netlify.toml. Overriding site configuration
10:10:49 AM: Starting build script
10:10:49 AM: Installing dependencies
10:10:50 AM: Started restoring cached node version
10:10:53 AM: Finished restoring cached node version
10:10:54 AM: v10.22.0 is already installed.
10:10:54 AM: Now using node v10.22.0 (npm v6.14.6)
10:10:55 AM: Attempting ruby version 2.6.2, read from environment
10:10:57 AM: Using ruby version 2.6.2
10:10:57 AM: Using PHP version 5.6
10:10:57 AM: Installing Hugo 0.70.0
10:10:59 AM: Hugo Static Site Generator v0.70.0-7F47B99E linux/amd64 BuildDate: 2020-05-06T11:18:50Z
10:10:59 AM: Started restoring cached go cache
10:10:59 AM: Finished restoring cached go cache
10:10:59 AM: unset GOOS;
10:10:59 AM: unset GOARCH;
10:10:59 AM: export GOROOT=’/opt/buildhome/.gimme/versions/go1.12.linux.amd64’;
10:10:59 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
10:10:59 AM: go version >&2;
10:10:59 AM: export GIMME_ENV=’/opt/buildhome/.gimme/env/go1.12.linux.amd64.env’;
10:11:00 AM: go version go1.12 linux/amd64
10:11:00 AM: Installing missing commands
10:11:00 AM: Verify run directory
10:11:00 AM: Executing user command: hugo
10:11:00 AM: Building sites …
10:11:01 AM: | EN
10:11:01 AM: -------------------±----
10:11:01 AM: Pages | 69
10:11:01 AM: Paginator pages | 0
10:11:01 AM: Non-page files | 34
10:11:01 AM: Static files | 42
10:11:01 AM: Processed images | 17
10:11:01 AM: Aliases | 15
10:11:01 AM: Sitemaps | 1
10:11:01 AM: Cleaned | 0
10:11:01 AM: Total in 520 ms
10:11:01 AM: Skipping functions preparation step: no functions directory set
10:11:01 AM: Caching artifacts
10:11:01 AM: Started saving pip cache
10:11:01 AM: Finished saving pip cache
10:11:01 AM: Started saving emacs cask dependencies
10:11:01 AM: Finished saving emacs cask dependencies
10:11:01 AM: Started saving maven dependencies
10:11:01 AM: Finished saving maven dependencies
10:11:01 AM: Started saving boot dependencies
10:11:01 AM: Finished saving boot dependencies
10:11:01 AM: Started saving go dependencies
10:11:01 AM: Finished saving go dependencies
10:11:01 AM: Build script success
10:11:01 AM: Starting to deploy site from ‘public’
10:11:01 AM: Creating deploy upload records
10:11:01 AM: Creating deploy tree
10:11:01 AM: 36 new files to upload
10:11:01 AM: 0 new functions to upload
10:11:03 AM: Starting post processing
10:11:03 AM: Post processing - HTML
10:11:06 AM: Post processing - redirect rules
10:11:06 AM: Post processing - header rules
10:11:06 AM: Post processing done
10:11:06 AM: Site is live
10:11:27 AM: Finished processing build request in 45.638139597s

My first guess would be that Netlify isn’t building future pages? Looks like the page has date: "2020-08-03" in the frontmatter. Maybe test either changing the date to today, or changing the build command in Netlify to hugo --buildFuture, but let me know if I’m wrong. :slight_smile:

edit: if you only want to build future pages on deploy previews and not the main site yet, you can set different build commands for different contexts in netlify.toml:

  command = "hugo --buildFuture"
1 Like

Thanks @jakejarvis ! I’m still pretty new to this and didn’t realize how that worked until you pointed it out. I tried commenting out the publishDate line from the YAML, and when that didn’t work, I set the date to one prior to today, and that did it.

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