Generating Twitter Card Images in Hugo

So, I should have really gone to bed a couple hours ago, but instead I spent WAY TOO MUCH time figuring out how to get Hugo to generate a Twitter Card image, like below:

Long story boring, the code is in my miniblog repo, but some important bits.

First, I made up an image template in Photoshop and put it into the assets/opengraph folder.

Next, I have the following code used to generate the image. It is called by an over-ridden twitter partial which includes a link to the generated image. When all is said an done, Hugo builds that image using the info from the get-featured-image.html file and writes it to disk.

It works, for now. I need to do some tweaks and make it look better, but my Photoshop skills are very lacking! More tweaks required!

testing image uploads

Using Typora for writing stuff, it has a feature for uploading images automatically… Let’s see if this works.

that seemed to have worked… let’s try to customize the domain?

yea. that seems to have worked! [Update… ignore the domain up there… it should be… ]


So, it’s been a while since I used as an editor… Going to try to give it a shot again for this… Should make posting a little easier…

Hugo Tools

Some quick links to some tools I am using for Hugo.