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

tenstatic

v0.2.0

Published

Zero-config Static Site Generation plugin for TanStack Start

Readme

tenstatic

tenstatic is a zero-config Static Site Generation (SSG) plugin designed specifically for TanStack Start. It radically simplifies creating content sites by automatically generating route handlers for your MDX files, while also giving you full control over standard React routes.

Features

  • 🪄 Auto-Generated Routes: Just create a .mdx file, and tenstatic automatically generates the corresponding type-safe .tsx route file for you.
  • ⚛️ "use static" Directive: Turn any standard React route into a static page with a single line of code.
  • 🧠 Automatic SEO: Frontmatter fields like title, description, and image are automatically injected into your page's <head> metadata.
  • 📝 MDX Power: Full support for mixing React components inside Markdown.
  • Development SSR: Complete HTML rendering in development mode (View Source works!).
  • 🚀 Zero Boilerplate: No need to manually create route files or configure head logic for every content page.

Installation

npm install tenstatic

Setup

Add the plugin to your app.config.ts (or vite.config.ts):

// app.config.ts
import { defineConfig } from '@tanstack/start/config'
import tenstatic from 'tenstatic'

export default defineConfig({
  plugins: [tenstatic()],
})

Usage

1. MDX Routes (The "Just Write Markdown" Workflow)

Create a file at src/routes/about.mdx. tenstatic will automatically generate src/routes/about.tsx for you.

---
title: My Awesome Post
description: This description will effectively become the <meta name="description"> content.
---

# Hello World

This content is automatically wrapped in a route with the correct title and meta tags!

2. Standard React Routes ("use static")

You can turn ANY normal TanStack Router file into a pre-rendered static page just by adding "use static" at the top of the file.

// src/routes/hello.tsx
'use static' // <--- This magic line enables SSG for this route

import { createFileRoute } from '@tanstack/react-router'

export const Route = createFileRoute('/hello')({
  component: HelloComponent,
})

function HelloComponent() {
  return (
    <div>
      <h1>Hello World</h1>
      <p>This page will be statically generated at build time!</p>
    </div>
  )
}

Static vs Dynamic

  • MDX Files: Static by default. Opt-out with dynamic: true in frontmatter.
  • TSX/JSX Files: Dynamic by default. Opt-in with "use static" at the top.

Architecture

  • tenstatic (Plugin): Handles the build process, SSG generation, and auto-route creation.
  • tenstatic/runtime: Provides runtime utilities like DevIndicator and RenderingProvider which are auto-injected into your root layout during development.