npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@druid-sh/sdk

v1.1.4

Published

Druid.sh SDK for rendering blog content with SSG support

Readme

@druid-sh/sdk

A dead-simple SDK for adding a fully-featured blog to your Next.js 15 app. No markdown wrangling, no separate domains—just install, configure, and ship.

Why Druid?

  • Your Domain, Your SEO: All blog traffic goes to yourapp.com/blog, building your authority
  • 5-Minute Setup: Seriously. Install, configure, deploy. Done.
  • Native Integration: Built specifically for Next.js 15 App Router with TypeScript
  • Beautiful by Default: Works seamlessly with shadcn/ui and Tailwind CSS
  • Zero Maintenance: No CMS to host, no security patches, no database migrations

Prerequisites

Your Next.js project needs:

  • Next.js ^15.5.0 with App Router and TypeScript
  • React ^19.1.1
  • Tailwind CSS ^4.1.12
  • shadcn/ui components

Installation

npm install @druid-sh/sdk
# or
pnpm install @druid-sh/sdk
# or
yarn add @druid-sh/sdk

Quick Start

For complete setup instructions, visit our Quick Start Guide.

1. Configure Styles

Add Druid styles to your globals.css:

@import "../../node_modules/@druid-sh/sdk/dist";
@import "highlight.js/styles/github.css";

.dark {
  @import "highlight.js/styles/github-dark.css";
}

2. Initialize the Client

Create a client instance with your API key:

import { DruidClient } from "@druid-sh/sdk";

export const druid = new DruidClient({
  apiKey: process.env.NEXT_PUBLIC_DRUID_API_KEY,
});

3. Create Your Routes

The SDK provides everything you need to create:

  • Blog listing pages (/blog)
  • Individual post pages (/blog/post/[slug])
  • Tag filtering (/blog/tag/[tag])
  • Pagination for all views

Each route leverages Next.js 15's async params, static generation, and ISR for optimal performance.

Core Features

SEO Built-In

The SDK includes generateBlogPostMetadata() and generateBlogListMetadata() helpers that handle Open Graph tags, Twitter cards, and structured data automatically.

Syntax Highlighting

Code blocks work out of the box with Highlight.js integration. Just import your preferred theme in your CSS.

Type-Safe API

Built with TypeScript from the ground up. Full autocomplete support and type checking for all SDK methods.

Static Generation

Uses generateStaticParams() for build-time generation of all blog routes. ISR with 60-second revalidation keeps content fresh without rebuilding.

API Reference

DruidClient

const druid = new DruidClient({ apiKey: string });

Methods

  • getPosts(page: number) - Get paginated blog posts
  • getPost(slug: string) - Get a single post by slug
  • getPostsByTag(tag: string, page: number) - Get posts filtered by tag
  • getSlugs() - Get all post slugs for static generation
  • getTags() - Get all available tags
  • getPages() - Get all page numbers for pagination
  • getTagPages() - Get all tag/page combinations

Components

  • <BlogList data={data} /> - Renders paginated post listings
  • <BlogPost data={data} /> - Renders individual post content

Utilities

  • generateBlogPostMetadata(post, title) - Generate SEO metadata for posts
  • generateBlogListMetadata(title) - Generate SEO metadata for listings

Configuration

Set your API key as an environment variable:

NEXT_PUBLIC_DRUID_API_KEY=your_api_key_here

Get your API key from the Druid Dashboard.

Examples

Check out our demo repository for a complete working example.

Support

License

MIT


Made with ❤️ in 🇱🇹