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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@alibot/dumi-plugin-llms

v1.0.4

Published

Dumi Plugin - parser .md to llms.txt

Readme

dumi将本地markdown输出到新目录

  • [x] code标签转换
  • [x] 支持转换表格
  • [x] 原始markdown格式保持(h1、h2等)
  • [x] 换行保持
  • [x] embed标签
  • [x] 配置输出目录
  • [x] 配置输出扩展名
  • [x] 输出合并文件
  • [x] 输出索引文件
  • [x] 限定转换文件范围(patterns)
  • [x] 忽略指定文件
  • [x] 动态产出文件

Usage

Install

npm install @alibot/dumi-plugin-llms --save-dev

Apply

// .dumirc.ts
import path from 'path';
export default {
  plugins: ['@alibot/dumi-plugin-llms'],
  llms: {
    // 输出目录,会将本地参与dumi编译的md文件转到到目录,保持原目录结构。建议不要和原始md文件使用相同目录
    outputDir: 'llms',
    // 输出文件扩展名
    outputExt: '.llms.txt',
    // 所有文件合并产出
    fullFile: 'all.llms.txt',
    // 索引文件
    indexFile: 'index.llms.txt',
    // 索引文件引用文件路径前的host, 可改为实际应用部署地址,例如 https://www.xx.xx/docs/
    indexHost: '',
    // 文件匹配,可以禁止某些文件被解析, 例如['**/*.md', '!src/test.md]则禁止输出src/test.md文件
    // patterns: ['*/*.md']
    // 自定义产出文件路径, (filename, {cwd, outputDir, outputExt}) => string
    outputFilePath: ((filename, {cwd, outputDir, outputExt}) => {
      // 忽略首层src文件路径
      return path.resolve(cwd, outputDir, filename.replace(/^src\//, '').replace(/\.md$/, outputExt));
    }),
    /** 是否禁用,假如禁用则不会执行解析 */
    disabled: false,
    /** 自定义json处理方法,可以在将树转换成markdown前做自定义处理, 注意返回新的tree对象,不要对原始tree进行修改,并保持原始tree结构 */
    // transformTree?: (tree: HastRoot, filename: string) => HastRoot;
    /** 自定义转换成markdown的方法, 可以对处理后的md进行转换,例如:将md中的图片转换为base64 */
    // transformMarkdown?: (md: string, filename: string) => string;
  },
};

开发调试

  1. dumi dev命令启动dumi,可以查看展示实例