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

@masonjames/emdash-author-box

v0.1.0

Published

Production-ready author box plugin for EmDash CMS with a Portable Text block and reusable Astro component.

Readme

@masonjames/emdash-author-box

A polished author box plugin for EmDash CMS that turns existing EmDash bylines into a reusable presentation layer.

It ships with:

  • an authorBox Portable Text block for editors
  • a reusable AuthorBox.astro component for theme developers
  • sitewide settings for avatar, bio, website link, layout, and contributor order defaults
  • graceful handling for missing bios, avatars, websites, and empty bylines

Compatibility

| Mode | Supported | | --- | --- | | Trusted install via plugins: [] | Yes | | Portable Text block rendering | Yes | | Direct theme component import | Yes | | Sandboxed install via sandboxed: [] | No | | EmDash marketplace bundle / emdash plugin publish | No |

Why not marketplace publishing yet?

This plugin depends on componentsEntry and admin.portableTextBlocks, which currently require EmDash native/trusted mode. Current EmDash marketplace bundling rejects Portable Text block plugins, so the supported release path today is npm publish + trusted install in astro.config.mjs.

Installation

npm install @masonjames/emdash-author-box

Then register it in your site:

// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { authorBoxPlugin } from "@masonjames/emdash-author-box";

export default defineConfig({
	integrations: [
		emdash({
			plugins: [authorBoxPlugin()],
		}),
	],
});

What the plugin adds

Admin settings

The plugin creates an Author Box settings page with defaults for:

  • showing contributor avatars
  • showing contributor bios
  • showing contributor website links
  • choosing compact vs expanded multi-contributor layout
  • choosing primary-first vs byline-order sorting

Editor block

Editors can insert an authorBox Portable Text block and optionally override:

  • heading text
  • layout
  • bio visibility
  • website visibility
  • all contributors vs primary contributor only

Direct theme component

Theme authors can import the same presentation layer directly:

---
import { AuthorBox } from "@masonjames/emdash-author-box/astro";
---

<AuthorBox
	heading="Meet the contributors"
	content={post.data}
	contributors={post.data.bylines}
/>

Portable Text usage

For the authorBox block to resolve the current entry’s bylines, pass the current content context through your Portable Text renderer:

---
import { PortableText } from "emdash/ui";
---

<PortableText
	value={post.data.content}
	content={post.data}
	contributors={post.data.bylines}
/>

The plugin auto-registers its authorBox component through componentsEntry, so you do not need to wire the block manually.

Data contract

The component is designed around EmDash’s hydrated byline shape:

type ContentBylineCredit = {
	byline: {
		id: string;
		displayName: string;
		bio: string | null;
		avatarMediaId: string | null;
		websiteUrl: string | null;
	};
	sortOrder: number;
	roleLabel: string | null;
};

If no usable contributors are available, the component renders nothing.

Design behavior

  • one contributor → single spotlight card
  • multiple contributors + expanded layout → equal-weight contributor cards
  • multiple contributors + compact layout → tighter contributor list
  • no avatar media → initials fallback
  • invalid website URLs → omitted safely
  • duplicate contributor entries → deduplicated

Development

npm install
npm run check

Publishing

This package is meant to be published to npm:

npm publish --access public

Do not use emdash plugin publish for this package today. EmDash’s current marketplace bundler rejects native Portable Text block plugins.