Skip to content

Commit 483c6bf

Browse files
authored
Fix llms-full.txt to include js examples (#237)
1 parent fcfe9a1 commit 483c6bf

File tree

6 files changed

+1084
-395
lines changed

6 files changed

+1084
-395
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,3 @@ jobs:
3939
- name: Check formatting
4040
working-directory: ./docs
4141
run: npm run format:check
42-
43-
- name: Generate LLM-friendly documentation
44-
working-directory: ./docs
45-
run: node scripts/extract-docs.js
46-
47-
- name: Upload LLM docs artifact
48-
uses: actions/upload-artifact@v4
49-
with:
50-
name: llm-docs
51-
path: public/llms-full.txt
52-
retention-days: 90

docs/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
.vitepress/dist
33
.vitepress/cache
4-
public/llms-full.txt

docs/.vitepress/config.mts

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
import { execSync } from 'child_process'
2-
import { dirname, join } from 'node:path'
3-
import { fileURLToPath } from 'node:url'
41
import { defineConfig } from 'vitepress'
2+
import llmstxt from 'vitepress-plugin-llms'
53
import { tabsMarkdownPlugin } from './vitepress-plugin-tabs/tabsMarkdownPlugin'
64

7-
const __filename = fileURLToPath(import.meta.url)
8-
const __dirname = dirname(__filename)
9-
105
const title = 'Inertia Rails'
116
const description = 'Documentation for Inertia.js Rails adapter'
127
const site = 'https://inertia-rails.dev'
@@ -21,17 +16,9 @@ export default defineConfig({
2116

2217
vite: {
2318
plugins: [
24-
{
25-
name: 'generate-llm-docs',
26-
buildStart() {
27-
// Regenerate LLM docs before build
28-
console.log('Regenerating LLM documentation...')
29-
execSync('node scripts/extract-docs.js', {
30-
cwd: join(__dirname, '..'),
31-
})
32-
console.log('LLM documentation updated!')
33-
},
34-
},
19+
llmstxt({
20+
depth: 2,
21+
}),
3522
],
3623
},
3724

0 commit comments

Comments
 (0)