Page Level URL Fetching with Eleventy

Page Level URL Fetching with Eleventy

Let me begin by being very clear. This is not a very good idea. I just got back from a much delayed honeymoon with my wife (apparently right before the mask mandates all come crashing back) and haven't written code for a while so perhaps I was a bit desperate to create something useless. That being said, working on this did let me kick the tires a bit on a few Eleventy things and that's always a good idea.

read more

Graphing Movie Rating Distribution For No Good Reason

Graphing Movie Rating Distribution For No Good Reason

I'm on vacation this week (one of the benefits of working for Adobe are two shutdowns during the year) and haven't really had a chance to write a lick of code (been busy grinding levels in Black Ops multiplayer), but yesterday I found myself working on a small demo for no real important reason outside of just wanting to see what would happen. For folks outside of America, the MPA (formally the MPAA) is the Motion Picture Association. They're responsible for assigning ratings to movies released in America. There's a lot to be said about these ratings, and if you haven't seen it, I highly recommend "This Film is Not Yet Rated" as it details some of the hypocritical ratings giving out by the association.

read more

Using Pipedream to Proxy Other APIs

Using Pipedream to Proxy Other APIs

One of the first things that intrigued me about serverless, and honestly it's not really that novel, is the ability to build proxies to other APIs. So for example, imagine a cool API that requires authentication of some sort to use, like an API key. If you use this in client-side JavaScript, anyone can look at your code and get your key. Better services let you lock a key to a domain, but if you don't have that option, then a simple use of serverless is to simply give you an endpoint that makes the call to the API with your key.

read more

Dynamic Short URLs with Eleventy

Dynamic Short URLs with Eleventy

One feature that some CMS systems have is the ability to handle short URLs that map to pages on the site. I'm not talking about services like TinyURL, but internal systems specific to a site. So for example, Adobe.com supports "go" URLs where you can go to this url: https://adobe.com/go/coldfusion and it maps to https://www.adobe.com/products/coldfusion-family.html. I decided to see if I could implement this with Eleventy. My demo is using Netlify but in theory could work anywhere that lets you specify redirects via a file.

read more

Using PDFs with the Jamstack - Adding Search with Text Extraction

Using PDFs with the Jamstack - Adding Search with Text Extraction

A few weeks ago I shared a couple of blog posts describing how to add PDFs to your Jamstack site. The first talked about the using the Adobe PDF Embed API to give you more control over viewing PDFs in an Eleventy site. The second example took it a bit further by using Adobe's PDF Services API to generate thumbnails of the PDFs when the Eleventy site was generated. Since I wrote those posts, we (oh, I did tell you I work for Adobe, right?) released a new service, the PDF Extraction API.

read more

Quick Tip - Using Pipedream to Monitor my Algolia Index

Quick Tip - Using Pipedream to Monitor my Algolia Index

Last year (sometimes that surprises me, time has been so weird with COVID) I wrote about using Algolia with Eleventy, and specifically how I added it here (Adding Algolia Search to Eleventy and Netlify - Part Two). A few weeks ago I discovered an issue with my implementation that caused the index on Algolia's side to be empty. I fixed that issue and updated my blog post with a detailed description on top. Everything was perfect.

read more

Using Lunr with Eleventy via Netlify Serverless Functions - Part Two

Using Lunr with Eleventy via Netlify Serverless Functions - Part Two

A few days ago I posted ("Using Lunr with Eleventy via Netlify Serverless Functions") about how you could use Lunr via serverless functions. The thinking was that it would help make Lunr more useful for large content sites. In a "typical" Lunr example, you load your data and client all in the browser, which means indexing a lot of content wouldn't be very effecient. That post demonstrated that you absolutely could run Lunr in a serverless function, but it bothered me that the index was being recreated on every search.

read more

Using Lunr with Eleventy via Netlify Serverless Functions

Using Lunr with Eleventy via Netlify Serverless Functions

Lunr is a great client-side search engine that works really well with the Jamstack. (Be sure to see my earlier posts on the topic: Adding Search to your Eleventy Static Site with Lunr, Integrating Navigation Search with Lunr and Eleventy, and Using Pre-Built Lunr Indexes with Eleventy) While I like the simplicity of Lunr, it requires that your searched data be loaded on the client-side. This makes it a bad fit for large sites. For example, my blog has over six thousand posts so I went Algolia instead. However, I was doing some thinking recently and realized that Lunr can also be used on the server as well. I decided to take a stab at trying this out and here's what I came up with.

read more