Skip to content

Commit 9c8f01c

Browse files
committed
feat: add llmstxt plugin for LLM docs
1 parent 5624d13 commit 9c8f01c

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

astro.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
import { readFileSync } from 'node:fs'
2+
import path from 'node:path'
3+
import { fileURLToPath } from 'node:url'
14
import vue from '@astrojs/vue'
25
import tutorialkit from '@tutorialkit/astro'
36
import { defineConfig } from 'astro/config'
4-
import { readFileSync } from 'fs'
5-
import { fileURLToPath } from 'url'
6-
import path from 'path'
7+
import { llmsPlugin } from 'vite-plugin-llmstxt'
78

89
// Read package version at build time
910
const __filename = fileURLToPath(import.meta.url)
@@ -19,6 +20,7 @@ export default defineConfig({
1920
define: {
2021
'import.meta.env.PACKAGE_VERSION': JSON.stringify(packageJson.version),
2122
},
23+
plugins: [llmsPlugin({ preset: 'tutorialkit', outputDir: 'dist' })],
2224
},
2325
integrations: [
2426
tutorialkit({

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"pathe": "^2.0.3",
4747
"prettier-plugin-astro": "^0.14.1",
4848
"typescript": "^5.4.5",
49+
"vite-plugin-llmstxt": "^0.0.2",
4950
"wrangler": "^3.96.0"
5051
}
5152
}

pnpm-lock.yaml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)