Using PDF Content with Google Gemini

Back in February Google announced Gemini 1.5, their latest, most powerful language model, and while access has been open via AI Studio, API access has only been available in the past few days. I thought I’d try out the new model and specifically make use of the larger context window to do prompts on PDF documents. I discussed something similar earlier this year(("Using AI and PDF Services to Automate Document Summaries")[https://www.raymondcamden.com/2024/01/08/using-ai-and-pdf-services-to-automate-document-summaries]) which made use of Diffbot, so I thought it would be interesting to build a similar experience with the Gemini API. At a high level, it’s not too difficult: Begin... more →
Posted in: JavaScript

Using Generative AI as Your Content Assistant

Last week I had the honor of presenting one at TheJam.dev. This was my first presentation on generative AI and I got to share what I thought was an interesting use case – helping with the writing process. Now to be clear, I don’t mean using GenAI to write blog posts, that would be a horrible idea. (IMO!) Instead, I looked at how it could help with some of the process. Let me back up a bit and give some background. I’ve been a fan of John Birmingham for many years now. He’s an author who writes in the military/sci-fi/etc genre and has some pretty fascinating ideas. I initially discovered him via his "Axis of Time" trilogy which dealt with the idea of a modern... more →
Posted in: JavaScript

Detect the Content Type in the Clipboard

A user’s clipboard is a “catch all” between the operating system and the apps employed on it. When you use a web browser, you can highlight text or right-click an image and select “Copy Image”. That made me think about how developers can detect what is in the clipboard. You can retrieve the contents of the user’s clipboard using the navigator.clipboard API. This API requires user permission as the clipboard could contain sensitive data. You can employ the following JavaScript to get permission to use the clipboard API: const result = await navigator.permissions.query({name: "clipboard-write"}); if (result.state === "granted" || result.state === "prompt") {... more →
Posted in: JavaScript

Related Content by Day of Year in Eleventy

Ok, chalk this up to something that is probably useful to one out of ten of my readers, but the idea’s been bouncing around my brain for a few months now and I finally took the time to build it out. Imagine a content site that’s been around for a while, for example, this blog (twenty years next February). It may be interesting to tie articles to content written in the past, specifically, on the same day in previous years. This requires a site with years of content and enough content such that there would actually be a decent chance of that happening, but I could see newspaper sites or other news organizations being able to meet that criteria. For... more →
Posted in: JavaScript

Thoughts on the Jamstack and Content Metrics

Please forgive the (possibly) unclear title! Let me try to explain what I mean and you can then decide on whether or not you keep reading. As I was walking my dog yesterday (typically the best way to get ideas for my blog), I started thinking about the ways I keep tabs on my blog, specifically my content. This involves both the nature of my content as well as things like my publishing cadence. I’ve developed tools over time to help me check the status of this and I thought it might make sense to share some thoughts in this area with others. While the technical aspects of this post will use Eleventy, it’s really meant to be more generic for the... more →
Posted in: JavaScript

Including RSS Content in your Eleventy Site – Part 2

A few weeks ago I blogged about how to include RSS data in your Eleventy site: Including RSS Content in your Eleventy Site. Last week, I had the honor of giving my first presentation to the Eleventy Meetup and for that talk, I took my earlier code and iterated on it a bit to show more examples and add a bit more usefulness to the tip. If you want to watch that presentation, you can do so below (and see @jeromecoupe excellent tal too!). I thought I’d also share the updates here for folks who prefer reading over wathing a video. Raymond Camden… more →
Posted in: JavaScript

Including RSS Content in your Eleventy Site

Before I begin, this post is not about generating an RSS page with Eleventy. If you need to do that, check the plugin that makes it (mostly) trivial to do. This post is about consuming RSS for your Eleventy site. I’ve got a page here (About) where I track my external articles and books. At work, we use Medium to host our blog and I’ve been publishing there as part of my job. I was curious how I could get that content on my About page as well. Raymond Camden… more →
Posted in: JavaScript