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

Replace deprecated .Hugo with hugo. #171

Merged
merged 19 commits into from Apr 23, 2019

Conversation

tobinjt
Copy link
Contributor

@tobinjt tobinjt commented Apr 16, 2019

Prerequisites

Put an x into the box(es) that apply:

  • This pull request fixes a bug.
  • This pull request adds a feature.
  • This pull request introduces breaking change.
    Potentially, I don't know for sure.

Description

Hugo 0.55 deprecates .Hugo and produces this warning:

Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.

Update the theme to use hugo rather than .Hugo.

I marked this as potentially introducing a breaking change because I don't know how backwards compatible this change is.

tobinjt and others added 13 commits November 2, 2018 23:55
When you request /tags/foo, the web server will redirect you to
/tags/foo/ so the browser needs to make two requests.  Add the trailing
slash in the link so that only one request is needed.
Co-Authored-By: tobinjt <johntobin@johntobin.ie>
Co-Authored-By: tobinjt <johntobin@johntobin.ie>
Hugo 0.55 deprecates .Hugo and produces this warning:
"Page's .Hugo is deprecated and will be removed in a future release.
 Use the global hugo function."
@tobinjt
Copy link
Contributor Author

tobinjt commented Apr 16, 2019

I don't understand why the tests are failing :(
The only error message I can see is 11:34:23 AM: failed during stage 'building site': Build script returned non-zero exit code: 255
Is there a doc I can read about how to run the tests myself to debug them?

Thanks,

@luizdepra
Copy link
Owner

I think the problem is the Hugo version used to build the deploy preview. You can change it in the netlify.toml file.
Also, you need do change the minimal hugo version in the theme.toml file.

@tobinjt
Copy link
Contributor Author

tobinjt commented Apr 22, 2019

Thanks for the info!
I've updated the minimum version and the version to test with to 0.54 after brute-force searching to find the minimum version supporting the new variable.
You might not want to accept this PR - it significantly increases the minimum required version.

There's another deprecation warning:
Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
Sadly Hugo doesn't report where it's used, and I don't understand the intent of the theme well enough to make the change :(

@luizdepra
Copy link
Owner

There is no problem if we need to bump the minimal version of this theme. It is good to keep things up-to-date.

Thank you for the PR and for pointing the deprecation warning. I will create a Issue to remember to fix this problem later.

@luizdepra luizdepra merged commit 87879a7 into luizdepra:master Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants