Search

Post types:
Categories:
🔖

TypeScript string literal arrays

Read Note

A useful trick when working with tokenised values is that you can generate an "immutable tuple" within a "const context" (computer science gibberish overload 😂) and reference that. So if you have …

Published:
Categories:
  • JavaScript
Tags:
🔖

Array functions and the rule of least power

Read Note

The various array methods in JavaScript can be thought of on a scale of power, or really flexibility. At the top end you've got the for loop, at the bottom the highly-specific functions …

🔖

Why using an index value for a React key is a bad idea

Read Note

Solid reasoning – with a clear example – of the potential dangers of using an array index as the key value in ReactJS. Not something I'd ever considered (and something I do a lot) but …

📖

Forgotten & Surreal Instruments [#42]

Read Article

We've just had the privilege of listening to the latest show put together by the Society of Strange and Ancient Instruments. Never heard of them? Well, neither had I. In fairness, had we not known …

📖

Pass API Data to the Stylesheet with CSS Variables

Read Article

I keep running into the same problem: how to set a style attribute in the CMS and have that be dynamically rendered on the front-end, without relying on inline styles. Turns out it's a great use case for CSS variables!

🔖

Inversion of Control

Read Note

I have a tendency to prefer the kind of "inside-out" control that Kent is advocating in this piece, though I've never head it called "inversion of control" before. The idea of giving your users the …

📖

IndieWebCamp London 2020

Read Article

I finally made it to an IndieWebCamp meetup, even if it was remote only due to the increasingly restrictive implications of the coronavirus. I learnt a lot, I had a great time, and I'm ready to start implementing a whole bunch of new ideas right here. I also took a huge number of notes from the speakers and sessions throughout the day.

📖

Adding Search with Algolia (Gatsby, Craft CMS - Part 1)

Read Article

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.

📖

Adding Search: Refining The Frontend (Algolia, Gatsby, Craft CMS - Part 3)

Read Article

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.

🔖

The random link in the age of static sites

Read Note

Heydon has been working on Ga11ery, a neat image portfolio site generator that's ideal for webcomics. But it's built on the Jamstack using 11ty and Netlify, which means it isn't so simple to …

🔖

Intro to JavaScript promises

Read Note

An overview of JS promises for all skill levels. Starts with an excellent analogy of thread-blocking as …

📖

Grid-ish Flexbox or Flexible Grid?

Read Article

The new dominant layout methods in CSS – grid and flexbox – have solved a lot of issues. Still, sometimes the ideal layout is somewhere in the middle: a flexible grid-like mashup. With a bit of outside-the-box thinking, you can there from either angle.

📖

Books vs the Web

Read Article

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.

🔖

The struggle of emoji on the web

Read Note

I use emoji quite a lot on this site, which means I'm already aware of some of the more unusual browser/OS quirks. Don't ever use flag emoji (except pirate 🏴‍☠️) because Microsoft refuses to …

🔖

Automating the deployment of your static site on your own server

Read Note

Need to self-host your front end away from the "modern" services like Netlify or Vercel? As both continue to get a little sketchier with time, it's definitely something I'm having to …