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

@d_nic14/resurgam-seo-next

v1.0.0

Published

Official Next.js App Router integration package for the Resurgam SEO WordPress plugin in headless architectures.

Readme

@resurgam/seo-next

Standalone, production-ready Next.js App Router integration package for the Resurgam SEO WordPress plugin in headless commerce and headless CMS architectures.

npm version license Next.js


Features

  • ⚡ Native Next.js Metadata API: Maps WordPress titles, descriptions, Open Graph, Twitter cards, and robots directives directly to Next.js App Router generateMetadata().
  • 🌐 Headless URL Rewriting: Automatically rewrites internal WordPress origins (https://cms.example.com) to your public storefront domain (https://www.example.com).
  • 🧩 Server Component Structured Data: <ResurgamJSONLD /> Server Component renders valid Schema.org JSON-LD graphs with automatic XSS escape protection.
  • 🗺️ Dynamic Sitemaps: seo.generateSitemap() exports directly to Next.js app/sitemap.ts.
  • 🤖 Dynamic Robots: seo.generateRobots() exports directly to Next.js app/robots.ts.
  • 🚀 Granular Fetch Caching: Full Next.js ISR integration with revalidate and tag-based on-demand invalidation (tags: ['resurgam-seo', 'resurgam-post-123']).
  • 🛡️ Zero Credential Exposure: WordPress credentials remain private on your backend server.
  • 📦 Zero Extraneous Dependencies: Built on TypeScript and native Fetch with optional peer dependencies for next and react.
  • 🎯 No Fabricated Fallbacks: Exclusively renders actual SEO data configured in WordPress.

Installation

npm install @resurgam/seo-next

Configuration

Set environment variables in your .env.local:

WORDPRESS_API_URL=https://cms.example.com
NEXT_PUBLIC_SITE_URL=https://www.example.com
RESURGAM_SEO_API_KEY=your_optional_api_key

Create a client singleton in lib/seo.ts:

import { createResurgamSEO } from '@resurgam/seo-next';

export const seo = createResurgamSEO({
  wordpressUrl: process.env.WORDPRESS_API_URL!,
  siteUrl: process.env.NEXT_PUBLIC_SITE_URL!,
  apiKey: process.env.RESURGAM_SEO_API_KEY,
  defaultRevalidate: 3600,
  trailingSlash: false,
});

Usage

1. Page Metadata (app/[slug]/page.tsx)

import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import { seo } from '@/lib/seo';
import { ResurgamJSONLD } from '@resurgam/seo-next';

interface Props {
  params: { slug: string };
}

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  return seo.generateMetadata({ slug: params.slug });
}

export default async function Page({ params }: Props) {
  const seoData = await seo.getMetadata({ slug: params.slug });

  if (!seoData) {
    notFound();
  }

  return (
    <>
      <ResurgamJSONLD schema={seoData.schema} />
      <main>
        <h1>{seoData.title}</h1>
        <p>{seoData.description}</p>
      </main>
    </>
  );
}

2. Dynamic Sitemap (app/sitemap.ts)

import { seo } from '@/lib/seo';
import type { MetadataRoute } from 'next';

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  return seo.generateSitemap();
}

3. Dynamic Robots (app/robots.ts)

import { seo } from '@/lib/seo';
import type { MetadataRoute } from 'next';

export default function robots(): MetadataRoute.Robots {
  return seo.generateRobots();
}

Documentation


Publishing

To publish to npm:

npm run build
npm test
npm publish --access public

License

MIT © 2026 Resurgam Digital