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

eleventy-plugin-llms-txt

v1.2.0

Published

An Eleventy plugin that generates llms.txt to expose site content to LLMs

Readme

eleventy-plugin-llms-txt

An Eleventy plugin that generates a llms.txt file to expose your site's content to Large Language Models (LLMs) in a structured format.

Installation

npm install eleventy-plugin-llms-txt

Usage

Add the plugin to your Eleventy configuration file (.eleventy.js):

const llmsTxtPlugin = require('eleventy-plugin-llms-txt');

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin(llmsTxtPlugin, {
    // options (optional)
  });
  
  // ... rest of your config
};

After building your site, a llms.txt file will be generated in your output directory (typically _site).

Options

The plugin accepts the following options:

| Option | Type | Default | Description | |--------|------|---------|-------------| | outputPath | String | 'llms.txt' | Path to the output file (relative to the output directory) | | collections | Array | ['all'] | Collections to include in the output | | excludeCollections | Array | [] | Collections to exclude from the output | | excludeContentTypes | Array | [] | Content types to exclude | | siteUrl | String | '' | Base URL of your site | | includeContent | Boolean | true | Whether to include page content | | maxContentLength | Number | 10000 | Maximum length of content to include | | dateFormat | String | 'toISOString' | Date format method to use | | additionalMetadata | Array | [] | Additional metadata fields to include | | sortByDate | Boolean | false | Whether to sort collection items by date | | sortDirection | String | 'desc' | Sort direction: 'desc' (newest first) or 'asc' (oldest first) | | normalizeWhitespace | Boolean | false | Whether to normalize whitespace in content (replacing multiple spaces/newlines with a single space) | | stripHorizontalRules | Boolean | true | Whether to remove --- from content (to avoid confusion with page separators) |

Example with options

eleventyConfig.addPlugin(llmsTxtPlugin, {
  outputPath: 'ai/llms.txt',
  collections: ['posts', 'pages'],
  excludeCollections: ['drafts'],
  siteUrl: 'https://example.com',
  maxContentLength: 5000,
  additionalMetadata: ['description', 'author'],
  sortByDate: true,
  sortDirection: 'desc' // 'desc' for newest first, 'asc' for oldest first
});

Output Format

The generated llms.txt file follows this format:

# Site Content for LLMs
# Generated: [timestamp]
# Site URL: [your site URL]

## Collection: [collection name]

### Page: [page title]
URL: [page URL]
Date: [page date]
Tags: [page tags]
[additional metadata fields]

Content:
[page content]

---

[next page...]

Why use this plugin?

LLMs like ChatGPT, Claude, and others can better understand and reference your website's content when it's presented in a structured format. The llms.txt file provides:

  1. Structured content: Organized by collections, pages, and metadata
  2. Clean text: HTML stripped and whitespace normalized
  3. Relevant metadata: Titles, URLs, dates, tags, and custom fields
  4. Efficient crawling: All content in one file for easy processing

License

MIT