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

v0.1.0

Published

A plugin for 11ty to generate llms.txt and llms-full.txt

Readme

Eleventy Plugin: Generator for llms.txt and llms-full.txt

License: MIT

A plugin for 11ty to automatically generate llms.txt and llms-full.txt files specifically formatted for Large Language Models (LLMs):

  1. llms.txt: A master index of your site's content with titles and absolute URLs, perfect for providing LLMs with a sitemap.
  2. llms-full.txt: A concatenated corpus of all your eligible Markdown content (frontmatter stripped), ideal for fine-tuning, retrieval-augmented generation (RAG), or creating a knowledge base.

More info at llmstxt.org.

Features

  • Automatic llms.txt Generation: Creates a Markdown-formatted list of all your live documents with links (like a Sitemap).
  • Automatic llms-full.txt Generation: Concatenates the content of all eligible Markdown files into a single text file.
  • Configurable Header: Add a custom header to both generated files.
  • Draft Exclusion: Automatically excludes draft posts (or those with eleventyExcludeFromCollections: true).
  • Content Exclusion: Fine-grained control to exclude specific pages using frontmatter (robots: noindex or excludeFromLlms: true).
  • Absolute URLs: Generates full, absolute URLs for llms.txt using your site's base URL.
  • Source Comments (Optional): Include comments in llms-full.txt indicating the source file for each content block.

Installation

npm install eleventy-plugin-llms --save-dev

🛠️ Usage

Open your Eleventy config file (usually .eleventy.js) and add the plugin:

const eleventyPluginLlms = require('eleventy-plugin-llms');

module.exports = (eleventyConfig) => {
	eleventyConfig.addPlugin(eleventyPluginLlms, {
    	siteUrl: "https://www.example.com", // REQUIRED for absolute URLs
    	headerText: `# My Static Site - LLM Corpus

This document contains content from My Static Site, prepared for LLM consumption.

## Documents Index`,
    // See more options below!
	});

  	// Your other Eleventy configurations...
};

The plugin will then generate llms.txt and llms-full.txt in your output directory (e.g., _site/) after each Eleventy build.

⚙️ Configuration Options

You can pass an options object as the second argument to addPlugin. Here are the available options:

| Option | Type | Description | | :---------------------- | :--------- | :---------------------------------------------------------------------------------------------------------------------------------------- | | siteUrl | String | Default: "" REQUIRED for absolute URLs. Your site's full base URL (e.g., "https://www.example.com"). A warning is issued if not set, and links in llms.txt will be relative. | | headerText | String | Default: "# My Site LLM Data\n\nThis file contains information about the site's content, formatted for Large Language Models.\n\n## Documents" The header content prepended to both generated files. Supports Markdown. | | llmsFilename | String | Default: "llms.txt" The filename for the document index file. | | llmsFullFilename | String | Default: "llms-full.txt" The filename for the concatenated full content file. | | includeDrafts | Boolean | Default: false Set to true to include documents marked as drafts (e.g., draft: true or eleventyExcludeFromCollections: true in frontmatter). | | markdownOnly | Boolean | Default: true If true, only processes files with a .md extension. | | includeSourceComment | Boolean | Default: true If true, adds an HTML comment <!-- Source: path/to/file.md --> before each document's content in llms-full.txt. | | defaultTitleFormatter | Function | Default: A function that takes inputPath, extracts the filename, replaces hyphens/underscores with spaces, and title-cases it. A function (inputPath) => string to generate a title if one isn't found in the document's frontmatter. |

Excluding Content from LLM Files

Drafts are automatically excluded unless you set includeDrafts to true. Furthermore, you can specify in the front matter of every Markdown file whether to exclude it.

A document will be excluded if its frontmatter contains robots: noindex or excludeFromLlms: true

This allows you to easily omit pages like 404 error pages, private drafts, or any other content you don't want to feed to LLMs.

Example: Excluding a 404 Page

Let's say you have a 404.md page:

---
title: Page Not Found
permalink: /404.html
layout: layouts/base.njk
eleventyExcludeFromCollections: true # Already excluded from sitemaps, etc.
robots: noindex # Add this to exclude from LLM files
excludeFromLlms: true # This would also work
---
# 404 Page Not Found

The page you were looking for doesn't exist.
You might have mistyped the address, or the page may have moved.

By adding robots: noindex (or excludeFromLlms: true), this 404 page will not appear in llms.txt or have its content included in llms-full.txt.

Enjoy!