Closed yuvipanda closed 10 months ago
This is a problem because I'd like to publish this blog post but can't: https://github.com/2i2c-org/2i2c-org.github.io/pull/205
Ah, so it works on netlify but not locally or on GH actions
This is less urgent now, because I can use the netlify previews to see it. Still something we should fix one way or another though.
Just providing some quick diagnosis since I'm the one that wrote a lot of that infrastructure:
It looks like the failure is related to this template:
https://github.com/2i2c-org/2i2c-org.github.io/blob/main/layouts/partials/ogimage.html
This is the template that defines the "social preview" image for each page. It takes our blank .png
and adds text on top of it with the "filter" function. Within that, the function that seems to be breaking is this one:
https://gohugo.io/functions/images/text/
The error seems to be related to the attempt to load a font (error calling Text: invalid text font source: <nil>
). And if you check the URL of the font, it looks like it has changed, so I think that is the issue:
{{ $font_roboto_medium := "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Medium.ttf" }}
So I think we just need to figure out wherever the .ttf
files got moved to, or get a more reliable source of the .ttf
file for Roboto-Medium
Here's the PR where they moved it:
I'm trying to build the website off a clean checkout in
main
and it's failing:This is with the version of
hugo
specified innetlify.toml
and the GitHub action:Using a newer hugo (v0.120) also fails.