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

[BUG] Doesn't work with Hugo >= v0.75.0 #518

Closed
nekr0z opened this issue Sep 14, 2020 · 9 comments · Fixed by #519
Closed

[BUG] Doesn't work with Hugo >= v0.75.0 #518

nekr0z opened this issue Sep 14, 2020 · 9 comments · Fixed by #519
Labels
bug Something isn't working

Comments

@nekr0z
Copy link
Contributor

nekr0z commented Sep 14, 2020

When .Content is nil, the function/content.htmlpartial fails the new error check introduced in Hugo v0.75.0.

@vinimmelo
Copy link

After 0.75.0 the theme doesn't work anymore. Breaking changes from Hugo, sad.

@theapplegates
Copy link

If anyone can do this, I found this "work around"
gohugoio/hugo#7228

I don't know where to add the code, or I would check it myself. I know where to put
"ignoreErrors = ["error-remote-getjson"]"
but not the rest.

"just did a local build with the current master and can confirm that #7867 does fix the problem and the with...else...end construct works correctly.

For anyone looking for this solution in the future for some version after 0.76.5

Add ignoreErrors = ["error-remote-getjson"] to your config file
Trap getJSON calls you expect to fail with the following
{{ with getJson "...." }}

{{ else }}

{{ end }}

@nekr0z
Copy link
Contributor Author

nekr0z commented Oct 30, 2020

If anyone can do this, I found this "work around"

This is not a work-around, and it is not even related to the problem. #519 is a fix that actually is two lines of code.

@theapplegates
Copy link

Ah, ok. I see that now. My bad.

@mwolfaardt
Copy link

When wil the next release be and the change go in? At the moment I can't publish my site.

@nekr0z
Copy link
Contributor Author

nekr0z commented Nov 5, 2020

When wil the next release be and the change go in?

No one knows. See #514.

At the moment I can't publish my site.

Yes, you can: either use an older Hugo version or fix your copy of the theme by adding the necessary lines.

@mwolfaardt
Copy link

Is there any update on this? or planned release update?

tiagovignatti added a commit to tiagovignatti/LoveIt that referenced this issue Dec 19, 2020
@achenger
Copy link

With the help of automated deployment tools (such as https://vercel.com/ ), we can lock the version of hugo in 0.74.0 by creating file vercel.json. For details pls. browse https://vercel.com/docs/build-step#build-&-development-settings

@antedoro
Copy link

Hi on mac I use this workaround:

Go here: hugo repo and find Hugo version you want (in my case v0.74.3).
Download file and copy it on /usr/local/bin/ so:

From downlod directory with Terminal:

cp hugo_extended_0.74.3_macOS-64bit.tar.gz /usr/local/bin/

go on cd /usr/local/bin/

extract it with:

tar -zxvf ugo_extended_0.74.3_macOS-64bit.tar.gz

Now you need an alias to call this particular version of hugo:

cd /usr/local/bin/hugo-0.74.3/
# ./hugo version
alias hugo74='/usr/local/bin/hugo-0.74.3/hugo'
hugo74 version

cd on working directory and

hugo74 server -D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants