Home
Support Forums

Upgrading from Ubuntu 14.04 (Trusty) to Ubuntu 20.04 (Focal)

Hi,
I tried to upgrade from Ubuntu 14.04 (Trusty) to Ubuntu 20.04 (Focal) for my Hugo-academic/netlify webpage as end is near for Trusty.

The new one 20.04 is:
htthttps://determined-archimedes-0e2275.netlify.app/

And the old 14.04 one:
hhttps://erling-lundevaller.netlify.app/
Both are deploying from the same github: GitHub - erlinglundevaller/blogg: blogg

The old version fails in deploying as expected. The new site deploys but renders a site with no content.
Any suggestions what is going wrong?

Following instructions on the internet I made the following changes in the files:

In single.html:
from:
{{ if (.Params.publication_types) and (ne (index .Params.publication_types 0) “0”) }}
to:
{{ if and (.Params.publication_types) (ne (index .Params.publication_types 0) “0”) }}

In header.html:
from:
{{ if or .Site.RSSLink .RSSLink }}
{{ end }}
To:
{{ with .OutputFormats.Get “rss” -}} 111 {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}

An also in header.html:
From
{{ .Hugo.Generator }}
To:
{{ hugo.Generator }}

Hi, @erlinglundevaller. This is a public repo so I first tried cloning it and running Hugo locally.

I’m seeing the same issue with my local build. Before I can assist with getting it working in the new build image, would you please assist me in getting it to build successfully for me locally?

I’m using MacOS and the following version of Hugo: hugo v0.88.1+extended darwin/amd64 BuildDate=unknown

These are the command I used to test:

git clone https://github.com/erlinglundevaller/blogg
cd blogg
hugo server

When I opened the browser, I see the same thing locally as I do at Netlify - specifically, there is no content. So, this doesn’t appear to be anything relating to our service and is instead something to do with the repo itself. Can you descibe your local configuration and how it might differ from mine?

Also, you might have local files which differ the the actual repo. To test this, you can make a fresh clone of the repo in a new directory using the command above and see if you can reproduce the issue. If so, this proves that the local repo working directory differs in some way from a “fresh clone” of the repo. Finding that difference and committing it to the upstream repo is the usual solution if you confirm that there is some difference.

Thanks!

I followed your instructions and the cloned repository works perfectly on my computer. I also tried it on a different computer where it ends with “panic: non-positive interval for NewTicker”
Hugo version used added at the end. I normally work in RStudio.
Erling

erling@erling-eM350:~/blogg$ hugo server
port 1313 already in use, attempting to use an available port
Building sites … WARN 2021/09/14 10:51:49 Page’s .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermali
nk. If what you want is the front matter URL value, use .Params.url.
WARN 2021/09/14 10:51:49 Page’s .UniqueID is deprecated and will be removed in a future release. Use .File.UniqueID.

Hi @erlinglundevaller,

I’m not seeing the Hugo version being used in this:

Either way, if it’s working locally, I’d advise you to change the Hugo version being used on Netlify by adding an environment variable named HUGO_VERSION and the value as the one you’re using locally.

1 Like

The version of Hugo:

$ hugo version
Hugo Static Site Generator v0.55.4-579004178/extended linux/amd64 BuildDate: 2019-04-25T07:52:12Z

Thanks for your help, problem solved by setting hugo to the same version as locally.
Erling

1 Like