npm.io
2.0.0-rc.105 • Published 1 year ago

@vuepress/plugin-llms

Licence
MIT
Version
2.0.0-rc.105
Deps
7
Size
46 kB
Vulns
0
Weekly
1.7K
Stars
64

@vuepress/plugin-llms

LLMs (Large Language Models) are great at processing text, but traditional documentation formats can be too heavy and cluttered. @vuepress/plugin-llms generates raw Markdown documentation that LLMs can efficiently process

The file structure in .vuepress/dist folder will be as follows:

📂 .vuepress/dist
├── ...
├── llms-full.txt            // A file where all the website documentation is compiled into one file
├── llms.txt                 // The main file for LLMs with all links to all sections of the documentation for LLMs
├── markdown-examples.html   // A human-friendly version of `markdown-examples` section in HTML format
└── markdown-examples.md     // A LLM-friendly version of `markdown-examples` section in Markdown format

Installation

# pnpm
npm i -D @vuepress/plugin-llms@next
# yarn
yarn add -D @vuepress/plugin-llms@next
# npm
npm i -D @vuepress/plugin-llms@next

Usage

Add the plugin to your VuePress configuration (.vuepress/config.ts):

import { llmsPlugin } from '@vuepress/plugin-llms'
import { defineUserConfig } from 'vuepress'

export default defineUserConfig({
  // ...
  plugins: [
    llmsPlugin({
      // options
    }),
  ],
})
Options

See types.ts

It is recommended to configure redirects so that AI can use addresses with both .md and .txt extensions

Netlify

public/_redirects :

/llms.md         /llms.txt 200!
/llms-full.md    /llms-full.txt 200!

Syntax documentation: https://docs.netlify.com/routing/redirects

Credits

License

MIT LICENSE

Keywords