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

sidebar-emoticon-plugin

v1.0.3

Published

Docusaurus plugin that adds emoticons to the sidebar.

Readme

Docusaurus Sidebar Emoticon Plugin

Adds sidebar emoticons based on document tags in a Docusaurus site.

Features

  • Maps doc tags to emoticons for sidebar labels.
  • Propagates emoticons to parent folders and category paths.
  • Emits a JSON map to the Docusaurus static folder for runtime use.
  • Warns about docs or folders without tags.

Install

npm install sidebar-emoticon-plugin

Setup

  1. Add the plugin to your Docusaurus config with your tag-to-emoticon mappings:
// docusaurus.config.js
export default {
  // ...
  plugins: [
    [
      'sidebar-emoticon-plugin',
      {
        tagEmojis: {
          'guide': '📖',
          'tutorial': '🎓',
          'code-example': '💻',
          // Add your custom tag-to-emoticon mappings
        },
        // Optional: exclude certain folders from getting emoticons
        rootFoldersNoEmoji: ['advanced-features', 'setup'],
      },
    ],
  ],
};
  1. Add a setup script to your package.json:
{
  "scripts": {
    "sidebar-emoticon-setup": "sidebar-emoticon-plugin"
  }
}
  1. Run the setup script to copy the theme override:
npm run sidebar-emoticon-setup

This copies theme/Root.tsx into your site at src/theme/Root.tsx.

Usage

Add tags to your docs front matter. The first tag is used to select an emoticon.

---
title: Example
tags:
  - structure
  - guide
  - code-example
---

Configuration

Pass configuration options to the plugin in your Docusaurus config:

  • tagEmojis: Object mapping tag names to emoticons (required).
  • rootFoldersNoEmoji: Array of folder names that should not receive emoticons (optional).

How It Works

  • The plugin scans docs/ during build and creates static/sidebar-emoticons.json.
  • The Root theme component loads that JSON and annotates sidebar links.

Testing locally (developer)

Follow one of these approaches to test the plugin with a local Docusaurus site.

  1. Quick link (recommended for iterative development)
# In the plugin repo
npm install
npm link

# In your Docusaurus site repo
npm link sidebar-emoticon-plugin
npm install
npm run start # or `yarn start`

Then add the plugin to your site's docusaurus.config.js (see Setup above) and verify that static/sidebar-emoticons.json is generated and the sidebar shows emoticons.

  1. Pack and install (closer to a release install)
# In the plugin repo
npm install
npm pack

# In your Docusaurus site repo
npm install /path/to/sidebar-emoticon-plugin-<version>.tgz
npm run start
  1. Run the setup script to copy the theme override

After installing the plugin into your site, you can run the setup script that copies theme/Root.tsx into your site. Add the script to your site's package.json as described in Setup, then run:

npm run sidebar-emoticon-setup
# or, if you installed the plugin globally with `npm link`, run:
npx sidebar-emoticon-plugin

Verification

  • Confirm static/sidebar-emoticons.json exists in the built site or in build when running locally.
  • Check the browser UI for emoticons appearing next to sidebar items.
  • Inspect browser console for plugin warnings about missing tags.

License

GPL-3.0-only