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

Projects
None yet
2 participants
@tobinjt
Copy link
Contributor

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 some commits Nov 2, 2018

Add trailing slash to remove redirects.
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.
Improve how trailing slash is added.
Co-Authored-By: tobinjt <johntobin@johntobin.ie>
Improve how trailing slash is added.
Co-Authored-By: tobinjt <johntobin@johntobin.ie>
Replace deprecated .Hugo with hugo.
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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Owner

commented Apr 22, 2019

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 added some commits Apr 22, 2019

@tobinjt

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Owner

commented Apr 23, 2019

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

2 of 5 checks passed

Header rules No header rules processed
Details
Pages changed All files already uploaded
Details
Redirect rules No redirect rules processed
Details
Mixed content No mixed content detected
Details
deploy/netlify Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.