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

gatsby-plugin-stork

v0.3.3

Published

A Gatsby plugin for generating Stork search indexes.

Readme

Build npm version npm

gatsby-plugin-stork

This is a Gatsby plugin for generating a search engine using Stork. This plugin automatically generates a Stork search index from your site's content and includes it in your public directory. This plugin also automatically mounts the Stork script tag to the end of your HTML files.

Installation

To install, run npm i gatsby-plugin-stork. Once installed, add the plugin to your gatsby-config.js.

module.exports = {
    plugins: [
        "gatsby-plugin-stork",
    ]
}

You can also pass in additional options:

module.exports = {
    plugins: [
        {
          resolve: "gatsby-plugin-stork",
          options: {
            indexes: [
              {
                resolvers: {
                  Mdx: {
                    contents: node => node.rawBody,
                    url: node => node.fields.slug,
                    title: node => node.frontmatter.title
                  },
                },
                filename: "firstIndex.st"
              }
            ],
            theme: "dark"
          }
        }
    ]
}

The search bar can be mounted using the StorkInput component:

import React from 'react';
import { StorkInput } from 'gatsby-plugin-stork';

export const YourSearchComponent = () => {
  return (
    <StorkInput filename="firstIndex.st" placeholder="🔍" />
  );
}

Configuration Options

indexes

This is an array of objects where each represents a separate index file. This object should have the following keys:

resolvers

resolvers is an object of node types, which in turn is a series of key-value pairs where each key is the name of a configuration option and the value is a function that takes in a node and returns the value for that option. For example, a common node type for blog posts is MarkdownRemark, and at a minimum, you must pass at least a url, title, and either a path or contents. Such a set of resolvers would look like this:

{
  resolvers: {
    MarkdownRemark: {
      contents: node => node.rawBody,
      url: node => node.fields.slug,
      title: node => node.frontmatter.title
    }
  },
  filename: "example.st",
}

filename

The name of the resulting index file. By default, it is called stork.st, but you may wish to call it something else.

theme

The name of the Stork theme to install. Setting this option to null will not install a theme.

Project Status

Note that this project is still pre-1.0, and minor version bumps may contain breaking changes. If you are still using this pre-1.0, I recommend pinning to a minor version.

Running During Automated Builds

If you use an automated build system as part of your site's deploy system, you'll need to have Stork installed as part of the build process for this plugin to run successfully. The docs have some instructions on setting Stork up with Netlify, but similar steps can be applied to any static site build runner.

This plugin will by default run the stork executable, but you can also supply a path to the executable with the GATSBY_STORK_EXECUTABLE_PATH environment variable to run Stork from a different installation.