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

satteri-link-mention

v0.2.1

Published

Build-time inline link mention for Sätteri Markdown.

Readme

💬 satteri-link-mention

A Sätteri HAST plugin that turns an empty Markdown link into an inline mention at build time.

[!WARNING] This package is experimental. Its API, generated HTML, CSS class names, and behavior may change incompatibly between releases.

View live examples.

✨ Features

  • Uses an empty Markdown link as an explicit mention placeholder
  • Displays the favicon, site name, and title when available
  • Allows each part to be hidden or reordered
  • Caches metadata locally by default
  • Optionally caches favicons as public assets
  • Provides optional preset CSS without injecting styles

📦 Installation

pnpm add satteri-link-mention satteri

Node.js 22 or newer is required.

🚀 Sätteri setup

import { markdownToHtml } from "satteri";
import { satteriLinkMention } from "satteri-link-mention";

const result = await markdownToHtml("See [](https://example.com/article) for details.", {
  hastPlugins: [satteriLinkMention()],
});

Only an empty HTTP or HTTPS Markdown link is converted. Bare URLs and links with authored text stay unchanged.

🌌 Astro setup

Install the Astro processor and configure it in astro.config.mjs:

pnpm add @astrojs/markdown-satteri satteri satteri-link-mention
import { satteri } from "@astrojs/markdown-satteri";
import { defineConfig } from "astro/config";
import { satteriLinkMention } from "satteri-link-mention";

export default defineConfig({
  markdown: {
    processor: satteri({
      hastPlugins: [satteriLinkMention()],
    }),
  },
});

🎨 Styling

The plugin emits class names but does not inject CSS. Import the optional preset once from a shared Astro layout or another global stylesheet entry:

---
import "satteri-link-mention/preset.css";
---

You can omit the preset and define the styles yourself. The generated elements use these stable classes for the current release:

  • .satteri-link-mention
  • .satteri-link-mention__favicon
  • .satteri-link-mention__site-name
  • .satteri-link-mention__title

⚙️ Options

satteriLinkMention({
  mention: {
    favicon: true,
    siteName: true,
    title: true,
    order: ["favicon", "siteName", "title"],
  },
  metadataCache: {
    directory: ".cache/satteri-link-mention",
  },
  imageCache: false,
  openInNewTab: true,
});

| Option | Default | Description | | -------------------------- | ----------------------------- | ------------------------------------------------------------------- | | mention.favicon | true | Shows the resolved favicon when available. | | mention.siteName | true | Shows og:site_name or application-name when available. | | mention.title | true | Shows the resolved page title. | | mention.order | favicon, siteName, title | Sets the order of enabled parts. Duplicate values throw an error. | | metadataCache | {} | Metadata cache settings, or false to disable the cache. | | metadataCache.directory | .cache/satteri-link-mention | Directory for cached metadata files. | | metadataCache.maxAge | 30 days | Maximum age in milliseconds, or false to never expire. | | imageCache | false | Enables the filesystem image cache or accepts custom store options. | | imageCache.maxImageBytes | 5 MiB | Maximum download size for one cached favicon. | | openInNewTab | true | Adds target="_blank" and rel="noopener noreferrer". |

imageCache: true writes favicons to public/satteri-link-mention/ and renders them from /satteri-link-mention/.

Use the built-in store to change the filesystem location:

import { createFileSystemImageCacheStore, satteriLinkMention } from "satteri-link-mention";

satteriLinkMention({
  imageCache: {
    store: createFileSystemImageCacheStore({
      directory: "static/link-mentions",
      publicPath: "/link-mentions",
    }),
  },
});

Custom backends can implement the exported ImageCacheStore interface.

🔒 Security and limitations

Metadata and image requests run in the build environment. Use the plugin only with trusted Markdown. Requests to private or local network addresses are not currently blocked.

Missing metadata parts are omitted. If metadata cannot be resolved, the empty link is left unchanged.

🛠️ Development

vp install
vp check
vp test
vp pack

📄 License

MIT