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

eleventy-plugin-activity-pub

v0.1.1

Published

Eleventy plugin for generating ActivityPub actor files

Readme

Eleventy-Plugin-Activity-Pub

Generate a simple, discoverable ActivityPub user for your Eleventy-powered website.

Usage

const activityPubPlugin = require('eleventy-plugin-activity-pub');

module.exports = function(eleventyConfig) {
	eleventyConfig.addPlugin(activityPubPlugin, {
		domain: 'my-domain.com',
		username: 'user',
		displayName: 'Lewis Dale',
		summary: 'This is my Eleventy website, except now its also discoverable on the Fediverse!',
	});
}

This will generate two files: a basic Actor file at my-domain/user.json, and a webfinger file at my-domain/.well-known/webfinger, both of which are can be used to discover your website as a user on the Fediverse - e.g. you can tag your blog in comments as @{user}@{domain}

Aliasing an existing profile

If all you want to do is create a redirect to an existing profile (so searching user@yourdomain retrieves another profile), you can use the alias option:

eleventyConfig.addPlugin(activityPubPlugin, {
  username: 'lewis',
  domain: 'lewisdale.dev',
  alias: {
    username: 'lewisdaleuk',
    domain: 'dapchat.online',
  }
});

Generating an Outbox file

Optionally, you can generate an Outbox file by including outbox: true, and the key of the collection that should appear in the outbox:

const activityPubPlugin = require('eleventy-plugin-activity-pub');

module.exports = function(eleventyConfig) {
	eleventyConfig.addPlugin(activityPubPlugin, {
		domain: 'my-domain.com',
		username: 'user',
		displayName: 'Lewis Dale',
		summary: 'This is my Eleventy website, except now its also discoverable on the Fediverse!',
		outbox: true,
		outboxCollection: 'posts'
	});
}

This will create two files:

  1. /outbox, which contains the root outbox declaration
  2. /outbox_page, which contains all of the collection items in descending date.

Internally, these files are generated by creating, and then quietly deleting, two template files at <source dir>/outbox/outbox.njk and <source dir>/outbox/outbox_page.njk. This is a hacky solution until I can find a cleaner way of doing this while still using user-defined collections.

Read more about the ActivityPub Outbox in the spec.

Deployment configuration

It might be necessary to manually set the content-type headers for the files we generate to ensure that they're parsed properly. Here are examples for Netlify and Vercel.

Netlify

Add this to your netlify.toml, replacing <username> with the username you define for the plugin:

[[headers]]
  for = "/<username>"
  [headers.values]
    Content-Type = "application/activity+json"

[[headers]]
  for = "/.well-known/webfinger"
  [headers.values]
    Content-Type = "application/jrd+json"

Vercel

Add this to your vercel.json, replacing <username> with the username you define for the plugin:

{
  "headers": [
    {
      "source": "/.well-known/webfinger",
      "headers": [
        {
          "key": "Content-Type",
          "value": "application/jrd+json; charset=utf-8"
        }
      ]
    },
    {
      "source": "/<username>",
      "headers": [
        {
          "key": "Content-Type",
          "value": "application/activity+json; charset=utf-8"
        }
      ]
    }
  ]
}