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

dont fail on remote r-ladies blog image unavailable #333

Merged
merged 3 commits into from
Apr 19, 2024
Merged

Conversation

drmowinckels
Copy link
Member

Will allow the website to build even if the image listed for the R-Ladies blog is no longer available. The image will be replaced with a random gravatar.

@drmowinckels drmowinckels requested a review from a team as a code owner April 19, 2024 11:33
Copy link

Test build failed 😭 Check out the build logs.

Copy link

Test build failed 😭 Check out the build logs.

@cosimameyer
Copy link
Contributor

Just thinking out loud: Based on the errors, I'm unsure whether Go templates actually support try-catch. Based in this issue, it looks like it doesn't. Maybe we can add a continue instead? (or something like this)?

@drmowinckels drmowinckels marked this pull request as draft April 19, 2024 20:39
@drmowinckels
Copy link
Member Author

actually this partially works, and I'm unsure why its really failing. The code is more or less right out of hugo docs (https://gohugo.io/functions/resources/getremote/#error-handling) Locally, it manages to deal with incorrect image url just fine. And if you check the build, and click on the image links that are erroring, none of them actually exist (all are giving 404). I'm trying to understand what up and make a workaround in this PR, just not there yet, unfortunately.

Copy link

🎉 The preview is built! Check it out 👀

@drmowinckels drmowinckels marked this pull request as ready for review April 19, 2024 20:57
@drmowinckels
Copy link
Member Author

found it! I needed to warn rather than error on missing image. Quite obviously :)

@cosimameyer cosimameyer merged commit 8480ee5 into main Apr 19, 2024
2 checks passed
@cosimameyer cosimameyer deleted the imgfix branch April 19, 2024 21:23
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.

2 participants