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

rs-ssg

v1.3.0

Published

A modern React Static Site Generator that combines the power of React, Vite, Esbuild, and Tailwind CSS for building lightning-fast, SEO-optimized websites.

Readme

RS-SSG

A modern React Static Site Generator that combines the power of React, Vite, Esbuild, and Tailwind CSS for building lightning-fast, SEO-optimized websites.

npm version License: MIT

Features

  • ⚡ Blazing Fast - Leverage Vite's ultra-fast development server and optimized production builds
  • 🔍 SEO Optimized - Pre-rendered HTML makes your content immediately available to search engines
  • ⚙️ Zero Config - Works out of the box with sensible defaults
  • 🚀 Array-based Routing - Automatic route generation with lazy loading
  • 💅 CSS Support - Built-in support for Tailwind CSS, CSS modules, and Sass
  • 🖼️ Image Optimization - Automatic image optimization and lazy loading
  • 📱 Modern Stack - React + Vite + Tailwind CSS

Quick Start

Installation

Install RS-SSG globally:

# Using npm
npm install -g rs-ssg

# Using yarn
yarn global add rs-ssg

# Using pnpm
pnpm add -g rs-ssg

Create a New Project

rs-ssg init my-project
cd my-project

Start Development Server

# Using npm
npm run dev

# Using yarn
yarn dev

# Using pnpm
pnpm dev

# Or using global command
rs-ssg dev

Your site will be available at http://localhost:3000

Project Structure

my-project/
├── dist/                 # Generated static files
├── public/              # Static assets
├── src/
│   ├── components/      # Reusable React components
│   ├── pages/          # Page components
│   ├── App.jsx         # Main application component
│   ├── client.jsx      # Client-side hydration entry
│   ├── index.css       # Global styles
│   └── routes.js       # Route definitions
├── index.html          # HTML template
├── ssg.config.js       # RS-SSG configuration
└── package.json

Routing

RS-SSG uses an array-based routing system with automatic code splitting:

// src/routes.js
import { lazy } from "react";

const routes = [
    {
        path: '/',
        component: lazy(() => import('./pages/Home.jsx')),
        entry: "./src/pages/Home.jsx",
    },
    {
        path: '/about',
        component: lazy(() => import('./pages/About.jsx')),
        entry: "./src/pages/About.jsx",
    },
    {
        path: '/blogs/:slug',
        component: lazy(() => import('./pages/BlogPost.jsx')),
        entry: "./src/pages/BlogPost.jsx",
    },
];

export default routes;

Dynamic Routes

Create dynamic routes using parameter notation:

// Route configuration
{
    path: '/blogs/:slug',
    component: lazy(() => import('./pages/BlogPost.jsx')),
    entry: "./src/pages/BlogPost.jsx",
}
// src/pages/BlogPost.jsx
export default function BlogPost({ data }) {
    const slug = data?.id;
    
    return (
        <article>
            <h1>{data.title}</h1>
            <div dangerouslySetInnerHTML={{ __html: data.content }} />
        </article>
    );
}

// Generate static paths for all blog posts
export async function getStaticPaths() {
    const posts = await fetchAllPosts();
    
    return {
        paths: posts.map(post => ({
            params: { id: post.id }
        })),
        fallback: false
    };
}

// Fetch data for specific blog post
export async function getStaticProps({ params }) {
    const post = await fetchPostById(params.id);
    
    return {
        props: { post }
    };
}

SEO Optimization

RS-SSG includes a powerful SEO component for managing meta tags:

import { Seo } from "rs-ssg";

function MyPage() {
    return (
        <>
            <Seo>
                <title>My Page Title</title>
                <meta name="description" content="Page description" />
                <meta name="keywords" content="react, ssg, static site" />
                <meta property="og:title" content="My Page Title" />
                <meta property="og:description" content="Page description" />
                <meta property="og:image" content="/og-image.jpg" />
            </Seo>
            
            <div>
                {/* Your page content */}
            </div>
        </>
    );
}

Configuration

Configure RS-SSG using ssg.config.js:

// ssg.config.js
export default {
    outputDir: 'dist',
    port: 4173,
    devPort: 3000,
    siteName: 'My App',
    siteUrl: 'https://mysite.com',
    
    seo: {
        title: 'My Site',
        description: 'My awesome static site',
        keywords: 'react, ssg, static',
        author: 'Your Name',
        ogImage: '/og-image.jpg',
        themeColor: '#000000',
        
        icons: {
            favicon: '/favicon.ico',
            appleTouchIcon: '/apple-touch-icon.png',
        }
    }
};

Build & Deploy

Build for Production

npm run build

Preview Built Site

npm run preview
# or
rs-ssg preview

Deploy

The built files in the dist directory can be deployed to any static hosting service:

  • Vercel: vercel --prod
  • Netlify: Drag and drop dist folder
  • GitHub Pages: Push dist contents to gh-pages branch
  • Firebase: firebase deploy

Examples

Basic Page Component

// src/pages/About.jsx
import React from 'react';
import { Seo } from 'rs-ssg';

function About() {
    return (
        <div className="container mx-auto px-4 py-8">
            <Seo>
                <title>About Us - My Site</title>
                <meta name="description" content="Learn more about our company." />
            </Seo>
            <h1 className="text-4xl font-bold mb-4">About Us</h1>
            <p className="text-gray-600">Learn more about our company.</p>
        </div>
    );
}

export default About;

Navigation Component

// src/components/Navigation.jsx
import React from 'react';

const Navigation = () => {
    const navItems = [
        { href: '/', label: 'Home' },
        { href: '/about', label: 'About' },
        { href: '/blog', label: 'Blog' },
    ];

    return (
        <nav className="flex space-x-6">
            {navItems.map((item) => (
                <a
                    key={item.href}
                    href={item.href}
                    className="text-gray-700 hover:text-blue-600 transition-colors"
                >
                    {item.label}
                </a>
            ))}
        </nav>
    );
};

export default Navigation;

Links

Requirements

  • Node.js 20+

  • npm, yarn, or pnpm


Built with ❤️ using React, Vite, Esbuild, and Tailwind CSS