Strictly Typed Object Keys in TypeScript
Read ArticleWant to type a data object so that a given key (e.g. "foo") can only be paired with a specific type (e.g. Bar)? Now you can!
theAdhocracy
Want to type a data object so that a given key (e.g. "foo") can only be paired with a specific type (e.g. Bar)? Now you can!
Theo has some really interesting videos, but the more I dig into the archive the more I find little gems like this. It's the definition of a quick tip, and it helps explain Maps and Sets in …
Static sites don't make search functionality easy, but luckily there are some excellent services that do. I've been messing around with Algolia and finally have it working with Craft and Gatsby the way I want it... on the backend, at least.
The search page is live, the index is populated, but it all looked a bit rubbish and it didn't quite work as well as I wanted. Now it's using custom-styled components, queries are tracked/stored via the URL for persistence, and you can filter results based on category.
I love books. I have a huge collection of them and I routinely add to it. But when it comes to the topic of spreading knowledge and information, I think the web wins. It may not be as nice to use, but it is more accessible, and that means it's more valuable.
A fascinating look at how modern front-end architecture and practices can help solve some of the communities issues; even the ones they initially created! Really neat to see how Brad has been using …
A quick (and dirty) way to fetch local data from a JSON file and modify the look of a page in Astro, completely natively.
Need to use an HTML datetime attribute? Can't remember the correct format, or which JavaScript function will output it? Well, here you go!
Various notes from my battle to get a local development environment working for Craft CMS.
I'm still enjoying the wombo-combo of Sass and CSS Modules, but my React-ified brain occasionally blanks on how to approach certain problems. The one that catches me out the most: style inheritance.
Looking back over 2024, through the lens of the data I captured (or had captured about me).