Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Hugo #2052

Closed
brdunfield opened this issue Mar 16, 2021 · 5 comments
Closed

Upgrade Hugo #2052

brdunfield opened this issue Mar 16, 2021 · 5 comments

Comments

@brdunfield
Copy link
Contributor

brdunfield commented Mar 16, 2021

We're using quite an old version at this point (0.55). This will involve many breaking changes.

@dj2
Copy link
Contributor

dj2 commented Mar 31, 2021

Until we've upgraded our Hugo, is there an easy way to get the correct Hugo version on a dev machine? If I use the one from brew I'm getting something in the 0.8x range which seems to have issues rendering things like the blog cards on the homepage.

@brdunfield
Copy link
Contributor Author

I unfortunately did not find an easy way.

I had to grab the 0.55 release tarball here: https://github.com/gohugoio/hugo/releases/tag/v0.55.6

And followed instructions for installing from tarball: https://bwaycer.github.io/hugo_tutorial.hugo/tutorials/installing-on-mac/#from-tarball

@dj2
Copy link
Contributor

dj2 commented Apr 1, 2021

Just as a note for anyone else, you need the extended hugo release, they're on the bottom of the list. If you don't have extended you'll get an error like error: failed to transform resource: TOCSS:

@dj2 dj2 mentioned this issue Apr 1, 2021
3 tasks
dj2 pushed a commit that referenced this issue Apr 1, 2021
* Fix .URL -> .Permalink warning
 * Fix .Dir -> .File.Dir warning

The .File.Dir zero object warning remains, I've been unable to figure
out how to fix it. It's currently triggered in each of the 3 places we
use .File.Dir.

Issue #2052
@dj2
Copy link
Contributor

dj2 commented Apr 6, 2021

One bug to be fixed: the blog posts don't show up on the homepage with newer Hugo. For some reason the blog array has one item in it which isn't really a blog post. It seems like the section doesn't have any content like it does in the older Hugo version?

@dj2 dj2 added the help wanted label Apr 6, 2021
@katedee
Copy link
Contributor

katedee commented May 26, 2021

Another possible side effect with the newer version: hot builds don't seem to be working consistently if you have a newer version of Hugo (at least not with the CSS, and some svgs)

Update: downloaded the older version of Hugo, and no issues with hotbuild now. So I think we can safely say hotbuild gets broken when using a newer version.

dj2 added a commit that referenced this issue May 31, 2021
This PR removes the .File.Dir warning generated by Hugo on startup. It
does this by removing the use of .File.Dir and adding a new key into the
parameters for each of our types of things (partnership, platform-tool
or resource). This key is then used `.Params.productkind` to do the
filtering instead of the `.File.Dir` check.

Issue #2052
dj2 added a commit that referenced this issue May 31, 2021
This PR removes the .File.Dir warning generated by Hugo on startup. It
does this by removing the use of .File.Dir and adding a new key into the
parameters for each of our types of things (partnership, platform-tool
or resource). This key is then used `.Params.productkind` to do the
filtering instead of the `.File.Dir` check.

Issue #2052
dj2 added a commit that referenced this issue May 31, 2021
It seems with newer Hugo the main page needs to use `.Site.Pages`
instead of `.Pages` in order for the page content to show up.

This seems to also pull in the folder as a data item, it's fine for the
products as they have an `onhomepage` filter. For the blog posts I added
in a filter to make sure there was a `processed` tag in order to filter
out the folder.

Issue #2052
dj2 added a commit that referenced this issue Jun 2, 2021
It seems with newer Hugo the main page needs to use `.Site.Pages`
instead of `.Pages` in order for the page content to show up.

This seems to also pull in the folder as a data item, it's fine for the
products as they have an `onhomepage` filter. For the blog posts I added
in a filter to make sure there was a `processed` tag in order to filter
out the folder.

Issue #2052
dj2 pushed a commit that referenced this issue Jun 3, 2021
It seems with newer Hugo the main page needs to use `.Site.Pages`
instead of `.Pages` in order for the page content to show up.

This seems to also pull in the folder as a data item, it's fine for the
products as they have an `onhomepage` filter. For the blog posts I added
in a filter to make sure there was a `processed` tag in order to filter
out the folder.

Issue #2052
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants