I'm making an effort to make my og images better yet again, I'm going for that next 10% better. I really like my og images, but there are some title sizes that overflow. This page is a page to help debug. How I make these og images is for another day.

Script #

I use my own static site generator markata. I can use it to generate a list of posts wrapped in their og image. I use itertools to do a groupby so that I can do roughly every 5 characters larger, and see a wide variety of sizes.


from markata import Markata
from itertools import groupby

markata = Markata()
lens = [{'length': len(post.title), 'title': post.title, 'slug': post.slug} for post in m.posts]
lens_sorted = sorted(lens, key=lambda x: x["length"])

groups = {
    k: list(g)
    for k, g in groupby(lens_sorted, key=lambda x: (x["length"] // 5) * 5)
}

posts = [g[0] for g in groups.values()]
ogs = [ f'[![{post["title"]}](https://shots.waylonwalker.com/shot/?url=https://waylonwalker.com/{ post["slug"] }/og/&height=600&width=1200&scaled_width=1200&scaled_height=600&format=jpg&v=4)](https://waylonwalker.com/{ post["slug"] }/og/)' for post in posts]
print("\n\n".join(ogs))

OG-Sample #

sample

Kedro

Weeknote 0

Upcoming Stream

Codeit Bro Interview

⭐ Doomlab7 homelab-argocd

⭐ heathdbrown python_code_tips

Making good documentation in python

What DataScientists Should Know About S3

⭐ nvim-treesitter nvim-treesitter-textobjects

⭐ dataengineerone kedro-streaming-twitter-pipeline

How I Quickly Capture Screenshots directly into My Blog

Looking for a Heroku replacement, What I found was shocking!

💭 My Bed Doesn't Work Because of AWS Outage? TheStandup - YouTube

Dont Starve Together Session One - Getting Into It With A Clockwork Bishop

shots #

I also do shots posts that change the og template quite a bit by adding the image to the page. I'll do the same script, but add a filter to the images.


from markata import Markata
from itertools import groupby

markata = Markata()
lens = [{'length': len(post.title), 'title': post.title, 'slug': post.slug} for post in m.filter('templateKey=="shots" and "family" not in tags')]
lens_sorted = sorted(lens, key=lambda x: x["length"])

groups = {
    k: list(g)
    for k, g in groupby(lens_sorted, key=lambda x: (x["length"] // 5) * 5)
}

posts = [g[0] for g in groups.values()]
ogs = [ f'[![{post["title"]}](https://shots.waylonwalker.com/shot/?url=https://waylonwalker.com/{ post["slug"] }/og/&height=600&width=1200&scaled_width=1200&scaled_height=600&format=jpg&v=4)](https://waylonwalker.com/{ post["slug"] }/og/)' for post in posts]
print("\n\n".join(ogs))

Funk Track 1

Hornet On A Bench

Apple Boxes Complete

Bambu Poop Flinger Jammed

First Fingerboard In The Press

Wyatt Drew A Watertower In Aesprite

Design For Bosch Colt Dust Collection V1

Dont Starve Together Session One - Nooo Luuucy

Dont Starve Together Session One - Setting Up Base

Dont Starve Together Session One - Opening Up The Garden

Dont Starve Together Session One - First Encounter With A Tall Bird

Dont Starve Together Session One - Getting Into It With A Clockwork Bishop

Reply by email