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

astro-madao

v0.4.1

Published

Markdown alternative for easier AI access to your Astro site.

Readme


disclaimer: this is an experiment, not guaranteed to work as it depends on how the ai crawls your website. It will hopefully become more useful as time passes and standards are created and adopted

NPM Version NPM Last Update NPM Downloads

MADAO – Making Astro AI-friendly

(no it's not an acronym)

madao is a tiny Astro integration that injects a <link rel="alternate" type="text/markdown" …> tag into every rendered HTML page. The tag points to a generated Markdown representation of the page under a /md/ folder, making the site AI‑ready: LLMs can consume the raw Markdown alongside the HTML. It also generates llms.txt and llms-full.txt to assure compatibility with more ai-bots.

MADAO (マダオ)?

Taizou Hasegawa (Madao) from Gintama

We are bound to become "totally hopeless old guy"s as AI will replace us and we lose our job, kinda like Hasegawa from (Gintama). And also MD-AI is written similar to madao.

Features

  • Zero‑config: add the integration to your astro.config.mjs and the middleware is wired automatically.
  • SSR‑friendly: runs as an Astro middleware, works with static builds and server‑side rendering.
  • Markdown export: on astro:build:done you can implement a conversion pipeline that writes the page HTML to Markdown files under dist/md/.
  • Developer tooling: includes Biome for lint/format, Changesets for versioning & releasing, and a CI workflow.

Installation

npm i -D astro-madao
# install peer dependency if you haven't already
npm i astro

Add the integration to astro.config.mjs:

import { defineConfig } from "astro";
import madao from "astro-madao";

export default defineConfig({
  integrations: [madao()],
});

Options

You don't have to configure Madao, but you may want to personalize some settings:

| Option | Default Value | What it Does | | -------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ | | folder | "md" | Sets the name of the subfolder where the generated Markdown files will be placed. | | title | (your homepage title) | Sets the site title for the llms.txt and llms-full.txt files. | | description | (your homepage description) | Sets the site description for llms.txt and llms-full.txt. | | excludePaths | [] (empty list) | List of URL patterns to exclude from Markdown file generation (e.g., folders you don't want exported). | | webmcp | false | Opt-in WebMCP: true or { enabled: true } registers a read-only read_page_markdown tool. |

Example:

  integrations: [madao({
    folder: 'ai',
    title: 'Madao',
    excludePaths: 'homeworks'
  })],
});

Usage

The middleware will automatically append a <link> tag pointing to the Markdown file for the current page. You can then flesh out the astro:build:done hook to generate those Markdown files.

Development

# lint & format
npm run lint
npm run format

# build
npm run build

Releasing

We use Changesets to manage releases:

# create a changeset
npm run changeset
# version bump & changelog generation
npm run version
# publish to npm
npm run release

The CI workflow runs lint, type‑checking and the build on every push.

ROADMAP

  • [] Next update: handle i18n better
  • [x] WebMCP (MD reading tool)