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

@peristyle/emdash-plugin-instagram-to-recipe

v0.1.6

Published

Import Instagram post URLs as recipe drafts in the EmDash admin

Readme

@peristyle/emdash-plugin-instagram-to-recipe

Import public Instagram posts into your EmDash site as draft recipe posts — one at a time by URL, or in bulk by scanning a profile.

For a post URL such as instagram.com/p/DXkhLGbEcOY the plugin will:

  1. Fetch the post and read the caption (profile API first, HTML Open Graph metadata as fallback)
  2. Parse ingredients (What you'll need / Ingredients:) and numbered steps — including captions Instagram has collapsed onto one line
  3. Download the post feed image (the embedded display_url, not the OG share-card with a play button) and store its dimensions for responsive images
  4. Create a draft post in your configured collection

Install

pnpm add @peristyle/emdash-plugin-instagram-to-recipe
# or: npm install / yarn add

Register in astro.config.mjs:

import { instagramToRecipePlugin } from "@peristyle/emdash-plugin-instagram-to-recipe";

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

Rebuild or restart the dev server after adding the plugin.

Admin usage

Open Plugins → Import from Instagram in the EmDash admin. The page has three sections:

Single post

  1. Paste an Instagram post URL and click Convert to recipe
  2. Review the parsed preview (title, ingredients, steps, featured image)
  3. Click Create draft post
  4. Edit the draft under Posts (slug, categories, times, publish)

Bulk import from a profile

  1. Enter a public Instagram handle and click Scan profile
  2. The profile grid is fetched in a single request and every caption that parses as a recipe is listed, sorted by likes
  3. Check the recipes you want (already-imported posts are unchecked and labeled) and click Create selected drafts

Bulk import is idempotent — posts already imported are skipped. Deleting an imported draft clears the bookkeeping, so the post can be imported again later.

Settings

  • Content collection — where drafts are created (default: posts)
  • Instagram handle (optional) — pre-fills the bulk scan and lets single-post imports go straight to the profile API; when empty, the post owner's handle is detected automatically

Standard-format EmDash plugins are configured here (settings are stored in the plugin's KV store), not via constructor options.

Capabilities

| Capability | Purpose | | ----------------- | ----------------------------------- | | network:request | Fetch Instagram HTML and CDN images | | content:read | Check for prior imports | | content:write | Create draft posts | | media:write | Upload featured images |

Allowed hosts: www.instagram.com, *.cdninstagram.com, *.fbcdn.net.

API routes

For scripting or a custom admin UI:

| Route | Method | Body | | -------------- | ------ | ------------------------------------- | | parse | POST | { "url": "https://..." } | | create-draft | POST | { "shortcode": "DXkhLGbEcOY" } | | bulk-scan | POST | { "handle": "somefoodblogger" } | | bulk-create | POST | { "shortcodes": ["DXkhLGbEcOY"] } |

Base path: /_emdash/api/plugins/peristyle-instagram-to-recipe/<route>

Limitations

  • Public posts only — private or login-walled posts cannot be read
  • Caption format — works best with a “What you'll need” / “Ingredients:” section plus numbered steps
  • Bulk scan depth — one profile request returns roughly the 12 most recent posts; older posts can still be imported individually by URL
  • Instagram rate limits — repeated fetches may hit HTTP 429; responses are cached for 24 hours and stale cache is used as a fallback, but you may need to wait and retry
  • No video frames — video posts use the feed thumbnail, not in-video text

Building from source

The TypeScript source ships in the package under src/. From an unpacked copy:

pnpm install
pnpm build
pnpm typecheck

The development repository is not currently public.

License

MIT