Adding Social Share Links in Eleventy

One common feature of content sites (including this one), is links/buttons/etc to share a piece of content on social media. Typically this is Twitter, but many sites will include ways to share links on Facebook, LinkedIn, and more. A reader asked me a few days ago about how this could be done in Eleventy and I thought I’d share a quick example. Raymond Camden… more →
Posted in: JavaScript

Mapping the Extreme Heat Belt

Last Monday the First Street Foundation released data from its analysis of how current and future extreme heat events will impact American neighborhoods. Enter your zip-code into the First Street Foundation website and you can view the risk that your home faces over the next thirty years from extreme heat (and also the risk to your home from wildfire and flooding). The First Street Foundation Maps Mania… more →
Posted in: Interactive Maps

git Force Push

Rebasing is a frequent task for anyone using git. We sometimes use rebasing to branch our code from the last changes or even just to drop commits from a branch. Oftentimes when trying to push after a rebase, you’ll see something like the following: hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Commonly developers will use the --force or -f flags during a push to force pushing code changes: git push origin my-branch --force # or git push origin my-branch -f I was recently... more →
Posted in: JavaScript

Ukraine Under Attack

The Map of the Russian Shelling of Ukraine is a new interactive map which shows where and when Russia has bombed the people of Ukraine. The map uses different colored markers to indicate the different types of shelling attacks (rocket, air or artillery). If you click on any of the markers you can view the date of the Russian attack and click-through to read any media reports about the selected Maps Mania… more →
Posted in: Interactive Maps

Specify Node Versions with .nvmrc

I’ve heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management. One tip I like to give new developers is adding a .nvmrc file to their repositories. The file contents is just a simple string representing the version of Node.js the project requires: v16 A project with this .nvmrc is specifying that Node.js v16 should be used. Any developer could then run nvm use to download, install, and switch to that version. A nvm install call would then install dependencies in line with that version. The post Specify Node Versions with .nvmrc... more →
Posted in: JavaScript

Hiking the Inca Trail to Machu Picchu

The 3D Inca Trail Tour is a guided tour of the four day trek from Piskacucho to Machu Picchu. This interactive tour of the incredible journey to the historic Incan citadel in the Andes makes impressive use of MapboxGL’s 3d terrain data to provide a virtual taste of some of the world’s most beautiful views.As you scroll through the tour you will follow the actual ancient path taken by the Royal Maps Mania… more →
Posted in: Interactive Maps

Building a Web-Based Badge Scanner

I’m at a conference now working a booth (well, at least when I started writing this), and I really didn’t realize how much I enjoyed this part of the job. While I’ve attended a few conferences post COVID (err, well, "post" may be too strong of a word), this is the first booth I’ve worked at in years. One of the first things I did when I arrived was check and see how we were going to get contacts via badge scanning. Not surprisingly, the conference organizers suggested a native app. Me being me – I immediately thought of how the app’s features could be accomplished via the web. There’s nothing wrong with the... more →
Posted in: JavaScript

How to Migrate from Lunr to Algolia – a Technical Guide

Search is an incredibly important aspect of any site hosting even a small amount ofcontent. How quickly your site can provide search results and how well your resultsmatch the user’s intent is critical. There are multiple search options available fordevelopers, and so sometimes in the pursuit of speed and relevance, a site will migratefrom one service to another. In this article, I’m going to present a use case for why a sitemay move from a self-hosted solution like Lunr to a server-based solution like Algolia. I want to stress that this is not meant to be an attack on Lunr, but more where it would beappropriate for a site and what the benefits... more →
Posted in: JavaScript
1 92 93 94 95 96 226