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

@gosalesdeal/blog

v0.2.0

Published

Render GoEnterprise blog content (list + post) straight from the BlogPosts API. Server-component friendly, zero UI dependencies.

Downloads

390

Readme

@gosalesdeal/blog

Render the GoEnterprise blog (list + post detail) in any React 18+ / Next.js App Router app, straight from the BlogPosts API. Server-component friendly, with a typed data client and zero UI dependencies.

Install

npm install @gosalesdeal/blog

react (and react-dom) are peer dependencies.

Configure

Components read config from props, then configureBlog(...) defaults, then env vars (BLOG_API_URL / NEXT_PUBLIC_BLOG_API_URL, BLOG_TENANT_ID / NEXT_PUBLIC_BLOG_TENANT_ID).

// e.g. instrumentation.ts or a server entry
import { configureBlog } from '@gosalesdeal/blog';

configureBlog({
  apiBaseUrl: process.env.BLOG_API_URL!, // base of the BlogPosts API
  tenantId: process.env.BLOG_TENANT_ID!, // sent as the X-Tenant header
});

Next.js App Router usage

// app/blog/page.tsx
import { BlogList, generateBlogListMetadata } from '@gosalesdeal/blog';
import '@gosalesdeal/blog/styles.css';

export const metadata = generateBlogListMetadata({ siteName: 'Acme' });

export default async function Page({ searchParams }: { searchParams: Promise<{ page?: string }> }) {
  const { page } = await searchParams;
  return <BlogList page={Number(page) || 1} basePath="/blog" />;
}
// app/blog/[slug]/page.tsx
import { notFound } from 'next/navigation';
import { BlogPost, getPostBySlug, getPublishedSlugs, generateBlogPostMetadata } from '@gosalesdeal/blog';
import '@gosalesdeal/blog/styles.css';

export async function generateStaticParams() {
  const slugs = await getPublishedSlugs();
  return slugs.map((slug) => ({ slug }));
}

export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  const post = await getPostBySlug(slug);
  if (!post) return {};
  return generateBlogPostMetadata(post, { siteUrl: 'https://acme.com', siteName: 'Acme' });
}

export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  return (
    <BlogPost
      slug={slug}
      seo={{ siteUrl: 'https://acme.com', siteName: 'Acme' }}
      fallback={notFound()}
    />
  );
}

API

Components

  • <BlogList page limit category basePath apiBaseUrl tenantId locale emptyState /> — paginated listing of cards.
  • <BlogPost slug seo trackView renderJsonLd locale fallback /> — full post with header, block body, and JSON-LD.
  • <BlockRenderer block /> / renderBlocks(blocks) — render raw ContentBlocks yourself.

Data client

createBlogClient({ apiBaseUrl, tenantId }){ getPostBySlug, getPosts, getPostsByCategory, getPublishedSlugs, getCategories, incrementView }. The same functions are exported standalone (each accepts an optional trailing config).

SEO

generateBlogPostMetadata, generateBlogListMetadata, generateBlogPostJsonLd, generateBlogBreadcrumbJsonLd — framework-neutral plain objects (assignable to Next's Metadata).

Styling

The bundled @gosalesdeal/blog/styles.css is optional and namespaced under .ggblog-*. Theme it by overriding the CSS variables on .ggblog-post / .ggblog-list (--ggblog-accent, --ggblog-fg, --ggblog-border, …), or skip it and bring your own.

Scope & notes

  • Renders block-based posts (content_blocks). All 17 block types are supported; accordion and tabs are interactive ("use client"), everything else is a server component.
  • Block HTML (text/embed/accordion/tab content) is treated as trusted CMS output. If your authors are untrusted, sanitize upstream.
  • The page-builder (landingPage.schema_json) rendering path is out of scope.

License

MIT