Home

JavaScript

Generating Workable TypeScript Types from Contentful Content

Automatically generate TypeScript type definitions from a Contentful schema, and then override for front-end adjustments.

May 03, 2023

Transform Notion API Data into Component-Ready JSON

Take raw JSON output from the Notion API and transform it into properties that can be used by your website’s pages and components.

Apr 03, 2023

Write Notion Page and Block Data to JSON File with Node.js Script

Write a Node.js script that connects to a Notion database and writes its page and block content to a local JSON file.

Apr 02, 2023

Post Messages to Slack with Node.js

Build a simple Slack app that sends one-way messages to a channel using a Node script.

Feb 16, 2023

Overriding Next.js Link and Image Components

Next.js ships with these two incredibly useful utility components. You can further abstract these to clean up your code.

Feb 09, 2023

Use a Class Map to Set Dynamic Styles

Components often need to use styling based on property combinations. There are a number of ways to solve this, but only one I’ve found to be the cleanest.

Feb 03, 2023

Using Node.js to Check for Broken Links

A tutorial that walks through the process of writing a Node.js script to recursively test for broken links on a website.

Feb 03, 2023

Using Unsplash API to Seed Placeholder Data

With its large collection of (free) professional imagery and easy-to-use developer API, Unsplash is a great tool for generating contextual placeholder images for your application.

Dec 01, 2022

JavaScript for 11ty with esbuild

As your 11ty application evolves, you’ll want more organization with your JavaScript. Here’s a method for bundling together using esbuild.

Sep 30, 2022

2 Methods for Binding JavaScript Events with 11ty

When using raw JavaScript with 11ty, there are multiple approaches you can take for binding events, all without complicating the JavaScript you’re using.

Sep 29, 2022