If you like, my code for that is at my Github if you wanna see, I kinda rewrote what he did for my use IIRC?
I ended up pivoting to 11ty. Pelican is good, but was too inflexible for me with generating types of pages, it kinda is "blog" and "everything else". I'm sure folks do other things but I couldn't readily figure out dynamically generating certain types of pages.
Ended up being a breeze with the way 11ty does, though it's less blog-y with it so it took a tiny bit more work for that, but categorizing stories is easy to do with dynamic listings I couldn't do so easily with Pelican.
But both are good! Pelican just didn't fit my evolving needs as readily, but I did like working with it and I hope you do too!