HUGO

How to migrate an older Hugo site to the latest version of Hugo

Are there any resources on upgrading hugo? It’s been a while since I used Hugo, my current folder structure (on the left) seems quite different compared to the current folder structure (on the right).

How can I upgrade to the latest version while keeping the url structure intact?
ex. https://asunar.github.io/2019/01/15/Remote-Work/
Thanks.

The structure on the left is your repository, the structure on the right is your website under public. I think first step would be to “just run hugo” in your repo and see what happens inside of the public folder. There might be problems with your templates if you come from a very old hugo. The CLI will post errors, just copy paste them. But from your picture - no issue there, that’s two different locations. Of course you upload only the contents of the public folder to your website root.

Thanks, that makes sense I was wondering why there were no markdown files in my repo.

I’m getting the following. I will checkout the docs for layout lookup rules.
> $ hugo server -D
> Building sites … WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
> WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “taxonomy”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
> WARN 2020/06/25 06:16:09 found no layout file for “HTML” for kind “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

1 Like

Can you please post a github repo of your website? The home warning (last WARN) should go away if you copy the list template from layouts/_default into layouts/home.html (copy, not move). The others I would need to see the structure of your theme to know.

I’m following this conversation with great interest, because I’m also trying to update our website from 0.30 to newer versions.

In addition to the standard message –found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. – I’m seeing an empty home page. My sense is that the tag {{% index-section-list %}} perhaps no longer does what it used to?

A minimal repro is at