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

@rmdes/indiekit-endpoint-posts

v1.0.0

Published

Post management endpoint for Indiekit with syndicate form fix. View posts published by your Micropub endpoint and publish new posts to it.

Readme

@rmdes/indiekit-endpoint-posts

Post management endpoint for Indiekit. View, create, edit, and delete posts published through your Micropub endpoint.

Fork Notice

This is a fork of @indiekit/endpoint-posts with three critical bug fixes:

1. Syndication Form Bug Fix (CRITICAL)

The syndicate button was using data.url for the source_url value, but data is never defined in the template context. The controller passes properties, not data. This caused syndication to fail or syndicate the wrong post.

Fixed: Changed value: data.url to value: properties.url in includes/@indiekit-endpoint-posts-syndicate.njk

PR submitted upstream: https://github.com/getindiekit/indiekit/pull/828

2. MongoDB Query Performance Fix

The original getPostProperties() function queried the Micropub endpoint without any filter (q=source), fetching only the first 40 posts and searching through them client-side. This made posts older than 40 items completely inaccessible, causing 404 errors when trying to view or edit them.

Fixed: Now queries the MongoDB database directly by _id, which is efficient and works regardless of how many posts exist.

3. BSON Version Conflict Fix

Using ObjectId from the MongoDB driver caused BSON version conflicts between Indiekit's MongoDB version and plugin dependencies, resulting in runtime errors.

Fixed: Use aggregation pipeline with $toString to compare _id as string, avoiding the need to import ObjectId.

Installation

npm install @rmdes/indiekit-endpoint-posts

Using npm Overrides (Recommended)

Add to your package.json:

{
  "overrides": {
    "@indiekit/endpoint-posts": "npm:@rmdes/indiekit-endpoint-posts@^1.0.0-beta.25"
  }
}

This replaces the upstream package with this fork automatically, without changing your plugin configuration.

Usage

import PostsEndpoint from "@rmdes/indiekit-endpoint-posts";

export default {
  plugins: [
    new PostsEndpoint({
      mountPath: "/posts",  // Optional, default: "/posts"
    }),
  ],
};

Features

  • List posts with cursor-based pagination
  • View post details with status badges and syndication info
  • Create posts with dynamic forms based on post type
  • Edit posts with all properties and advanced options
  • Delete/undelete posts with confirmation
  • Syndicate posts to configured targets via button
  • Multi-language support (14 languages)
  • Draft mode for unpublished posts
  • Media uploads (audio, photo, video)
  • Scheduled publishing with timezone support
  • Multi-channel publishing (if configured)
  • Geographic coordinates (ISO 6709 format)

Options

| Option | Type | Description | | :---------- | :------- | :-------------------------------------------------------------- | | mountPath | string | Path to management interface. Optional, defaults to /posts. |

Differences from Upstream

  1. Syndicate form uses correct variable (properties.url instead of data.url)
  2. Posts are queried directly from MongoDB (not via Micropub endpoint)
  3. No BSON version dependency (uses aggregation with string comparison)

Related Plugins

  • @rmdes/indiekit-endpoint-micropub: Posts are created/updated/deleted via Micropub
  • @rmdes/indiekit-endpoint-syndicate: Receives syndicate button POSTs
  • Post type plugins: Define fields and validation for each post type (note, article, etc.)

Documentation

See CLAUDE.md for comprehensive technical reference, including:

  • Complete architecture overview
  • File-by-file documentation
  • Data flow diagrams
  • Configuration examples
  • Inter-plugin relationships
  • Known gotchas and workarounds

License

MIT - Original work by Paul Robert Lloyd, bug fixes by Ricardo Mendes.